Buffer Interface, can't get PyObject_AsReadBuffer to work?

Kevin Cazabon kevin at cazabon.com
Wed Apr 3 22:59:18 EST 2002


Thanks Martin, you're right of course.  The documentation is
incorrect... I've submitted a bug report to SourceForge.  Annoying,
heh?

Back-on-the-right-track-ly yours,
Kevin.

martin at v.loewis.de (Martin v. Loewis) wrote in message news:<m3sn6dntiy.fsf at mira.informatik.hu-berlin.de>...
> 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