diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:51:38 (GMT) |
commit | 593daf545bd9b7e7bcb27b498ecc6f36db9ae395 (patch) | |
tree | c0a57029b9ab0eb18a2bb4f8fd65f0817f1a1707 /Modules/clmodule.c | |
parent | c3cb683d638e9d660c18a05293a576f98965166e (diff) | |
download | cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.zip cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.gz cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.bz2 |
Renamed PyString to PyBytes
Diffstat (limited to 'Modules/clmodule.c')
-rw-r--r-- | Modules/clmodule.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Modules/clmodule.c b/Modules/clmodule.c index d3e0edf..b504eed 100644 --- a/Modules/clmodule.c +++ b/Modules/clmodule.c @@ -111,7 +111,7 @@ cl_CompressImage(PyObject *self, PyObject *args) return NULL; retry: - compressedBuffer = PyString_FromStringAndSize(NULL, frameBufferSize); + compressedBuffer = PyBytes_FromStringAndSize(NULL, frameBufferSize); if (compressedBuffer == NULL) return NULL; @@ -120,7 +120,7 @@ cl_CompressImage(PyObject *self, PyObject *args) if (clCompressImage(compressionScheme, width, height, originalFormat, compressionRatio, (void *) frameBuffer, &compressedBufferSize, - (void *) PyString_AsString(compressedBuffer)) + (void *) PyBytes_AsString(compressedBuffer)) == FAILURE || error_handler_called) { Py_DECREF(compressedBuffer); if (!error_handler_called) @@ -135,7 +135,7 @@ cl_CompressImage(PyObject *self, PyObject *args) } if (compressedBufferSize < frameBufferSize) - _PyString_Resize(&compressedBuffer, compressedBufferSize); + _PyBytes_Resize(&compressedBuffer, compressedBufferSize); return compressedBuffer; } @@ -155,14 +155,14 @@ cl_DecompressImage(PyObject *self, PyObject *args) frameBufferSize = width * height * CL_BytesPerPixel(originalFormat); - frameBuffer = PyString_FromStringAndSize(NULL, frameBufferSize); + frameBuffer = PyBytes_FromStringAndSize(NULL, frameBufferSize); if (frameBuffer == NULL) return NULL; error_handler_called = 0; if (clDecompressImage(compressionScheme, width, height, originalFormat, compressedBufferSize, compressedBuffer, - (void *) PyString_AsString(frameBuffer)) + (void *) PyBytes_AsString(frameBuffer)) == FAILURE || error_handler_called) { Py_DECREF(frameBuffer); if (!error_handler_called) @@ -236,14 +236,14 @@ clm_Compress(PyObject *self, PyObject *args) if (error_handler_called) return NULL; - data = PyString_FromStringAndSize(NULL, size); + data = PyBytes_FromStringAndSize(NULL, size); if (data == NULL) return NULL; error_handler_called = 0; if (clCompress(SELF->ob_compressorHdl, numberOfFrames, (void *) frameBuffer, &compressedBufferSize, - (void *) PyString_AsString(data)) == FAILURE || + (void *) PyBytes_AsString(data)) == FAILURE || error_handler_called) { Py_DECREF(data); if (!error_handler_called) @@ -252,7 +252,7 @@ clm_Compress(PyObject *self, PyObject *args) } if (compressedBufferSize < size) - if (_PyString_Resize(&data, compressedBufferSize)) + if (_PyBytes_Resize(&data, compressedBufferSize)) return NULL; if (compressedBufferSize > size) { @@ -285,14 +285,14 @@ clm_Decompress(PyObject *self, PyObject *args) if (error_handler_called) return NULL; - data = PyString_FromStringAndSize(NULL, dataSize); + data = PyBytes_FromStringAndSize(NULL, dataSize); if (data == NULL) return NULL; error_handler_called = 0; if (clDecompress(SELF->ob_compressorHdl, numberOfFrames, compressedDataSize, (void *) compressedData, - (void *) PyString_AsString(data)) == FAILURE || + (void *) PyBytes_AsString(data)) == FAILURE || error_handler_called) { Py_DECREF(data); if (!error_handler_called) @@ -514,7 +514,7 @@ clm_QueryParams(PyObject *self) PyList_SetItem(list, i, Py_None); } else PyList_SetItem(list, i, - PyString_FromString((char *) PVbuffer[i])); + PyBytes_FromString((char *) PVbuffer[i])); } PyMem_DEL(PVbuffer); @@ -563,7 +563,7 @@ clm_GetName(PyObject *self, PyObject *args) return NULL; } - return PyString_FromString(name); + return PyBytes_FromString(name); } static PyObject * @@ -775,7 +775,7 @@ cl_QueryAlgorithms(PyObject *self, PyObject *args) PyList_SetItem(list, i, Py_None); } else PyList_SetItem(list, i, - PyString_FromString((char *) PVbuffer[i])); + PyBytes_FromString((char *) PVbuffer[i])); } PyMem_DEL(PVbuffer); @@ -818,7 +818,7 @@ cl_GetAlgorithmName(PyObject *self, PyObject *args) return NULL; } - return PyString_FromString(name); + return PyBytes_FromString(name); } static PyObject * |