[Python-3000] passing bytes buffers to C with NUL characters in them?

Bill Janssen janssen at parc.com
Sat Oct 27 02:42:29 CEST 2007


> I'm not sure what to use in PyArg_ParseTuple in 3K.  I'm passing in
> bytes which may contain NUL characters.  Using 's#' doesn't really
> work, because it erroneously accepts Unicode strings.

Ah, sorry, found it.  "y#".

Bill


More information about the Python-3000 mailing list