1. Armin Rigo
  2. cpython-withatomic


Christian Heimes  committed b962d04

w# requires Py_ssize_t, not int.
This documentation bug has cost me several hours of debugging :/

  • Participants
  • Parent commits 7fdf936
  • Branches 2.6

Comments (0)

Files changed (1)

File Doc/c-api/arg.rst

View file
    or use ``w#`` instead.  Only single-segment buffer objects are accepted;
    :exc:`TypeError` is raised for all others.
-``w#`` (read-write character buffer) [char \*, int]
+``w#`` (read-write character buffer) [char \*, Py_ssize_t]
    Like ``s#``, but accepts any object which implements the read-write buffer
    interface.  The :ctype:`char \*` variable is set to point to the first byte of
    the buffer, and the :ctype:`int` is set to the length of the buffer.  Only