Support for buffer protocol for socket and struct.

* Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer
  protocol (send and sendto already did).

* Added struct.pack_to(), that is the corresponding buffer compatible method to
  unpack_from().

* Fixed minor typos in arraymodule.
This commit is contained in:
Martin Blais 2006-05-26 12:03:27 +00:00
parent 1b94940165
commit 2856e5f390
6 changed files with 550 additions and 220 deletions

View file

@ -1975,9 +1975,9 @@ static PyTypeObject Arraytype = {
0, /* tp_setattr */
0, /* tp_compare */
(reprfunc)array_repr, /* tp_repr */
0, /* tp_as _number*/
&array_as_sequence, /* tp_as _sequence*/
&array_as_mapping, /* tp_as _mapping*/
0, /* tp_as_number*/
&array_as_sequence, /* tp_as_sequence*/
&array_as_mapping, /* tp_as_mapping*/
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */