Equivalent of PyByteArray_FromStringAndSize in python2.4
Hello Team, While cross-compiling XBMC Apllication.The code is generated using Java. I am getting an error :PyByteArray_FromStringAndSize.is undefined, i understand that this api is defined in python2.6. But we are supposed to compile this with python-2.4 libraries.
Can you please let us know what is the equivalent API in python 2.4.This is the Code which using the "PyByteArray_FromStringAndSize" API.
static PyObject* xbmc_XBMCAddon_xbmc_RenderCapture_getImage(PyObject* self, PyObject *args, PyObject *kwds) { RenderCapture* rc = ((RenderCapture*)retrieveApiInstance((PyObject*)self,&PyXBMCAddon_xbmc_RenderCapture_Type,"getImage","XBMCAddon::xbmc::RenderCapture")); if (rc->GetUserState() != CAPTURESTATE_DONE) { PyErr_SetString(PyExc_SystemError, "illegal user state"); return NULL; }
ssize_t size = rc->getWidth() * rc->getHeight() * 4; return PyByteArray_FromStringAndSize((const char *)rc->GetPixels(), size); } Thanks, John
participants (1)
-
endeavor john