rename code.length tp mem_length with lots of noise impact

This commit is contained in:
Torsten Ruger
2014-09-16 17:16:56 +03:00
parent cffa7f1953
commit 8b8a8eea56
14 changed files with 124 additions and 50 deletions

View File

@@ -8,7 +8,7 @@ module StreamReader
def read_binary(size, count, type)
d = __sr_read(size*count)
ret = d.unpack(type*count)
return ret if ret.length > 1
return ret if ret.mem_length > 1
return ret[0]
end
def read_uint32(n=1)
@@ -80,7 +80,7 @@ module StreamWriter
return __sr_write(str + 0.chr)
end
def write_cstr_prefixed(str)
write_uint8(str.length)
write_uint8(str.mem_length)
return __sr_write(str)
end
def write_str(str)