Fixes in struct and socket from merge reviews.
- Following Guido's comments, renamed
* pack_to -> pack_into
* recv_buf -> recv_into
* recvfrom_buf -> recvfrom_into
- Made fixes to _struct.c according to Neal Norwitz comments on the checkins
list.
- Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
diff --git a/Lib/struct.py b/Lib/struct.py
index 51ee29a..9113e71 100644
--- a/Lib/struct.py
+++ b/Lib/struct.py
@@ -62,7 +62,7 @@
o = _compile(fmt)
return o.pack(*args)
-def pack_to(fmt, buf, offset, *args):
+def pack_into(fmt, buf, offset, *args):
"""
Pack the values v2, v2, ... according to fmt, write
the packed bytes into the writable buffer buf starting at offset.
@@ -72,7 +72,7 @@
o = _cache[fmt]
except KeyError:
o = _compile(fmt)
- return o.pack_to(buf, offset, *args)
+ return o.pack_into(buf, offset, *args)
def unpack(fmt, s):
"""