changed a variable name in Socket.moo

This commit is contained in:
hyunghwan.chung 2018-01-03 15:33:09 +00:00
parent 15f27702f1
commit f0df2fcd92

View File

@ -100,7 +100,7 @@ class(#byte) IP6Address(IPAddress)
method __fromString: str method __fromString: str
{ {
| pos size mysize ch tgpos v1 val curtok saw_xdigit colonpos | | pos size mysize ch tgpos v1 val curseg saw_xdigit colonpos |
pos := 0. pos := 0.
size := str size. size := str size.
@ -114,7 +114,7 @@ class(#byte) IP6Address(IPAddress)
}. }.
tgpos := 0. tgpos := 0.
curtok := pos. curseg := pos.
val := 0. val := 0.
saw_xdigit := false. saw_xdigit := false.
colonpos := -1. colonpos := -1.
@ -135,7 +135,7 @@ class(#byte) IP6Address(IPAddress)
if (ch == $:) if (ch == $:)
{ {
curtok := pos. curseg := pos.
if (saw_xdigit not) if (saw_xdigit not)
{ {
## no multiple double colons are allowed ## no multiple double colons are allowed
@ -162,14 +162,14 @@ class(#byte) IP6Address(IPAddress)
continue. continue.
}. }.
if (ch == $. and: [tgpos + 4 <= mysize] if (ch == $. and: [tgpos + 4 <= mysize])
{ {
IP4Address __fromString: (str copyFrom: curseg).
tgpos := tgpos + 4. tgpos := tgpos + 4.
saw_xdigit := false. saw_xdigit := false.
break. break.
}. }.
## invalid character in the address ## invalid character in the address
^Error.Code.EINVAL. ^Error.Code.EINVAL.
}. }.