Buffer Interface, can't get PyObject_AsReadBuffer to work?

Martin v. Loewis martin at v.loewis.de
Wed Apr 3 02:14:13 EST 2002


kevin at cazabon.com (Kevin Cazabon) writes:

>   // Convert the pInBuffer from PyObject to a PyBuffer (readable),
> THIS DOESN'T WORK (the Python object type that is passed in as
> inBuffer is a 'B' array)
>   if (PyObject_CheckReadBuffer(inBuffer)) {
>     //this ALWAYS returns 0, meaning unsuccessful... what's wrong???
>     ok = PyObject_AsReadBuffer(inBuffer, &pInBuffer, &p4size);

0 means success, -1 means error. Use the source, Luke.

HTH,
Martin



More information about the Python-list mailing list