diff Lib/struct.py @ 38580:a114003aa3d3 legacy-trunk

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.
author Martin Blais <blais@furius.ca>
date Sun, 04 Jun 2006 13:49:49 +0000
parents 795d1cb1df01
children 4aed4367add2
line wrap: on
line diff
--- a/Lib/struct.py	Sun Jun 04 12:59:59 2006 +0000
+++ b/Lib/struct.py	Sun Jun 04 13:49:49 2006 +0000
@@ -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):
     """