Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Modules/clmodule.c

    r2 r388  
    1313
    1414typedef struct {
    15         PyObject_HEAD
    16         int ob_isCompressor;    /* Compressor or Decompressor */
    17         CL_Handle ob_compressorHdl;
    18         int *ob_paramtypes;
    19         int ob_nparams;
     15    PyObject_HEAD
     16    int ob_isCompressor;        /* Compressor or Decompressor */
     17    CL_Handle ob_compressorHdl;
     18    int *ob_paramtypes;
     19    int ob_nparams;
    2020} clobject;
    2121
    22 static PyObject *ClError;               /* exception cl.error */
     22static PyObject *ClError;               /* exception cl.error */
    2323
    2424static int error_handler_called = 0;
     
    3131 * argument to the proper type using this macro.
    3232 */
    33 #define SELF    ((clobject *) self)
     33#define SELF    ((clobject *) self)
    3434
    3535/********************************************************************
    36                           Utility routines.
     36                          Utility routines.
    3737********************************************************************/
    3838static void
    3939cl_ErrorHandler(CL_Handle handle, int code, const char *fmt, ...)
    4040{
    41         va_list ap;
    42         char errbuf[BUFSIZ];    /* hopefully big enough */
    43         char *p;
    44 
    45         if (PyErr_Occurred())   /* don't change existing error */
    46                 return;
    47         error_handler_called = 1;
    48         va_start(ap, fmt);
    49         vsprintf(errbuf, fmt, ap);
    50         va_end(ap);
    51         p = &errbuf[strlen(errbuf) - 1]; /* swat the line feed */
    52         if (*p == '\n')
    53                 *p = 0;
    54         PyErr_SetString(ClError, errbuf);
     41    va_list ap;
     42    char errbuf[BUFSIZ];        /* hopefully big enough */
     43    char *p;
     44
     45    if (PyErr_Occurred())       /* don't change existing error */
     46        return;
     47    error_handler_called = 1;
     48    va_start(ap, fmt);
     49    vsprintf(errbuf, fmt, ap);
     50    va_end(ap);
     51    p = &errbuf[strlen(errbuf) - 1]; /* swat the line feed */
     52    if (*p == '\n')
     53        *p = 0;
     54    PyErr_SetString(ClError, errbuf);
    5555}
    5656
     
    6161param_type_is_float(clobject *self, int param)
    6262{
    63         int bufferlength;
    64 
    65         if (self->ob_paramtypes == NULL) {
    66                 error_handler_called = 0;
    67                 bufferlength = clQueryParams(self->ob_compressorHdl, 0, 0);
    68                 if (error_handler_called)
    69                         return -1;
    70 
    71                 self->ob_paramtypes = PyMem_NEW(int, bufferlength);
    72                 if (self->ob_paramtypes == NULL)
    73                         return -1;
    74                 self->ob_nparams = bufferlength / 2;
    75 
    76                 (void) clQueryParams(self->ob_compressorHdl,
    77                                      self->ob_paramtypes, bufferlength);
    78                 if (error_handler_called) {
    79                         PyMem_DEL(self->ob_paramtypes);
    80                         self->ob_paramtypes = NULL;
    81                         return -1;
    82                 }
    83         }
    84 
    85         if (param < 0 || param >= self->ob_nparams)
    86                 return -1;
    87 
    88         if (self->ob_paramtypes[param*2 + 1] == CL_FLOATING_ENUM_VALUE ||
    89             self->ob_paramtypes[param*2 + 1] == CL_FLOATING_RANGE_VALUE)
    90                 return 1;
    91         else
    92                 return 0;
     63    int bufferlength;
     64
     65    if (self->ob_paramtypes == NULL) {
     66        error_handler_called = 0;
     67        bufferlength = clQueryParams(self->ob_compressorHdl, 0, 0);
     68        if (error_handler_called)
     69            return -1;
     70
     71        self->ob_paramtypes = PyMem_NEW(int, bufferlength);
     72        if (self->ob_paramtypes == NULL)
     73            return -1;
     74        self->ob_nparams = bufferlength / 2;
     75
     76        (void) clQueryParams(self->ob_compressorHdl,
     77                             self->ob_paramtypes, bufferlength);
     78        if (error_handler_called) {
     79            PyMem_DEL(self->ob_paramtypes);
     80            self->ob_paramtypes = NULL;
     81            return -1;
     82        }
     83    }
     84
     85    if (param < 0 || param >= self->ob_nparams)
     86        return -1;
     87
     88    if (self->ob_paramtypes[param*2 + 1] == CL_FLOATING_ENUM_VALUE ||
     89        self->ob_paramtypes[param*2 + 1] == CL_FLOATING_RANGE_VALUE)
     90        return 1;
     91    else
     92        return 0;
    9393}
    9494
    9595/********************************************************************
    96                Single image compression/decompression.
     96               Single image compression/decompression.
    9797********************************************************************/
    9898static PyObject *
    9999cl_CompressImage(PyObject *self, PyObject *args)
    100100{
    101         int compressionScheme, width, height, originalFormat;
    102         float compressionRatio;
    103         int frameBufferSize, compressedBufferSize;
    104         char *frameBuffer;
    105         PyObject *compressedBuffer;
    106 
    107         if (!PyArg_ParseTuple(args, "iiiifs#", &compressionScheme,
    108                         &width, &height,
    109                         &originalFormat, &compressionRatio, &frameBuffer,
    110                         &frameBufferSize))
    111                 return NULL;
     101    int compressionScheme, width, height, originalFormat;
     102    float compressionRatio;
     103    int frameBufferSize, compressedBufferSize;
     104    char *frameBuffer;
     105    PyObject *compressedBuffer;
     106
     107    if (!PyArg_ParseTuple(args, "iiiifs#", &compressionScheme,
     108                    &width, &height,
     109                    &originalFormat, &compressionRatio, &frameBuffer,
     110                    &frameBufferSize))
     111        return NULL;
    112112
    113113  retry:
    114         compressedBuffer = PyString_FromStringAndSize(NULL, frameBufferSize);
    115         if (compressedBuffer == NULL)
    116                 return NULL;
    117 
    118         compressedBufferSize = frameBufferSize;
    119         error_handler_called = 0;
    120         if (clCompressImage(compressionScheme, width, height, originalFormat,
    121                             compressionRatio, (void *) frameBuffer,
    122                             &compressedBufferSize,
    123                             (void *) PyString_AsString(compressedBuffer))
    124             == FAILURE || error_handler_called) {
    125                 Py_DECREF(compressedBuffer);
    126                 if (!error_handler_called)
    127                         PyErr_SetString(ClError, "clCompressImage failed");
    128                 return NULL;
    129         }
    130 
    131         if (compressedBufferSize > frameBufferSize) {
    132                 frameBufferSize = compressedBufferSize;
    133                 Py_DECREF(compressedBuffer);
    134                 goto retry;
    135         }
    136 
    137         if (compressedBufferSize < frameBufferSize)
    138                 _PyString_Resize(&compressedBuffer, compressedBufferSize);
    139 
    140         return compressedBuffer;
     114    compressedBuffer = PyString_FromStringAndSize(NULL, frameBufferSize);
     115    if (compressedBuffer == NULL)
     116        return NULL;
     117
     118    compressedBufferSize = frameBufferSize;
     119    error_handler_called = 0;
     120    if (clCompressImage(compressionScheme, width, height, originalFormat,
     121                        compressionRatio, (void *) frameBuffer,
     122                        &compressedBufferSize,
     123                        (void *) PyString_AsString(compressedBuffer))
     124        == FAILURE || error_handler_called) {
     125        Py_DECREF(compressedBuffer);
     126        if (!error_handler_called)
     127            PyErr_SetString(ClError, "clCompressImage failed");
     128        return NULL;
     129    }
     130
     131    if (compressedBufferSize > frameBufferSize) {
     132        frameBufferSize = compressedBufferSize;
     133        Py_DECREF(compressedBuffer);
     134        goto retry;
     135    }
     136
     137    if (compressedBufferSize < frameBufferSize)
     138        _PyString_Resize(&compressedBuffer, compressedBufferSize);
     139
     140    return compressedBuffer;
    141141}
    142142
     
    144144cl_DecompressImage(PyObject *self, PyObject *args)
    145145{
    146         int compressionScheme, width, height, originalFormat;
    147         char *compressedBuffer;
    148         int compressedBufferSize, frameBufferSize;
    149         PyObject *frameBuffer;
    150 
    151         if (!PyArg_ParseTuple(args, "iiiis#", &compressionScheme, &width, &height,
    152                         &originalFormat, &compressedBuffer,
    153                         &compressedBufferSize))
    154                 return NULL;
    155 
    156         frameBufferSize = width * height * CL_BytesPerPixel(originalFormat);
    157 
    158         frameBuffer = PyString_FromStringAndSize(NULL, frameBufferSize);
    159         if (frameBuffer == NULL)
    160                 return NULL;
    161 
    162         error_handler_called = 0;
    163         if (clDecompressImage(compressionScheme, width, height, originalFormat,
    164                               compressedBufferSize, compressedBuffer,
    165                               (void *) PyString_AsString(frameBuffer))
    166             == FAILURE || error_handler_called) {
    167                 Py_DECREF(frameBuffer);
    168                 if (!error_handler_called)
    169                         PyErr_SetString(ClError, "clDecompressImage failed");
    170                 return NULL;
    171         }
    172 
    173         return frameBuffer;
     146    int compressionScheme, width, height, originalFormat;
     147    char *compressedBuffer;
     148    int compressedBufferSize, frameBufferSize;
     149    PyObject *frameBuffer;
     150
     151    if (!PyArg_ParseTuple(args, "iiiis#", &compressionScheme, &width, &height,
     152                    &originalFormat, &compressedBuffer,
     153                    &compressedBufferSize))
     154        return NULL;
     155
     156    frameBufferSize = width * height * CL_BytesPerPixel(originalFormat);
     157
     158    frameBuffer = PyString_FromStringAndSize(NULL, frameBufferSize);
     159    if (frameBuffer == NULL)
     160        return NULL;
     161
     162    error_handler_called = 0;
     163    if (clDecompressImage(compressionScheme, width, height, originalFormat,
     164                          compressedBufferSize, compressedBuffer,
     165                          (void *) PyString_AsString(frameBuffer))
     166        == FAILURE || error_handler_called) {
     167        Py_DECREF(frameBuffer);
     168        if (!error_handler_called)
     169            PyErr_SetString(ClError, "clDecompressImage failed");
     170        return NULL;
     171    }
     172
     173    return frameBuffer;
    174174}
    175175
    176176/********************************************************************
    177                 Sequential compression/decompression.
     177                Sequential compression/decompression.
    178178********************************************************************/
    179 #define CheckCompressor(self)   if ((self)->ob_compressorHdl == NULL) { \
    180         PyErr_SetString(PyExc_RuntimeError, "(de)compressor not active"); \
    181         return NULL; \
     179#define CheckCompressor(self)   if ((self)->ob_compressorHdl == NULL) { \
     180    PyErr_SetString(PyExc_RuntimeError, "(de)compressor not active"); \
     181    return NULL; \
    182182}
    183183
     
    185185doClose(clobject *self, int (*close_func)(CL_Handle))
    186186{
    187         CheckCompressor(self);
    188 
    189         error_handler_called = 0;
    190         if ((*close_func)(self->ob_compressorHdl) == FAILURE ||
    191             error_handler_called) {
    192                 if (!error_handler_called)
    193                         PyErr_SetString(ClError, "close failed");
    194                 return NULL;
    195         }
    196 
    197         self->ob_compressorHdl = NULL;
    198 
    199         if (self->ob_paramtypes)
    200                 PyMem_DEL(self->ob_paramtypes);
    201         self->ob_paramtypes = NULL;
    202 
    203         Py_INCREF(Py_None);
    204         return Py_None;
     187    CheckCompressor(self);
     188
     189    error_handler_called = 0;
     190    if ((*close_func)(self->ob_compressorHdl) == FAILURE ||
     191        error_handler_called) {
     192        if (!error_handler_called)
     193            PyErr_SetString(ClError, "close failed");
     194        return NULL;
     195    }
     196
     197    self->ob_compressorHdl = NULL;
     198
     199    if (self->ob_paramtypes)
     200        PyMem_DEL(self->ob_paramtypes);
     201    self->ob_paramtypes = NULL;
     202
     203    Py_INCREF(Py_None);
     204    return Py_None;
    205205}
    206206
     
    208208clm_CloseCompressor(PyObject *self)
    209209{
    210         return doClose(SELF, clCloseCompressor);
     210    return doClose(SELF, clCloseCompressor);
    211211}
    212212
     
    214214clm_CloseDecompressor(PyObject *self)
    215215{
    216         return doClose(SELF, clCloseDecompressor);
     216    return doClose(SELF, clCloseDecompressor);
    217217}
    218218
     
    220220clm_Compress(PyObject *self, PyObject *args)
    221221{
    222         int numberOfFrames;
    223         int frameBufferSize, compressedBufferSize, size;
    224         char *frameBuffer;
    225         PyObject *data;
    226 
    227         CheckCompressor(SELF);
    228 
    229         if (!PyArg_Parse(args, "(is#)", &numberOfFrames,
    230                         &frameBuffer, &frameBufferSize))
    231                 return NULL;
    232 
    233         error_handler_called = 0;
    234         size = clGetParam(SELF->ob_compressorHdl, CL_COMPRESSED_BUFFER_SIZE);
    235         compressedBufferSize = size;
    236         if (error_handler_called)
    237                 return NULL;
    238 
    239         data = PyString_FromStringAndSize(NULL, size);
    240         if (data == NULL)
    241                 return NULL;
    242 
    243         error_handler_called = 0;
    244         if (clCompress(SELF->ob_compressorHdl, numberOfFrames,
    245                        (void *) frameBuffer, &compressedBufferSize,
    246                        (void *) PyString_AsString(data)) == FAILURE ||
    247             error_handler_called) {
    248                 Py_DECREF(data);
    249                 if (!error_handler_called)
    250                         PyErr_SetString(ClError, "compress failed");
    251                 return NULL;
    252         }
    253 
    254         if (compressedBufferSize < size)
    255                 if (_PyString_Resize(&data, compressedBufferSize))
    256                         return NULL;
    257 
    258         if (compressedBufferSize > size) {
    259                 /* we didn't get all "compressed" data */
    260                 Py_DECREF(data);
    261                 PyErr_SetString(ClError,
    262                                 "compressed data is more than fitted");
    263                 return NULL;
    264         }
    265 
    266         return data;
     222    int numberOfFrames;
     223    int frameBufferSize, compressedBufferSize, size;
     224    char *frameBuffer;
     225    PyObject *data;
     226
     227    CheckCompressor(SELF);
     228
     229    if (!PyArg_Parse(args, "(is#)", &numberOfFrames,
     230                    &frameBuffer, &frameBufferSize))
     231        return NULL;
     232
     233    error_handler_called = 0;
     234    size = clGetParam(SELF->ob_compressorHdl, CL_COMPRESSED_BUFFER_SIZE);
     235    compressedBufferSize = size;
     236    if (error_handler_called)
     237        return NULL;
     238
     239    data = PyString_FromStringAndSize(NULL, size);
     240    if (data == NULL)
     241        return NULL;
     242
     243    error_handler_called = 0;
     244    if (clCompress(SELF->ob_compressorHdl, numberOfFrames,
     245                   (void *) frameBuffer, &compressedBufferSize,
     246                   (void *) PyString_AsString(data)) == FAILURE ||
     247        error_handler_called) {
     248        Py_DECREF(data);
     249        if (!error_handler_called)
     250            PyErr_SetString(ClError, "compress failed");
     251        return NULL;
     252    }
     253
     254    if (compressedBufferSize < size)
     255        if (_PyString_Resize(&data, compressedBufferSize))
     256            return NULL;
     257
     258    if (compressedBufferSize > size) {
     259        /* we didn't get all "compressed" data */
     260        Py_DECREF(data);
     261        PyErr_SetString(ClError,
     262                        "compressed data is more than fitted");
     263        return NULL;
     264    }
     265
     266    return data;
    267267}
    268268
     
    270270clm_Decompress(PyObject *self, PyObject *args)
    271271{
    272         PyObject *data;
    273         int numberOfFrames;
    274         char *compressedData;
    275         int compressedDataSize, dataSize;
    276 
    277         CheckCompressor(SELF);
    278 
    279         if (!PyArg_Parse(args, "(is#)", &numberOfFrames, &compressedData,
    280                         &compressedDataSize))
    281                 return NULL;
    282 
    283         error_handler_called = 0;
    284         dataSize = clGetParam(SELF->ob_compressorHdl, CL_FRAME_BUFFER_SIZE);
    285         if (error_handler_called)
    286                 return NULL;
    287 
    288         data = PyString_FromStringAndSize(NULL, dataSize);
    289         if (data == NULL)
    290                 return NULL;
    291 
    292         error_handler_called = 0;
    293         if (clDecompress(SELF->ob_compressorHdl, numberOfFrames,
    294                         compressedDataSize, (void *) compressedData,
    295                         (void *) PyString_AsString(data)) == FAILURE ||
    296             error_handler_called) {
    297                 Py_DECREF(data);
    298                 if (!error_handler_called)
    299                         PyErr_SetString(ClError, "decompress failed");
    300                 return NULL;
    301         }
    302 
    303         return data;
     272    PyObject *data;
     273    int numberOfFrames;
     274    char *compressedData;
     275    int compressedDataSize, dataSize;
     276
     277    CheckCompressor(SELF);
     278
     279    if (!PyArg_Parse(args, "(is#)", &numberOfFrames, &compressedData,
     280                    &compressedDataSize))
     281        return NULL;
     282
     283    error_handler_called = 0;
     284    dataSize = clGetParam(SELF->ob_compressorHdl, CL_FRAME_BUFFER_SIZE);
     285    if (error_handler_called)
     286        return NULL;
     287
     288    data = PyString_FromStringAndSize(NULL, dataSize);
     289    if (data == NULL)
     290        return NULL;
     291
     292    error_handler_called = 0;
     293    if (clDecompress(SELF->ob_compressorHdl, numberOfFrames,
     294                    compressedDataSize, (void *) compressedData,
     295                    (void *) PyString_AsString(data)) == FAILURE ||
     296        error_handler_called) {
     297        Py_DECREF(data);
     298        if (!error_handler_called)
     299            PyErr_SetString(ClError, "decompress failed");
     300        return NULL;
     301    }
     302
     303    return data;
    304304}
    305305
    306306static PyObject *
    307307doParams(clobject *self, PyObject *args, int (*func)(CL_Handle, int *, int),
    308         int modified)
    309 {
    310         PyObject *list, *v;
    311         int *PVbuffer;
    312         int length;
    313         int i;
    314         float number;
    315        
    316         CheckCompressor(self);
    317 
    318         if (!PyArg_Parse(args, "O", &list))
    319                 return NULL;
    320         if (!PyList_Check(list)) {
    321                 PyErr_BadArgument();
    322                 return NULL;
    323         }
    324         length = PyList_Size(list);
    325         PVbuffer = PyMem_NEW(int, length);
    326         if (PVbuffer == NULL)
    327                 return PyErr_NoMemory();
    328         for (i = 0; i < length; i++) {
    329                 v = PyList_GetItem(list, i);
    330                 if (PyFloat_Check(v)) {
    331                         number = PyFloat_AsDouble(v);
    332                         PVbuffer[i] = CL_TypeIsInt(number);
    333                 } else if (PyInt_Check(v)) {
    334                         PVbuffer[i] = PyInt_AsLong(v);
    335                         if ((i & 1) &&
    336                             param_type_is_float(self, PVbuffer[i-1]) > 0) {
    337                                 number = PVbuffer[i];
    338                                 PVbuffer[i] = CL_TypeIsInt(number);
    339                         }
    340                 } else {
    341                         PyMem_DEL(PVbuffer);
    342                         PyErr_BadArgument();
    343                         return NULL;
    344                 }
    345         }
    346 
    347         error_handler_called = 0;
    348         (*func)(self->ob_compressorHdl, PVbuffer, length);
    349         if (error_handler_called) {
    350                 PyMem_DEL(PVbuffer);
    351                 return NULL;
    352         }
    353 
    354         if (modified) {
    355                 for (i = 0; i < length; i++) {
    356                         if ((i & 1) &&
    357                             param_type_is_float(self, PVbuffer[i-1]) > 0) {
    358                                 number = CL_TypeIsFloat(PVbuffer[i]);
    359                                 v = PyFloat_FromDouble(number);
    360                         } else
    361                                 v = PyInt_FromLong(PVbuffer[i]);
    362                         PyList_SetItem(list, i, v);
    363                 }
    364         }
    365 
    366         PyMem_DEL(PVbuffer);
    367 
    368         Py_INCREF(Py_None);
    369         return Py_None;
     308        int modified)
     309{
     310    PyObject *list, *v;
     311    int *PVbuffer;
     312    int length;
     313    int i;
     314    float number;
     315
     316    CheckCompressor(self);
     317
     318    if (!PyArg_Parse(args, "O", &list))
     319        return NULL;
     320    if (!PyList_Check(list)) {
     321        PyErr_BadArgument();
     322        return NULL;
     323    }
     324    length = PyList_Size(list);
     325    PVbuffer = PyMem_NEW(int, length);
     326    if (PVbuffer == NULL)
     327        return PyErr_NoMemory();
     328    for (i = 0; i < length; i++) {
     329        v = PyList_GetItem(list, i);
     330        if (PyFloat_Check(v)) {
     331            number = PyFloat_AsDouble(v);
     332            PVbuffer[i] = CL_TypeIsInt(number);
     333        } else if (PyInt_Check(v)) {
     334            PVbuffer[i] = PyInt_AsLong(v);
     335            if ((i & 1) &&
     336                param_type_is_float(self, PVbuffer[i-1]) > 0) {
     337                number = PVbuffer[i];
     338                PVbuffer[i] = CL_TypeIsInt(number);
     339            }
     340        } else {
     341            PyMem_DEL(PVbuffer);
     342            PyErr_BadArgument();
     343            return NULL;
     344        }
     345    }
     346
     347    error_handler_called = 0;
     348    (*func)(self->ob_compressorHdl, PVbuffer, length);
     349    if (error_handler_called) {
     350        PyMem_DEL(PVbuffer);
     351        return NULL;
     352    }
     353
     354    if (modified) {
     355        for (i = 0; i < length; i++) {
     356            if ((i & 1) &&
     357                param_type_is_float(self, PVbuffer[i-1]) > 0) {
     358                number = CL_TypeIsFloat(PVbuffer[i]);
     359                v = PyFloat_FromDouble(number);
     360            } else
     361                v = PyInt_FromLong(PVbuffer[i]);
     362            PyList_SetItem(list, i, v);
     363        }
     364    }
     365
     366    PyMem_DEL(PVbuffer);
     367
     368    Py_INCREF(Py_None);
     369    return Py_None;
    370370}
    371371
     
    373373clm_GetParams(PyObject *self, PyObject *args)
    374374{
    375         return doParams(SELF, args, clGetParams, 1);
     375    return doParams(SELF, args, clGetParams, 1);
    376376}
    377377
     
    379379clm_SetParams(PyObject *self, PyObject *args)
    380380{
    381         return doParams(SELF, args, clSetParams, 0);
     381    return doParams(SELF, args, clSetParams, 0);
    382382}
    383383
     
    385385do_get(clobject *self, PyObject *args, int (*func)(CL_Handle, int))
    386386{
    387         int paramID, value;
    388         float fvalue;
    389 
    390         CheckCompressor(self);
    391 
    392         if (!PyArg_Parse(args, "i", &paramID))
    393                 return NULL;
    394 
    395         error_handler_called = 0;
    396         value = (*func)(self->ob_compressorHdl, paramID);
    397         if (error_handler_called)
    398                 return NULL;
    399 
    400         if (param_type_is_float(self, paramID) > 0) {
    401                 fvalue = CL_TypeIsFloat(value);
    402                 return PyFloat_FromDouble(fvalue);
    403         }
    404 
    405         return PyInt_FromLong(value);
     387    int paramID, value;
     388    float fvalue;
     389
     390    CheckCompressor(self);
     391
     392    if (!PyArg_Parse(args, "i", &paramID))
     393        return NULL;
     394
     395    error_handler_called = 0;
     396    value = (*func)(self->ob_compressorHdl, paramID);
     397    if (error_handler_called)
     398        return NULL;
     399
     400    if (param_type_is_float(self, paramID) > 0) {
     401        fvalue = CL_TypeIsFloat(value);
     402        return PyFloat_FromDouble(fvalue);
     403    }
     404
     405    return PyInt_FromLong(value);
    406406}
    407407
     
    409409clm_GetParam(PyObject *self, PyObject *args)
    410410{
    411         return do_get(SELF, args, clGetParam);
     411    return do_get(SELF, args, clGetParam);
    412412}
    413413
     
    415415clm_GetDefault(PyObject *self, PyObject *args)
    416416{
    417         return do_get(SELF, args, clGetDefault);
     417    return do_get(SELF, args, clGetDefault);
    418418}
    419419
     
    421421clm_SetParam(PyObject *self, PyObject *args)
    422422{
    423         int paramID, value;
    424         float fvalue;
    425 
    426         CheckCompressor(SELF);
    427 
    428         if (!PyArg_Parse(args, "(ii)", &paramID, &value)) {
    429                 PyErr_Clear();
    430                 if (!PyArg_Parse(args, "(if)", &paramID, &fvalue)) {
    431                         PyErr_Clear();
    432                         PyErr_SetString(PyExc_TypeError,
    433                                "bad argument list (format '(ii)' or '(if)')");
    434                         return NULL;
    435                 }
    436                 value = CL_TypeIsInt(fvalue);
    437         } else {
    438                 if (param_type_is_float(SELF, paramID) > 0) {
    439                         fvalue = value;
    440                         value = CL_TypeIsInt(fvalue);
    441                 }
    442         }
    443 
    444         error_handler_called = 0;
    445         value = clSetParam(SELF->ob_compressorHdl, paramID, value);
    446         if (error_handler_called)
    447                 return NULL;
    448 
    449         if (param_type_is_float(SELF, paramID) > 0)
    450                 return PyFloat_FromDouble(CL_TypeIsFloat(value));
    451         else
    452                 return PyInt_FromLong(value);
     423    int paramID, value;
     424    float fvalue;
     425
     426    CheckCompressor(SELF);
     427
     428    if (!PyArg_Parse(args, "(ii)", &paramID, &value)) {
     429        PyErr_Clear();
     430        if (!PyArg_Parse(args, "(if)", &paramID, &fvalue)) {
     431            PyErr_Clear();
     432            PyErr_SetString(PyExc_TypeError,
     433                   "bad argument list (format '(ii)' or '(if)')");
     434            return NULL;
     435        }
     436        value = CL_TypeIsInt(fvalue);
     437    } else {
     438        if (param_type_is_float(SELF, paramID) > 0) {
     439            fvalue = value;
     440            value = CL_TypeIsInt(fvalue);
     441        }
     442    }
     443
     444    error_handler_called = 0;
     445    value = clSetParam(SELF->ob_compressorHdl, paramID, value);
     446    if (error_handler_called)
     447        return NULL;
     448
     449    if (param_type_is_float(SELF, paramID) > 0)
     450        return PyFloat_FromDouble(CL_TypeIsFloat(value));
     451    else
     452        return PyInt_FromLong(value);
    453453}
    454454
     
    456456clm_GetParamID(PyObject *self, PyObject *args)
    457457{
    458         char *name;
    459         int value;
    460 
    461         CheckCompressor(SELF);
    462 
    463         if (!PyArg_Parse(args, "s", &name))
    464                 return NULL;
    465 
    466         error_handler_called = 0;
    467         value = clGetParamID(SELF->ob_compressorHdl, name);
    468         if (value == FAILURE || error_handler_called) {
    469                 if (!error_handler_called)
    470                         PyErr_SetString(ClError, "getparamid failed");
    471                 return NULL;
    472         }
    473 
    474         return PyInt_FromLong(value);
     458    char *name;
     459    int value;
     460
     461    CheckCompressor(SELF);
     462
     463    if (!PyArg_Parse(args, "s", &name))
     464        return NULL;
     465
     466    error_handler_called = 0;
     467    value = clGetParamID(SELF->ob_compressorHdl, name);
     468    if (value == FAILURE || error_handler_called) {
     469        if (!error_handler_called)
     470            PyErr_SetString(ClError, "getparamid failed");
     471        return NULL;
     472    }
     473
     474    return PyInt_FromLong(value);
    475475}
    476476
     
    478478clm_QueryParams(PyObject *self)
    479479{
    480         int bufferlength;
    481         int *PVbuffer;
    482         PyObject *list;
    483         int i;
    484 
    485         CheckCompressor(SELF);
    486 
    487         error_handler_called = 0;
    488         bufferlength = clQueryParams(SELF->ob_compressorHdl, 0, 0);
    489         if (error_handler_called)
    490                 return NULL;
    491 
    492         PVbuffer = PyMem_NEW(int, bufferlength);
    493         if (PVbuffer == NULL)
    494                 return PyErr_NoMemory();
    495 
    496         bufferlength = clQueryParams(SELF->ob_compressorHdl, PVbuffer,
    497                                      bufferlength);
    498         if (error_handler_called) {
    499                 PyMem_DEL(PVbuffer);
    500                 return NULL;
    501         }
    502 
    503         list = PyList_New(bufferlength);
    504         if (list == NULL) {
    505                 PyMem_DEL(PVbuffer);
    506                 return NULL;
    507         }
    508 
    509         for (i = 0; i < bufferlength; i++) {
    510                 if (i & 1)
    511                         PyList_SetItem(list, i, PyInt_FromLong(PVbuffer[i]));
    512                 else if (PVbuffer[i] == 0) {
    513                         Py_INCREF(Py_None);
    514                         PyList_SetItem(list, i, Py_None);
    515                 } else
    516                         PyList_SetItem(list, i,
    517                                    PyString_FromString((char *) PVbuffer[i]));
    518         }
    519 
    520         PyMem_DEL(PVbuffer);
    521 
    522         return list;
     480    int bufferlength;
     481    int *PVbuffer;
     482    PyObject *list;
     483    int i;
     484
     485    CheckCompressor(SELF);
     486
     487    error_handler_called = 0;
     488    bufferlength = clQueryParams(SELF->ob_compressorHdl, 0, 0);
     489    if (error_handler_called)
     490        return NULL;
     491
     492    PVbuffer = PyMem_NEW(int, bufferlength);
     493    if (PVbuffer == NULL)
     494        return PyErr_NoMemory();
     495
     496    bufferlength = clQueryParams(SELF->ob_compressorHdl, PVbuffer,
     497                                 bufferlength);
     498    if (error_handler_called) {
     499        PyMem_DEL(PVbuffer);
     500        return NULL;
     501    }
     502
     503    list = PyList_New(bufferlength);
     504    if (list == NULL) {
     505        PyMem_DEL(PVbuffer);
     506        return NULL;
     507    }
     508
     509    for (i = 0; i < bufferlength; i++) {
     510        if (i & 1)
     511            PyList_SetItem(list, i, PyInt_FromLong(PVbuffer[i]));
     512        else if (PVbuffer[i] == 0) {
     513            Py_INCREF(Py_None);
     514            PyList_SetItem(list, i, Py_None);
     515        } else
     516            PyList_SetItem(list, i,
     517                       PyString_FromString((char *) PVbuffer[i]));
     518    }
     519
     520    PyMem_DEL(PVbuffer);
     521
     522    return list;
    523523}
    524524
     
    526526clm_GetMinMax(PyObject *self, PyObject *args)
    527527{
    528         int param, min, max;
    529         float fmin, fmax;
    530 
    531         CheckCompressor(SELF);
    532 
    533         if (!PyArg_Parse(args, "i", &param))
    534                 return NULL;
    535 
    536         clGetMinMax(SELF->ob_compressorHdl, param, &min, &max);
    537 
    538         if (param_type_is_float(SELF, param) > 0) {
    539                 fmin = CL_TypeIsFloat(min);
    540                 fmax = CL_TypeIsFloat(max);
    541                 return Py_BuildValue("(ff)", fmin, fmax);
    542         }
    543 
    544         return Py_BuildValue("(ii)", min, max);
     528    int param, min, max;
     529    float fmin, fmax;
     530
     531    CheckCompressor(SELF);
     532
     533    if (!PyArg_Parse(args, "i", &param))
     534        return NULL;
     535
     536    clGetMinMax(SELF->ob_compressorHdl, param, &min, &max);
     537
     538    if (param_type_is_float(SELF, param) > 0) {
     539        fmin = CL_TypeIsFloat(min);
     540        fmax = CL_TypeIsFloat(max);
     541        return Py_BuildValue("(ff)", fmin, fmax);
     542    }
     543
     544    return Py_BuildValue("(ii)", min, max);
    545545}
    546546
     
    548548clm_GetName(PyObject *self, PyObject *args)
    549549{
    550         int param;
    551         char *name;
    552 
    553         CheckCompressor(SELF);
    554 
    555         if (!PyArg_Parse(args, "i", &param))
    556                 return NULL;
    557 
    558         error_handler_called = 0;
    559         name = clGetName(SELF->ob_compressorHdl, param);
    560         if (name == NULL || error_handler_called) {
    561                 if (!error_handler_called)
    562                         PyErr_SetString(ClError, "getname failed");
    563                 return NULL;
    564         }
    565 
    566         return PyString_FromString(name);
     550    int param;
     551    char *name;
     552
     553    CheckCompressor(SELF);
     554
     555    if (!PyArg_Parse(args, "i", &param))
     556        return NULL;
     557
     558    error_handler_called = 0;
     559    name = clGetName(SELF->ob_compressorHdl, param);
     560    if (name == NULL || error_handler_called) {
     561        if (!error_handler_called)
     562            PyErr_SetString(ClError, "getname failed");
     563        return NULL;
     564    }
     565
     566    return PyString_FromString(name);
    567567}
    568568
     
    570570clm_QuerySchemeFromHandle(PyObject *self)
    571571{
    572         CheckCompressor(SELF);
    573         return PyInt_FromLong(clQuerySchemeFromHandle(SELF->ob_compressorHdl));
     572    CheckCompressor(SELF);
     573    return PyInt_FromLong(clQuerySchemeFromHandle(SELF->ob_compressorHdl));
    574574}
    575575
     
    577577clm_ReadHeader(PyObject *self, PyObject *args)
    578578{
    579         char *header;
    580         int headerSize;
    581 
    582         CheckCompressor(SELF);
    583 
    584         if (!PyArg_Parse(args, "s#", &header, &headerSize))
    585                 return NULL;
    586 
    587         return PyInt_FromLong(clReadHeader(SELF->ob_compressorHdl,
    588                                            headerSize, header));
     579    char *header;
     580    int headerSize;
     581
     582    CheckCompressor(SELF);
     583
     584    if (!PyArg_Parse(args, "s#", &header, &headerSize))
     585        return NULL;
     586
     587    return PyInt_FromLong(clReadHeader(SELF->ob_compressorHdl,
     588                                       headerSize, header));
    589589}
    590590
    591591static PyMethodDef compressor_methods[] = {
    592         {"close",               clm_CloseCompressor, METH_NOARGS}, /* alias */
    593         {"CloseCompressor",     clm_CloseCompressor, METH_NOARGS},
    594         {"Compress",            clm_Compress, METH_OLDARGS},
    595         {"GetDefault",          clm_GetDefault, METH_OLDARGS},
    596         {"GetMinMax",           clm_GetMinMax, METH_OLDARGS},
    597         {"GetName",             clm_GetName, METH_OLDARGS},
    598         {"GetParam",            clm_GetParam, METH_OLDARGS},
    599         {"GetParamID",          clm_GetParamID, METH_OLDARGS},
    600         {"GetParams",           clm_GetParams, METH_OLDARGS},
    601         {"QueryParams",         clm_QueryParams, METH_NOARGS},
    602         {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_NOARGS},
    603         {"SetParam",            clm_SetParam, METH_OLDARGS},
    604         {"SetParams",           clm_SetParams, METH_OLDARGS},
    605         {NULL,                  NULL}           /* sentinel */
     592    {"close",                   clm_CloseCompressor, METH_NOARGS}, /* alias */
     593    {"CloseCompressor",         clm_CloseCompressor, METH_NOARGS},
     594    {"Compress",                clm_Compress, METH_OLDARGS},
     595    {"GetDefault",              clm_GetDefault, METH_OLDARGS},
     596    {"GetMinMax",               clm_GetMinMax, METH_OLDARGS},
     597    {"GetName",                 clm_GetName, METH_OLDARGS},
     598    {"GetParam",                clm_GetParam, METH_OLDARGS},
     599    {"GetParamID",              clm_GetParamID, METH_OLDARGS},
     600    {"GetParams",               clm_GetParams, METH_OLDARGS},
     601    {"QueryParams",             clm_QueryParams, METH_NOARGS},
     602    {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_NOARGS},
     603    {"SetParam",                clm_SetParam, METH_OLDARGS},
     604    {"SetParams",               clm_SetParams, METH_OLDARGS},
     605    {NULL,                      NULL}           /* sentinel */
    606606};
    607607
    608608static PyMethodDef decompressor_methods[] = {
    609         {"close",               clm_CloseDecompressor, METH_NOARGS},    /* alias */
    610         {"CloseDecompressor",   clm_CloseDecompressor, METH_NOARGS},
    611         {"Decompress",          clm_Decompress, METH_OLDARGS},
    612         {"GetDefault",          clm_GetDefault, METH_OLDARGS},
    613         {"GetMinMax",           clm_GetMinMax, METH_OLDARGS},
    614         {"GetName",             clm_GetName, METH_OLDARGS},
    615         {"GetParam",            clm_GetParam, METH_OLDARGS},
    616         {"GetParamID",          clm_GetParamID, METH_OLDARGS},
    617         {"GetParams",           clm_GetParams, METH_OLDARGS},
    618         {"ReadHeader",          clm_ReadHeader, METH_OLDARGS},
    619         {"QueryParams",         clm_QueryParams, METH_NOARGS},
    620         {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_NOARGS},
    621         {"SetParam",            clm_SetParam, METH_OLDARGS},
    622         {"SetParams",           clm_SetParams, METH_OLDARGS},
    623         {NULL,                  NULL}           /* sentinel */
     609    {"close",                   clm_CloseDecompressor, METH_NOARGS},    /* alias */
     610    {"CloseDecompressor",       clm_CloseDecompressor, METH_NOARGS},
     611    {"Decompress",              clm_Decompress, METH_OLDARGS},
     612    {"GetDefault",              clm_GetDefault, METH_OLDARGS},
     613    {"GetMinMax",               clm_GetMinMax, METH_OLDARGS},
     614    {"GetName",                 clm_GetName, METH_OLDARGS},
     615    {"GetParam",                clm_GetParam, METH_OLDARGS},
     616    {"GetParamID",              clm_GetParamID, METH_OLDARGS},
     617    {"GetParams",               clm_GetParams, METH_OLDARGS},
     618    {"ReadHeader",              clm_ReadHeader, METH_OLDARGS},
     619    {"QueryParams",             clm_QueryParams, METH_NOARGS},
     620    {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_NOARGS},
     621    {"SetParam",                clm_SetParam, METH_OLDARGS},
     622    {"SetParams",               clm_SetParams, METH_OLDARGS},
     623    {NULL,                      NULL}           /* sentinel */
    624624};
    625625
     
    627627cl_dealloc(PyObject *self)
    628628{
    629         if (SELF->ob_compressorHdl) {
    630                 if (SELF->ob_isCompressor)
    631                         clCloseCompressor(SELF->ob_compressorHdl);
    632                 else
    633                         clCloseDecompressor(SELF->ob_compressorHdl);
    634         }
    635         PyObject_Del(self);
     629    if (SELF->ob_compressorHdl) {
     630        if (SELF->ob_isCompressor)
     631            clCloseCompressor(SELF->ob_compressorHdl);
     632        else
     633            clCloseDecompressor(SELF->ob_compressorHdl);
     634    }
     635    PyObject_Del(self);
    636636}
    637637
     
    639639cl_getattr(PyObject *self, char *name)
    640640{
    641         if (SELF->ob_isCompressor)
    642                 return Py_FindMethod(compressor_methods, self, name);
    643         else
    644                 return Py_FindMethod(decompressor_methods, self, name);
     641    if (SELF->ob_isCompressor)
     642        return Py_FindMethod(compressor_methods, self, name);
     643    else
     644        return Py_FindMethod(decompressor_methods, self, name);
    645645}
    646646
    647647static PyTypeObject Cltype = {
    648         PyObject_HEAD_INIT(&PyType_Type)
    649         0,                      /*ob_size*/
    650         "cl.cl",                /*tp_name*/
    651         sizeof(clobject),       /*tp_size*/
    652         0,                      /*tp_itemsize*/
    653         /* methods */
    654         (destructor)cl_dealloc, /*tp_dealloc*/
    655         0,                      /*tp_print*/
    656         (getattrfunc)cl_getattr, /*tp_getattr*/
    657         0,                      /*tp_setattr*/
    658         0,                      /*tp_compare*/
    659         0,                      /*tp_repr*/
    660         0,                      /*tp_as_number*/
    661         0,                      /*tp_as_sequence*/
    662         0,                      /*tp_as_mapping*/
     648    PyObject_HEAD_INIT(&PyType_Type)
     649    0,                          /*ob_size*/
     650    "cl.cl",                    /*tp_name*/
     651    sizeof(clobject),           /*tp_size*/
     652    0,                          /*tp_itemsize*/
     653    /* methods */
     654    (destructor)cl_dealloc,     /*tp_dealloc*/
     655    0,                          /*tp_print*/
     656    (getattrfunc)cl_getattr, /*tp_getattr*/
     657    0,                          /*tp_setattr*/
     658    0,                          /*tp_compare*/
     659    0,                          /*tp_repr*/
     660    0,                          /*tp_as_number*/
     661    0,                          /*tp_as_sequence*/
     662    0,                          /*tp_as_mapping*/
    663663};
    664664
     
    667667       int iscompressor)
    668668{
    669         int scheme;
    670         clobject *new;
    671 
    672         if (!PyArg_ParseTuple(args, "i", &scheme))
    673                 return NULL;
    674 
    675         new = PyObject_New(clobject, &Cltype);
    676         if (new == NULL)
    677                 return NULL;
    678 
    679         new->ob_compressorHdl = NULL;
    680         new->ob_isCompressor = iscompressor;
    681         new->ob_paramtypes = NULL;
    682 
    683         error_handler_called = 0;
    684         if ((*open_func)(scheme, &new->ob_compressorHdl) == FAILURE ||
    685             error_handler_called) {
    686                 Py_DECREF(new);
    687                 if (!error_handler_called)
    688                         PyErr_SetString(ClError, "Open(De)Compressor failed");
    689                 return NULL;
    690         }
    691         return (PyObject *)new;
     669    int scheme;
     670    clobject *new;
     671
     672    if (!PyArg_ParseTuple(args, "i", &scheme))
     673        return NULL;
     674
     675    new = PyObject_New(clobject, &Cltype);
     676    if (new == NULL)
     677        return NULL;
     678
     679    new->ob_compressorHdl = NULL;
     680    new->ob_isCompressor = iscompressor;
     681    new->ob_paramtypes = NULL;
     682
     683    error_handler_called = 0;
     684    if ((*open_func)(scheme, &new->ob_compressorHdl) == FAILURE ||
     685        error_handler_called) {
     686        Py_DECREF(new);
     687        if (!error_handler_called)
     688            PyErr_SetString(ClError, "Open(De)Compressor failed");
     689        return NULL;
     690    }
     691    return (PyObject *)new;
    692692}
    693693
     
    695695cl_OpenCompressor(PyObject *self, PyObject *args)
    696696{
    697         return doOpen(self, args, clOpenCompressor, 1);
     697    return doOpen(self, args, clOpenCompressor, 1);
    698698}
    699699
     
    701701cl_OpenDecompressor(PyObject *self, PyObject *args)
    702702{
    703         return doOpen(self, args, clOpenDecompressor, 0);
     703    return doOpen(self, args, clOpenDecompressor, 0);
    704704}
    705705
     
    707707cl_QueryScheme(PyObject *self, PyObject *args)
    708708{
    709         char *header;
    710         int headerlen;
    711         int scheme;
    712 
    713         if (!PyArg_ParseTuple(args, "s#", &header, &headerlen))
    714                 return NULL;
    715 
    716         scheme = clQueryScheme(header);
    717         if (scheme < 0) {
    718                 PyErr_SetString(ClError, "unknown compression scheme");
    719                 return NULL;
    720         }
    721 
    722         return PyInt_FromLong(scheme);
     709    char *header;
     710    int headerlen;
     711    int scheme;
     712
     713    if (!PyArg_ParseTuple(args, "s#", &header, &headerlen))
     714        return NULL;
     715
     716    scheme = clQueryScheme(header);
     717    if (scheme < 0) {
     718        PyErr_SetString(ClError, "unknown compression scheme");
     719        return NULL;
     720    }
     721
     722    return PyInt_FromLong(scheme);
    723723}
    724724
     
    726726cl_QueryMaxHeaderSize(PyObject *self, PyObject *args)
    727727{
    728         int scheme;
    729 
    730         if (!PyArg_ParseTuple(args, "i", &scheme))
    731                 return NULL;
    732 
    733         return PyInt_FromLong(clQueryMaxHeaderSize(scheme));
     728    int scheme;
     729
     730    if (!PyArg_ParseTuple(args, "i", &scheme))
     731        return NULL;
     732
     733    return PyInt_FromLong(clQueryMaxHeaderSize(scheme));
    734734}
    735735
     
    737737cl_QueryAlgorithms(PyObject *self, PyObject *args)
    738738{
    739         int algorithmMediaType;
    740         int bufferlength;
    741         int *PVbuffer;
    742         PyObject *list;
    743         int i;
    744 
    745         if (!PyArg_ParseTuple(args, "i", &algorithmMediaType))
    746                 return NULL;
    747 
    748         error_handler_called = 0;
    749         bufferlength = clQueryAlgorithms(algorithmMediaType, 0, 0);
    750         if (error_handler_called)
    751                 return NULL;
    752 
    753         PVbuffer = PyMem_NEW(int, bufferlength);
    754         if (PVbuffer == NULL)
    755                 return PyErr_NoMemory();
    756 
    757         bufferlength = clQueryAlgorithms(algorithmMediaType, PVbuffer,
    758                                         bufferlength);
    759         if (error_handler_called) {
    760                 PyMem_DEL(PVbuffer);
    761                 return NULL;
    762         }
    763 
    764         list = PyList_New(bufferlength);
    765         if (list == NULL) {
    766                 PyMem_DEL(PVbuffer);
    767                 return NULL;
    768         }
    769 
    770         for (i = 0; i < bufferlength; i++) {
    771                 if (i & 1)
    772                         PyList_SetItem(list, i, PyInt_FromLong(PVbuffer[i]));
    773                 else if (PVbuffer[i] == 0) {
    774                         Py_INCREF(Py_None);
    775                         PyList_SetItem(list, i, Py_None);
    776                 } else
    777                         PyList_SetItem(list, i,
    778                                    PyString_FromString((char *) PVbuffer[i]));
    779         }
    780 
    781         PyMem_DEL(PVbuffer);
    782 
    783         return list;
     739    int algorithmMediaType;
     740    int bufferlength;
     741    int *PVbuffer;
     742    PyObject *list;
     743    int i;
     744
     745    if (!PyArg_ParseTuple(args, "i", &algorithmMediaType))
     746        return NULL;
     747
     748    error_handler_called = 0;
     749    bufferlength = clQueryAlgorithms(algorithmMediaType, 0, 0);
     750    if (error_handler_called)
     751        return NULL;
     752
     753    PVbuffer = PyMem_NEW(int, bufferlength);
     754    if (PVbuffer == NULL)
     755        return PyErr_NoMemory();
     756
     757    bufferlength = clQueryAlgorithms(algorithmMediaType, PVbuffer,
     758                                    bufferlength);
     759    if (error_handler_called) {
     760        PyMem_DEL(PVbuffer);
     761        return NULL;
     762    }
     763
     764    list = PyList_New(bufferlength);
     765    if (list == NULL) {
     766        PyMem_DEL(PVbuffer);
     767        return NULL;
     768    }
     769
     770    for (i = 0; i < bufferlength; i++) {
     771        if (i & 1)
     772            PyList_SetItem(list, i, PyInt_FromLong(PVbuffer[i]));
     773        else if (PVbuffer[i] == 0) {
     774            Py_INCREF(Py_None);
     775            PyList_SetItem(list, i, Py_None);
     776        } else
     777            PyList_SetItem(list, i,
     778                       PyString_FromString((char *) PVbuffer[i]));
     779    }
     780
     781    PyMem_DEL(PVbuffer);
     782
     783    return list;
    784784}
    785785
     
    787787cl_QuerySchemeFromName(PyObject *self, PyObject *args)
    788788{
    789         int algorithmMediaType;
    790         char *name;
    791         int scheme;
    792 
    793         if (!PyArg_ParseTuple(args, "is", &algorithmMediaType, &name))
    794                 return NULL;
    795 
    796         error_handler_called = 0;
    797         scheme = clQuerySchemeFromName(algorithmMediaType, name);
    798         if (error_handler_called) {
    799                 PyErr_SetString(ClError, "unknown compression scheme");
    800                 return NULL;
    801         }
    802 
    803         return PyInt_FromLong(scheme);
     789    int algorithmMediaType;
     790    char *name;
     791    int scheme;
     792
     793    if (!PyArg_ParseTuple(args, "is", &algorithmMediaType, &name))
     794        return NULL;
     795
     796    error_handler_called = 0;
     797    scheme = clQuerySchemeFromName(algorithmMediaType, name);
     798    if (error_handler_called) {
     799        PyErr_SetString(ClError, "unknown compression scheme");
     800        return NULL;
     801    }
     802
     803    return PyInt_FromLong(scheme);
    804804}
    805805
     
    807807cl_GetAlgorithmName(PyObject *self, PyObject *args)
    808808{
    809         int scheme;
    810         char *name;
    811 
    812         if (!PyArg_ParseTuple(args, "i", &scheme))
    813                 return NULL;
    814 
    815         name = clGetAlgorithmName(scheme);
    816         if (name == 0) {
    817                 PyErr_SetString(ClError, "unknown compression scheme");
    818                 return NULL;
    819         }
    820 
    821         return PyString_FromString(name);
     809    int scheme;
     810    char *name;
     811
     812    if (!PyArg_ParseTuple(args, "i", &scheme))
     813        return NULL;
     814
     815    name = clGetAlgorithmName(scheme);
     816    if (name == 0) {
     817        PyErr_SetString(ClError, "unknown compression scheme");
     818        return NULL;
     819    }
     820
     821    return PyString_FromString(name);
    822822}
    823823
     
    825825do_set(PyObject *self, PyObject *args, int (*func)(int, int, int))
    826826{
    827         int scheme, paramID, value;
    828         float fvalue;
    829         int is_float = 0;
    830 
    831         if (!PyArg_ParseTuple(args, "iii", &scheme, &paramID, &value)) {
    832                 PyErr_Clear();
    833                 if (!PyArg_ParseTuple(args, "iif", &scheme, &paramID, &fvalue)) {
    834                         PyErr_Clear();
    835                         PyErr_SetString(PyExc_TypeError,
    836                              "bad argument list (format '(iii)' or '(iif)')");
    837                         return NULL;
    838                 }
    839                 value = CL_TypeIsInt(fvalue);
    840                 is_float = 1;
    841         } else {
    842                 /* check some parameters which we know to be floats */
    843                 switch (scheme) {
    844                 case CL_COMPRESSION_RATIO:
    845                 case CL_SPEED:
    846                         fvalue = value;
    847                         value = CL_TypeIsInt(fvalue);
    848                         is_float = 1;
    849                         break;
    850                 }
    851         }
    852 
    853         error_handler_called = 0;
    854         value = (*func)(scheme, paramID, value);
    855         if (error_handler_called)
    856                 return NULL;
    857 
    858         if (is_float)
    859                 return PyFloat_FromDouble(CL_TypeIsFloat(value));
    860         else
    861                 return PyInt_FromLong(value);
     827    int scheme, paramID, value;
     828    float fvalue;
     829    int is_float = 0;
     830
     831    if (!PyArg_ParseTuple(args, "iii", &scheme, &paramID, &value)) {
     832        PyErr_Clear();
     833        if (!PyArg_ParseTuple(args, "iif", &scheme, &paramID, &fvalue)) {
     834            PyErr_Clear();
     835            PyErr_SetString(PyExc_TypeError,
     836                 "bad argument list (format '(iii)' or '(iif)')");
     837            return NULL;
     838        }
     839        value = CL_TypeIsInt(fvalue);
     840        is_float = 1;
     841    } else {
     842        /* check some parameters which we know to be floats */
     843        switch (scheme) {
     844        case CL_COMPRESSION_RATIO:
     845        case CL_SPEED:
     846            fvalue = value;
     847            value = CL_TypeIsInt(fvalue);
     848            is_float = 1;
     849            break;
     850        }
     851    }
     852
     853    error_handler_called = 0;
     854    value = (*func)(scheme, paramID, value);
     855    if (error_handler_called)
     856        return NULL;
     857
     858    if (is_float)
     859        return PyFloat_FromDouble(CL_TypeIsFloat(value));
     860    else
     861        return PyInt_FromLong(value);
    862862}
    863863
     
    865865cl_SetDefault(PyObject *self, PyObject *args)
    866866{
    867         return do_set(self, args, clSetDefault);
     867    return do_set(self, args, clSetDefault);
    868868}
    869869
     
    871871cl_SetMin(PyObject *self, PyObject *args)
    872872{
    873         return do_set(self, args, clSetMin);
     873    return do_set(self, args, clSetMin);
    874874}
    875875
     
    877877cl_SetMax(PyObject *self, PyObject *args)
    878878{
    879         return do_set(self, args, clSetMax);
    880 }
    881 
    882 #define func(name, handler)     \
     879    return do_set(self, args, clSetMax);
     880}
     881
     882#define func(name, handler)     \
    883883static PyObject *cl_##name(PyObject *self, PyObject *args) \
    884884{ \
    885           int x; \
    886           if (!PyArg_ParseTuple(args, "i", &x)) return NULL; \
    887           return Py##handler(CL_##name(x)); \
    888 }
    889 
    890 #define func2(name, handler)    \
     885          int x; \
     886          if (!PyArg_ParseTuple(args, "i", &x)) return NULL; \
     887          return Py##handler(CL_##name(x)); \
     888}
     889
     890#define func2(name, handler)    \
    891891static PyObject *cl_##name(PyObject *self, PyObject *args) \
    892892{ \
    893           int a1, a2; \
    894           if (!PyArg_ParseTuple(args, "ii", &a1, &a2)) return NULL; \
    895           return Py##handler(CL_##name(a1, a2)); \
     893          int a1, a2; \
     894          if (!PyArg_ParseTuple(args, "ii", &a1, &a2)) return NULL; \
     895          return Py##handler(CL_##name(a1, a2)); \
    896896}
    897897
     
    908908
    909909#ifdef CLDEBUG
    910         static PyObject *
     910    static PyObject *
    911911cvt_type(PyObject *self, PyObject *args)
    912912{
    913         int number;
    914         float fnumber;
    915 
    916         if (PyArg_Parse(args, "i", &number))
    917                 return PyFloat_FromDouble(CL_TypeIsFloat(number));
    918         else {
    919                 PyErr_Clear();
    920                 if (PyArg_Parse(args, "f", &fnumber))
    921                         return PyInt_FromLong(CL_TypeIsInt(fnumber));
    922                 return NULL;
    923         }
     913    int number;
     914    float fnumber;
     915
     916    if (PyArg_Parse(args, "i", &number))
     917        return PyFloat_FromDouble(CL_TypeIsFloat(number));
     918    else {
     919        PyErr_Clear();
     920        if (PyArg_Parse(args, "f", &fnumber))
     921            return PyInt_FromLong(CL_TypeIsInt(fnumber));
     922        return NULL;
     923    }
    924924}
    925925#endif
    926926
    927927static PyMethodDef cl_methods[] = {
    928         {"CompressImage",       cl_CompressImage, METH_VARARGS},
    929         {"DecompressImage",     cl_DecompressImage, METH_VARARGS},
    930         {"GetAlgorithmName",    cl_GetAlgorithmName, METH_VARARGS},
    931         {"OpenCompressor",      cl_OpenCompressor, METH_VARARGS},
    932         {"OpenDecompressor",    cl_OpenDecompressor, METH_VARARGS},
    933         {"QueryAlgorithms",     cl_QueryAlgorithms, METH_VARARGS},
    934         {"QueryMaxHeaderSize",  cl_QueryMaxHeaderSize, METH_VARARGS},
    935         {"QueryScheme",         cl_QueryScheme, METH_VARARGS},
    936         {"QuerySchemeFromName", cl_QuerySchemeFromName, METH_VARARGS},
    937         {"SetDefault",          cl_SetDefault, METH_VARARGS},
    938         {"SetMax",              cl_SetMax, METH_VARARGS},
    939         {"SetMin",              cl_SetMin, METH_VARARGS},
    940         {"BytesPerSample",      cl_BytesPerSample, METH_VARARGS},
    941         {"BytesPerPixel",       cl_BytesPerPixel, METH_VARARGS},
    942         {"AudioFormatName",     cl_AudioFormatName, METH_VARARGS},
    943         {"VideoFormatName",     cl_VideoFormatName, METH_VARARGS},
    944         {"AlgorithmNumber",     cl_AlgorithmNumber, METH_VARARGS},
    945         {"AlgorithmType",       cl_AlgorithmType, METH_VARARGS},
    946         {"Algorithm",           cl_Algorithm, METH_VARARGS},
    947         {"ParamNumber",         cl_ParamNumber, METH_VARARGS},
    948         {"ParamType",           cl_ParamType, METH_VARARGS},
    949         {"ParamID",             cl_ParamID, METH_VARARGS},
     928    {"CompressImage",           cl_CompressImage, METH_VARARGS},
     929    {"DecompressImage",         cl_DecompressImage, METH_VARARGS},
     930    {"GetAlgorithmName",        cl_GetAlgorithmName, METH_VARARGS},
     931    {"OpenCompressor",          cl_OpenCompressor, METH_VARARGS},
     932    {"OpenDecompressor",        cl_OpenDecompressor, METH_VARARGS},
     933    {"QueryAlgorithms",         cl_QueryAlgorithms, METH_VARARGS},
     934    {"QueryMaxHeaderSize",      cl_QueryMaxHeaderSize, METH_VARARGS},
     935    {"QueryScheme",             cl_QueryScheme, METH_VARARGS},
     936    {"QuerySchemeFromName",     cl_QuerySchemeFromName, METH_VARARGS},
     937    {"SetDefault",              cl_SetDefault, METH_VARARGS},
     938    {"SetMax",                  cl_SetMax, METH_VARARGS},
     939    {"SetMin",                  cl_SetMin, METH_VARARGS},
     940    {"BytesPerSample",          cl_BytesPerSample, METH_VARARGS},
     941    {"BytesPerPixel",           cl_BytesPerPixel, METH_VARARGS},
     942    {"AudioFormatName",         cl_AudioFormatName, METH_VARARGS},
     943    {"VideoFormatName",         cl_VideoFormatName, METH_VARARGS},
     944    {"AlgorithmNumber",         cl_AlgorithmNumber, METH_VARARGS},
     945    {"AlgorithmType",           cl_AlgorithmType, METH_VARARGS},
     946    {"Algorithm",               cl_Algorithm, METH_VARARGS},
     947    {"ParamNumber",             cl_ParamNumber, METH_VARARGS},
     948    {"ParamType",               cl_ParamType, METH_VARARGS},
     949    {"ParamID",                 cl_ParamID, METH_VARARGS},
    950950#ifdef CLDEBUG
    951         {"cvt_type",            cvt_type, METH_VARARGS},
    952 #endif
    953         {NULL,                  NULL} /* Sentinel */
     951    {"cvt_type",                cvt_type, METH_VARARGS},
     952#endif
     953    {NULL,                      NULL} /* Sentinel */
    954954};
    955955
     
    961961initcl(void)
    962962{
    963         PyObject *m, *d, *x;
    964    
     963    PyObject *m, *d, *x;
     964
    965965    if (PyErr_WarnPy3k("the cl module has been removed in "
    966966                       "Python 3.0", 2) < 0)
    967         return;
    968    
    969         m = Py_InitModule("cl", cl_methods);
    970         if (m == NULL)
    971                 return;
    972         d = PyModule_GetDict(m);
    973 
    974         ClError = PyErr_NewException("cl.error", NULL, NULL);
    975         (void) PyDict_SetItemString(d, "error", ClError);
     967    return;
     968
     969    m = Py_InitModule("cl", cl_methods);
     970    if (m == NULL)
     971        return;
     972    d = PyModule_GetDict(m);
     973
     974    ClError = PyErr_NewException("cl.error", NULL, NULL);
     975    (void) PyDict_SetItemString(d, "error", ClError);
    976976
    977977#ifdef CL_ADDED_ALGORITHM_ERROR
    978         x = PyInt_FromLong(CL_ADDED_ALGORITHM_ERROR);
    979         if (x == NULL || PyDict_SetItemString(d, "ADDED_ALGORITHM_ERROR", x) < 0)
    980                 return;
    981         Py_DECREF(x);
     978    x = PyInt_FromLong(CL_ADDED_ALGORITHM_ERROR);
     979    if (x == NULL || PyDict_SetItemString(d, "ADDED_ALGORITHM_ERROR", x) < 0)
     980        return;
     981    Py_DECREF(x);
    982982#endif
    983983#ifdef CL_ALAW
    984         x = PyInt_FromLong(CL_ALAW);
    985         if (x == NULL || PyDict_SetItemString(d, "ALAW", x) < 0)
    986                 return;
    987         Py_DECREF(x);
     984    x = PyInt_FromLong(CL_ALAW);
     985    if (x == NULL || PyDict_SetItemString(d, "ALAW", x) < 0)
     986        return;
     987    Py_DECREF(x);
    988988#endif
    989989#ifdef CL_ALGORITHM_ID
    990         x = PyInt_FromLong(CL_ALGORITHM_ID);
    991         if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_ID", x) < 0)
    992                 return;
    993         Py_DECREF(x);
     990    x = PyInt_FromLong(CL_ALGORITHM_ID);
     991    if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_ID", x) < 0)
     992        return;
     993    Py_DECREF(x);
    994994#endif
    995995#ifdef CL_ALGORITHM_TABLE_FULL
    996         x = PyInt_FromLong(CL_ALGORITHM_TABLE_FULL);
    997         if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_TABLE_FULL", x) < 0)
    998                 return;
    999         Py_DECREF(x);
     996    x = PyInt_FromLong(CL_ALGORITHM_TABLE_FULL);
     997    if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_TABLE_FULL", x) < 0)
     998        return;
     999    Py_DECREF(x);
    10001000#endif
    10011001#ifdef CL_ALGORITHM_VERSION
    1002         x = PyInt_FromLong(CL_ALGORITHM_VERSION);
    1003         if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_VERSION", x) < 0)
    1004                 return;
    1005         Py_DECREF(x);
     1002    x = PyInt_FromLong(CL_ALGORITHM_VERSION);
     1003    if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_VERSION", x) < 0)
     1004        return;
     1005    Py_DECREF(x);
    10061006#endif
    10071007#ifdef CL_ALG_AUDIO
    1008         x = PyInt_FromLong(CL_ALG_AUDIO);
    1009         if (x == NULL || PyDict_SetItemString(d, "ALG_AUDIO", x) < 0)
    1010                 return;
    1011         Py_DECREF(x);
     1008    x = PyInt_FromLong(CL_ALG_AUDIO);
     1009    if (x == NULL || PyDict_SetItemString(d, "ALG_AUDIO", x) < 0)
     1010        return;
     1011    Py_DECREF(x);
    10121012#endif
    10131013#ifdef CL_ALG_VIDEO
    1014         x = PyInt_FromLong(CL_ALG_VIDEO);
    1015         if (x == NULL || PyDict_SetItemString(d, "ALG_VIDEO", x) < 0)
    1016                 return;
    1017         Py_DECREF(x);
     1014    x = PyInt_FromLong(CL_ALG_VIDEO);
     1015    if (x == NULL || PyDict_SetItemString(d, "ALG_VIDEO", x) < 0)
     1016        return;
     1017    Py_DECREF(x);
    10181018#endif
    10191019#ifdef CL_AUDIO
    1020         x = PyInt_FromLong(CL_AUDIO);
    1021         if (x == NULL || PyDict_SetItemString(d, "AUDIO", x) < 0)
    1022                 return;
    1023         Py_DECREF(x);
     1020    x = PyInt_FromLong(CL_AUDIO);
     1021    if (x == NULL || PyDict_SetItemString(d, "AUDIO", x) < 0)
     1022        return;
     1023    Py_DECREF(x);
    10241024#endif
    10251025#ifdef CL_AWARE_BITRATE_POLICY
    1026         x = PyInt_FromLong(CL_AWARE_BITRATE_POLICY);
    1027         if (x == NULL || PyDict_SetItemString(d, "AWARE_BITRATE_POLICY", x) < 0)
    1028                 return;
    1029         Py_DECREF(x);
     1026    x = PyInt_FromLong(CL_AWARE_BITRATE_POLICY);
     1027    if (x == NULL || PyDict_SetItemString(d, "AWARE_BITRATE_POLICY", x) < 0)
     1028        return;
     1029    Py_DECREF(x);
    10301030#endif
    10311031#ifdef CL_AWARE_BITRATE_TARGET
    1032         x = PyInt_FromLong(CL_AWARE_BITRATE_TARGET);
    1033         if (x == NULL || PyDict_SetItemString(d, "AWARE_BITRATE_TARGET", x) < 0)
    1034                 return;
    1035         Py_DECREF(x);
     1032    x = PyInt_FromLong(CL_AWARE_BITRATE_TARGET);
     1033    if (x == NULL || PyDict_SetItemString(d, "AWARE_BITRATE_TARGET", x) < 0)
     1034        return;
     1035    Py_DECREF(x);
    10361036#endif
    10371037#ifdef CL_AWARE_CHANNEL_POLICY
    1038         x = PyInt_FromLong(CL_AWARE_CHANNEL_POLICY);
    1039         if (x == NULL || PyDict_SetItemString(d, "AWARE_CHANNEL_POLICY", x) < 0)
    1040                 return;
    1041         Py_DECREF(x);
     1038    x = PyInt_FromLong(CL_AWARE_CHANNEL_POLICY);
     1039    if (x == NULL || PyDict_SetItemString(d, "AWARE_CHANNEL_POLICY", x) < 0)
     1040        return;
     1041    Py_DECREF(x);
    10421042#endif
    10431043#ifdef CL_AWARE_CONST_QUAL
    1044         x = PyInt_FromLong(CL_AWARE_CONST_QUAL);
    1045         if (x == NULL || PyDict_SetItemString(d, "AWARE_CONST_QUAL", x) < 0)
    1046                 return;
    1047         Py_DECREF(x);
     1044    x = PyInt_FromLong(CL_AWARE_CONST_QUAL);
     1045    if (x == NULL || PyDict_SetItemString(d, "AWARE_CONST_QUAL", x) < 0)
     1046        return;
     1047    Py_DECREF(x);
    10481048#endif
    10491049#ifdef CL_AWARE_ERROR
    1050         x = PyInt_FromLong(CL_AWARE_ERROR);
    1051         if (x == NULL || PyDict_SetItemString(d, "AWARE_ERROR", x) < 0)
    1052                 return;
    1053         Py_DECREF(x);
     1050    x = PyInt_FromLong(CL_AWARE_ERROR);
     1051    if (x == NULL || PyDict_SetItemString(d, "AWARE_ERROR", x) < 0)
     1052        return;
     1053    Py_DECREF(x);
    10541054#endif
    10551055#ifdef CL_AWARE_FIXED_RATE
    1056         x = PyInt_FromLong(CL_AWARE_FIXED_RATE);
    1057         if (x == NULL || PyDict_SetItemString(d, "AWARE_FIXED_RATE", x) < 0)
    1058                 return;
    1059         Py_DECREF(x);
     1056    x = PyInt_FromLong(CL_AWARE_FIXED_RATE);
     1057    if (x == NULL || PyDict_SetItemString(d, "AWARE_FIXED_RATE", x) < 0)
     1058        return;
     1059    Py_DECREF(x);
    10601060#endif
    10611061#ifdef CL_AWARE_INDEPENDENT
    1062         x = PyInt_FromLong(CL_AWARE_INDEPENDENT);
    1063         if (x == NULL || PyDict_SetItemString(d, "AWARE_INDEPENDENT", x) < 0)
    1064                 return;
    1065         Py_DECREF(x);
     1062    x = PyInt_FromLong(CL_AWARE_INDEPENDENT);
     1063    if (x == NULL || PyDict_SetItemString(d, "AWARE_INDEPENDENT", x) < 0)
     1064        return;
     1065    Py_DECREF(x);
    10661066#endif
    10671067#ifdef CL_AWARE_JOINT_STEREO
    1068         x = PyInt_FromLong(CL_AWARE_JOINT_STEREO);
    1069         if (x == NULL || PyDict_SetItemString(d, "AWARE_JOINT_STEREO", x) < 0)
    1070                 return;
    1071         Py_DECREF(x);
     1068    x = PyInt_FromLong(CL_AWARE_JOINT_STEREO);
     1069    if (x == NULL || PyDict_SetItemString(d, "AWARE_JOINT_STEREO", x) < 0)
     1070        return;
     1071    Py_DECREF(x);
    10721072#endif
    10731073#ifdef CL_AWARE_LAYER
    1074         x = PyInt_FromLong(CL_AWARE_LAYER);
    1075         if (x == NULL || PyDict_SetItemString(d, "AWARE_LAYER", x) < 0)
    1076                 return;
    1077         Py_DECREF(x);
     1074    x = PyInt_FromLong(CL_AWARE_LAYER);
     1075    if (x == NULL || PyDict_SetItemString(d, "AWARE_LAYER", x) < 0)
     1076        return;
     1077    Py_DECREF(x);
    10781078#endif
    10791079#ifdef CL_AWARE_LOSSLESS
    1080         x = PyInt_FromLong(CL_AWARE_LOSSLESS);
    1081         if (x == NULL || PyDict_SetItemString(d, "AWARE_LOSSLESS", x) < 0)
    1082                 return;
    1083         Py_DECREF(x);
     1080    x = PyInt_FromLong(CL_AWARE_LOSSLESS);
     1081    if (x == NULL || PyDict_SetItemString(d, "AWARE_LOSSLESS", x) < 0)
     1082        return;
     1083    Py_DECREF(x);
    10841084#endif
    10851085#ifdef CL_AWARE_MPEG_AUDIO
    1086         x = PyInt_FromLong(CL_AWARE_MPEG_AUDIO);
    1087         if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_AUDIO", x) < 0)
    1088                 return;
    1089         Py_DECREF(x);
     1086    x = PyInt_FromLong(CL_AWARE_MPEG_AUDIO);
     1087    if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_AUDIO", x) < 0)
     1088        return;
     1089    Py_DECREF(x);
    10901090#endif
    10911091#ifdef CL_AWARE_MPEG_LAYER_I
    1092         x = PyInt_FromLong(CL_AWARE_MPEG_LAYER_I);
    1093         if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_LAYER_I", x) < 0)
    1094                 return;
    1095         Py_DECREF(x);
     1092    x = PyInt_FromLong(CL_AWARE_MPEG_LAYER_I);
     1093    if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_LAYER_I", x) < 0)
     1094        return;
     1095    Py_DECREF(x);
    10961096#endif
    10971097#ifdef CL_AWARE_MPEG_LAYER_II
    1098         x = PyInt_FromLong(CL_AWARE_MPEG_LAYER_II);
    1099         if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_LAYER_II", x) < 0)
    1100                 return;
    1101         Py_DECREF(x);
     1098    x = PyInt_FromLong(CL_AWARE_MPEG_LAYER_II);
     1099    if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_LAYER_II", x) < 0)
     1100        return;
     1101    Py_DECREF(x);
    11021102#endif
    11031103#ifdef CL_AWARE_MULTIRATE
    1104         x = PyInt_FromLong(CL_AWARE_MULTIRATE);
    1105         if (x == NULL || PyDict_SetItemString(d, "AWARE_MULTIRATE", x) < 0)
    1106                 return;
    1107         Py_DECREF(x);
     1104    x = PyInt_FromLong(CL_AWARE_MULTIRATE);
     1105    if (x == NULL || PyDict_SetItemString(d, "AWARE_MULTIRATE", x) < 0)
     1106        return;
     1107    Py_DECREF(x);
    11081108#endif
    11091109#ifdef CL_AWARE_NOISE_MARGIN
    1110         x = PyInt_FromLong(CL_AWARE_NOISE_MARGIN);
    1111         if (x == NULL || PyDict_SetItemString(d, "AWARE_NOISE_MARGIN", x) < 0)
    1112                 return;
    1113         Py_DECREF(x);
     1110    x = PyInt_FromLong(CL_AWARE_NOISE_MARGIN);
     1111    if (x == NULL || PyDict_SetItemString(d, "AWARE_NOISE_MARGIN", x) < 0)
     1112        return;
     1113    Py_DECREF(x);
    11141114#endif
    11151115#ifdef CL_AWARE_STEREO
    1116         x = PyInt_FromLong(CL_AWARE_STEREO);
    1117         if (x == NULL || PyDict_SetItemString(d, "AWARE_STEREO", x) < 0)
    1118                 return;
    1119         Py_DECREF(x);
     1116    x = PyInt_FromLong(CL_AWARE_STEREO);
     1117    if (x == NULL || PyDict_SetItemString(d, "AWARE_STEREO", x) < 0)
     1118        return;
     1119    Py_DECREF(x);
    11201120#endif
    11211121#ifdef CL_BAD_ALGORITHM_NAME
    1122         x = PyInt_FromLong(CL_BAD_ALGORITHM_NAME);
    1123         if (x == NULL || PyDict_SetItemString(d, "BAD_ALGORITHM_NAME", x) < 0)
    1124                 return;
    1125         Py_DECREF(x);
     1122    x = PyInt_FromLong(CL_BAD_ALGORITHM_NAME);
     1123    if (x == NULL || PyDict_SetItemString(d, "BAD_ALGORITHM_NAME", x) < 0)
     1124        return;
     1125    Py_DECREF(x);
    11261126#endif
    11271127#ifdef CL_BAD_ALGORITHM_TYPE
    1128         x = PyInt_FromLong(CL_BAD_ALGORITHM_TYPE);
    1129         if (x == NULL || PyDict_SetItemString(d, "BAD_ALGORITHM_TYPE", x) < 0)
    1130                 return;
    1131         Py_DECREF(x);
     1128    x = PyInt_FromLong(CL_BAD_ALGORITHM_TYPE);
     1129    if (x == NULL || PyDict_SetItemString(d, "BAD_ALGORITHM_TYPE", x) < 0)
     1130        return;
     1131    Py_DECREF(x);
    11321132#endif
    11331133#ifdef CL_BAD_BLOCK_SIZE
    1134         x = PyInt_FromLong(CL_BAD_BLOCK_SIZE);
    1135         if (x == NULL || PyDict_SetItemString(d, "BAD_BLOCK_SIZE", x) < 0)
    1136                 return;
    1137         Py_DECREF(x);
     1134    x = PyInt_FromLong(CL_BAD_BLOCK_SIZE);
     1135    if (x == NULL || PyDict_SetItemString(d, "BAD_BLOCK_SIZE", x) < 0)
     1136        return;
     1137    Py_DECREF(x);
    11381138#endif
    11391139#ifdef CL_BAD_BOARD
    1140         x = PyInt_FromLong(CL_BAD_BOARD);
    1141         if (x == NULL || PyDict_SetItemString(d, "BAD_BOARD", x) < 0)
    1142                 return;
    1143         Py_DECREF(x);
     1140    x = PyInt_FromLong(CL_BAD_BOARD);
     1141    if (x == NULL || PyDict_SetItemString(d, "BAD_BOARD", x) < 0)
     1142        return;
     1143    Py_DECREF(x);
    11441144#endif
    11451145#ifdef CL_BAD_BUFFERING
    1146         x = PyInt_FromLong(CL_BAD_BUFFERING);
    1147         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERING", x) < 0)
    1148                 return;
    1149         Py_DECREF(x);
     1146    x = PyInt_FromLong(CL_BAD_BUFFERING);
     1147    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERING", x) < 0)
     1148        return;
     1149    Py_DECREF(x);
    11501150#endif
    11511151#ifdef CL_BAD_BUFFERLENGTH_NEG
    1152         x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_NEG);
    1153         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERLENGTH_NEG", x) < 0)
    1154                 return;
    1155         Py_DECREF(x);
     1152    x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_NEG);
     1153    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERLENGTH_NEG", x) < 0)
     1154        return;
     1155    Py_DECREF(x);
    11561156#endif
    11571157#ifdef CL_BAD_BUFFERLENGTH_ODD
    1158         x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_ODD);
    1159         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERLENGTH_ODD", x) < 0)
    1160                 return;
    1161         Py_DECREF(x);
     1158    x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_ODD);
     1159    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERLENGTH_ODD", x) < 0)
     1160        return;
     1161    Py_DECREF(x);
    11621162#endif
    11631163#ifdef CL_BAD_BUFFER_EXISTS
    1164         x = PyInt_FromLong(CL_BAD_BUFFER_EXISTS);
    1165         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_EXISTS", x) < 0)
    1166                 return;
    1167         Py_DECREF(x);
     1164    x = PyInt_FromLong(CL_BAD_BUFFER_EXISTS);
     1165    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_EXISTS", x) < 0)
     1166        return;
     1167    Py_DECREF(x);
    11681168#endif
    11691169#ifdef CL_BAD_BUFFER_HANDLE
    1170         x = PyInt_FromLong(CL_BAD_BUFFER_HANDLE);
    1171         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_HANDLE", x) < 0)
    1172                 return;
    1173         Py_DECREF(x);
     1170    x = PyInt_FromLong(CL_BAD_BUFFER_HANDLE);
     1171    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_HANDLE", x) < 0)
     1172        return;
     1173    Py_DECREF(x);
    11741174#endif
    11751175#ifdef CL_BAD_BUFFER_POINTER
    1176         x = PyInt_FromLong(CL_BAD_BUFFER_POINTER);
    1177         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_POINTER", x) < 0)
    1178                 return;
    1179         Py_DECREF(x);
     1176    x = PyInt_FromLong(CL_BAD_BUFFER_POINTER);
     1177    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_POINTER", x) < 0)
     1178        return;
     1179    Py_DECREF(x);
    11801180#endif
    11811181#ifdef CL_BAD_BUFFER_QUERY_SIZE
    1182         x = PyInt_FromLong(CL_BAD_BUFFER_QUERY_SIZE);
    1183         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_QUERY_SIZE", x) < 0)
    1184                 return;
    1185         Py_DECREF(x);
     1182    x = PyInt_FromLong(CL_BAD_BUFFER_QUERY_SIZE);
     1183    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_QUERY_SIZE", x) < 0)
     1184        return;
     1185    Py_DECREF(x);
    11861186#endif
    11871187#ifdef CL_BAD_BUFFER_SIZE
    1188         x = PyInt_FromLong(CL_BAD_BUFFER_SIZE);
    1189         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_SIZE", x) < 0)
    1190                 return;
    1191         Py_DECREF(x);
     1188    x = PyInt_FromLong(CL_BAD_BUFFER_SIZE);
     1189    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_SIZE", x) < 0)
     1190        return;
     1191    Py_DECREF(x);
    11921192#endif
    11931193#ifdef CL_BAD_BUFFER_SIZE_POINTER
    1194         x = PyInt_FromLong(CL_BAD_BUFFER_SIZE_POINTER);
    1195         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_SIZE_POINTER", x) < 0)
    1196                 return;
    1197         Py_DECREF(x);
     1194    x = PyInt_FromLong(CL_BAD_BUFFER_SIZE_POINTER);
     1195    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_SIZE_POINTER", x) < 0)
     1196        return;
     1197    Py_DECREF(x);
    11981198#endif
    11991199#ifdef CL_BAD_BUFFER_TYPE
    1200         x = PyInt_FromLong(CL_BAD_BUFFER_TYPE);
    1201         if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_TYPE", x) < 0)
    1202                 return;
    1203         Py_DECREF(x);
     1200    x = PyInt_FromLong(CL_BAD_BUFFER_TYPE);
     1201    if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_TYPE", x) < 0)
     1202        return;
     1203    Py_DECREF(x);
    12041204#endif
    12051205#ifdef CL_BAD_COMPRESSION_SCHEME
    1206         x = PyInt_FromLong(CL_BAD_COMPRESSION_SCHEME);
    1207         if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSION_SCHEME", x) < 0)
    1208                 return;
    1209         Py_DECREF(x);
     1206    x = PyInt_FromLong(CL_BAD_COMPRESSION_SCHEME);
     1207    if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSION_SCHEME", x) < 0)
     1208        return;
     1209    Py_DECREF(x);
    12101210#endif
    12111211#ifdef CL_BAD_COMPRESSOR_HANDLE
    1212         x = PyInt_FromLong(CL_BAD_COMPRESSOR_HANDLE);
    1213         if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSOR_HANDLE", x) < 0)
    1214                 return;
    1215         Py_DECREF(x);
     1212    x = PyInt_FromLong(CL_BAD_COMPRESSOR_HANDLE);
     1213    if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSOR_HANDLE", x) < 0)
     1214        return;
     1215    Py_DECREF(x);
    12161216#endif
    12171217#ifdef CL_BAD_COMPRESSOR_HANDLE_POINTER
    1218         x = PyInt_FromLong(CL_BAD_COMPRESSOR_HANDLE_POINTER);
    1219         if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSOR_HANDLE_POINTER", x) < 0)
    1220                 return;
    1221         Py_DECREF(x);
     1218    x = PyInt_FromLong(CL_BAD_COMPRESSOR_HANDLE_POINTER);
     1219    if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSOR_HANDLE_POINTER", x) < 0)
     1220        return;
     1221    Py_DECREF(x);
    12221222#endif
    12231223#ifdef CL_BAD_FRAME_SIZE
    1224         x = PyInt_FromLong(CL_BAD_FRAME_SIZE);
    1225         if (x == NULL || PyDict_SetItemString(d, "BAD_FRAME_SIZE", x) < 0)
    1226                 return;
    1227         Py_DECREF(x);
     1224    x = PyInt_FromLong(CL_BAD_FRAME_SIZE);
     1225    if (x == NULL || PyDict_SetItemString(d, "BAD_FRAME_SIZE", x) < 0)
     1226        return;
     1227    Py_DECREF(x);
    12281228#endif
    12291229#ifdef CL_BAD_FUNCTIONALITY
    1230         x = PyInt_FromLong(CL_BAD_FUNCTIONALITY);
    1231         if (x == NULL || PyDict_SetItemString(d, "BAD_FUNCTIONALITY", x) < 0)
    1232                 return;
    1233         Py_DECREF(x);
     1230    x = PyInt_FromLong(CL_BAD_FUNCTIONALITY);
     1231    if (x == NULL || PyDict_SetItemString(d, "BAD_FUNCTIONALITY", x) < 0)
     1232        return;
     1233    Py_DECREF(x);
    12341234#endif
    12351235#ifdef CL_BAD_FUNCTION_POINTER
    1236         x = PyInt_FromLong(CL_BAD_FUNCTION_POINTER);
    1237         if (x == NULL || PyDict_SetItemString(d, "BAD_FUNCTION_POINTER", x) < 0)
    1238                 return;
    1239         Py_DECREF(x);
     1236    x = PyInt_FromLong(CL_BAD_FUNCTION_POINTER);
     1237    if (x == NULL || PyDict_SetItemString(d, "BAD_FUNCTION_POINTER", x) < 0)
     1238        return;
     1239    Py_DECREF(x);
    12401240#endif
    12411241#ifdef CL_BAD_HEADER_SIZE
    1242         x = PyInt_FromLong(CL_BAD_HEADER_SIZE);
    1243         if (x == NULL || PyDict_SetItemString(d, "BAD_HEADER_SIZE", x) < 0)
    1244                 return;
    1245         Py_DECREF(x);
     1242    x = PyInt_FromLong(CL_BAD_HEADER_SIZE);
     1243    if (x == NULL || PyDict_SetItemString(d, "BAD_HEADER_SIZE", x) < 0)
     1244        return;
     1245    Py_DECREF(x);
    12461246#endif
    12471247#ifdef CL_BAD_INITIAL_VALUE
    1248         x = PyInt_FromLong(CL_BAD_INITIAL_VALUE);
    1249         if (x == NULL || PyDict_SetItemString(d, "BAD_INITIAL_VALUE", x) < 0)
    1250                 return;
    1251         Py_DECREF(x);
     1248    x = PyInt_FromLong(CL_BAD_INITIAL_VALUE);
     1249    if (x == NULL || PyDict_SetItemString(d, "BAD_INITIAL_VALUE", x) < 0)
     1250        return;
     1251    Py_DECREF(x);
    12521252#endif
    12531253#ifdef CL_BAD_INTERNAL_FORMAT
    1254         x = PyInt_FromLong(CL_BAD_INTERNAL_FORMAT);
    1255         if (x == NULL || PyDict_SetItemString(d, "BAD_INTERNAL_FORMAT", x) < 0)
    1256                 return;
    1257         Py_DECREF(x);
     1254    x = PyInt_FromLong(CL_BAD_INTERNAL_FORMAT);
     1255    if (x == NULL || PyDict_SetItemString(d, "BAD_INTERNAL_FORMAT", x) < 0)
     1256        return;
     1257    Py_DECREF(x);
    12581258#endif
    12591259#ifdef CL_BAD_LICENSE
    1260         x = PyInt_FromLong(CL_BAD_LICENSE);
    1261         if (x == NULL || PyDict_SetItemString(d, "BAD_LICENSE", x) < 0)
    1262                 return;
    1263         Py_DECREF(x);
     1260    x = PyInt_FromLong(CL_BAD_LICENSE);
     1261    if (x == NULL || PyDict_SetItemString(d, "BAD_LICENSE", x) < 0)
     1262        return;
     1263    Py_DECREF(x);
    12641264#endif
    12651265#ifdef CL_BAD_MIN_GT_MAX
    1266         x = PyInt_FromLong(CL_BAD_MIN_GT_MAX);
    1267         if (x == NULL || PyDict_SetItemString(d, "BAD_MIN_GT_MAX", x) < 0)
    1268                 return;
    1269         Py_DECREF(x);
     1266    x = PyInt_FromLong(CL_BAD_MIN_GT_MAX);
     1267    if (x == NULL || PyDict_SetItemString(d, "BAD_MIN_GT_MAX", x) < 0)
     1268        return;
     1269    Py_DECREF(x);
    12701270#endif
    12711271#ifdef CL_BAD_NO_BUFFERSPACE
    1272         x = PyInt_FromLong(CL_BAD_NO_BUFFERSPACE);
    1273         if (x == NULL || PyDict_SetItemString(d, "BAD_NO_BUFFERSPACE", x) < 0)
    1274                 return;
    1275         Py_DECREF(x);
     1272    x = PyInt_FromLong(CL_BAD_NO_BUFFERSPACE);
     1273    if (x == NULL || PyDict_SetItemString(d, "BAD_NO_BUFFERSPACE", x) < 0)
     1274        return;
     1275    Py_DECREF(x);
    12761276#endif
    12771277#ifdef CL_BAD_NUMBER_OF_BLOCKS
    1278         x = PyInt_FromLong(CL_BAD_NUMBER_OF_BLOCKS);
    1279         if (x == NULL || PyDict_SetItemString(d, "BAD_NUMBER_OF_BLOCKS", x) < 0)
    1280                 return;
    1281         Py_DECREF(x);
     1278    x = PyInt_FromLong(CL_BAD_NUMBER_OF_BLOCKS);
     1279    if (x == NULL || PyDict_SetItemString(d, "BAD_NUMBER_OF_BLOCKS", x) < 0)
     1280        return;
     1281    Py_DECREF(x);
    12821282#endif
    12831283#ifdef CL_BAD_PARAM
    1284         x = PyInt_FromLong(CL_BAD_PARAM);
    1285         if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM", x) < 0)
    1286                 return;
    1287         Py_DECREF(x);
     1284    x = PyInt_FromLong(CL_BAD_PARAM);
     1285    if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM", x) < 0)
     1286        return;
     1287    Py_DECREF(x);
    12881288#endif
    12891289#ifdef CL_BAD_PARAM_ID_POINTER
    1290         x = PyInt_FromLong(CL_BAD_PARAM_ID_POINTER);
    1291         if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM_ID_POINTER", x) < 0)
    1292                 return;
    1293         Py_DECREF(x);
     1290    x = PyInt_FromLong(CL_BAD_PARAM_ID_POINTER);
     1291    if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM_ID_POINTER", x) < 0)
     1292        return;
     1293    Py_DECREF(x);
    12941294#endif
    12951295#ifdef CL_BAD_PARAM_TYPE
    1296         x = PyInt_FromLong(CL_BAD_PARAM_TYPE);
    1297         if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM_TYPE", x) < 0)
    1298                 return;
    1299         Py_DECREF(x);
     1296    x = PyInt_FromLong(CL_BAD_PARAM_TYPE);
     1297    if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM_TYPE", x) < 0)
     1298        return;
     1299    Py_DECREF(x);
    13001300#endif
    13011301#ifdef CL_BAD_POINTER
    1302         x = PyInt_FromLong(CL_BAD_POINTER);
    1303         if (x == NULL || PyDict_SetItemString(d, "BAD_POINTER", x) < 0)
    1304                 return;
    1305         Py_DECREF(x);
     1302    x = PyInt_FromLong(CL_BAD_POINTER);
     1303    if (x == NULL || PyDict_SetItemString(d, "BAD_POINTER", x) < 0)
     1304        return;
     1305    Py_DECREF(x);
    13061306#endif
    13071307#ifdef CL_BAD_PVBUFFER
    1308         x = PyInt_FromLong(CL_BAD_PVBUFFER);
    1309         if (x == NULL || PyDict_SetItemString(d, "BAD_PVBUFFER", x) < 0)
    1310                 return;
    1311         Py_DECREF(x);
     1308    x = PyInt_FromLong(CL_BAD_PVBUFFER);
     1309    if (x == NULL || PyDict_SetItemString(d, "BAD_PVBUFFER", x) < 0)
     1310        return;
     1311    Py_DECREF(x);
    13121312#endif
    13131313#ifdef CL_BAD_SCHEME_POINTER
    1314         x = PyInt_FromLong(CL_BAD_SCHEME_POINTER);
    1315         if (x == NULL || PyDict_SetItemString(d, "BAD_SCHEME_POINTER", x) < 0)
    1316                 return;
    1317         Py_DECREF(x);
     1314    x = PyInt_FromLong(CL_BAD_SCHEME_POINTER);
     1315    if (x == NULL || PyDict_SetItemString(d, "BAD_SCHEME_POINTER", x) < 0)
     1316        return;
     1317    Py_DECREF(x);
    13181318#endif
    13191319#ifdef CL_BAD_STREAM_HEADER
    1320         x = PyInt_FromLong(CL_BAD_STREAM_HEADER);
    1321         if (x == NULL || PyDict_SetItemString(d, "BAD_STREAM_HEADER", x) < 0)
    1322                 return;
    1323         Py_DECREF(x);
     1320    x = PyInt_FromLong(CL_BAD_STREAM_HEADER);
     1321    if (x == NULL || PyDict_SetItemString(d, "BAD_STREAM_HEADER", x) < 0)
     1322        return;
     1323    Py_DECREF(x);
    13241324#endif
    13251325#ifdef CL_BAD_STRING_POINTER
    1326         x = PyInt_FromLong(CL_BAD_STRING_POINTER);
    1327         if (x == NULL || PyDict_SetItemString(d, "BAD_STRING_POINTER", x) < 0)
    1328                 return;
    1329         Py_DECREF(x);
     1326    x = PyInt_FromLong(CL_BAD_STRING_POINTER);
     1327    if (x == NULL || PyDict_SetItemString(d, "BAD_STRING_POINTER", x) < 0)
     1328        return;
     1329    Py_DECREF(x);
    13301330#endif
    13311331#ifdef CL_BAD_TEXT_STRING_PTR
    1332         x = PyInt_FromLong(CL_BAD_TEXT_STRING_PTR);
    1333         if (x == NULL || PyDict_SetItemString(d, "BAD_TEXT_STRING_PTR", x) < 0)
    1334                 return;
    1335         Py_DECREF(x);
     1332    x = PyInt_FromLong(CL_BAD_TEXT_STRING_PTR);
     1333    if (x == NULL || PyDict_SetItemString(d, "BAD_TEXT_STRING_PTR", x) < 0)
     1334        return;
     1335    Py_DECREF(x);
    13361336#endif
    13371337#ifdef CL_BEST_FIT
    1338         x = PyInt_FromLong(CL_BEST_FIT);
    1339         if (x == NULL || PyDict_SetItemString(d, "BEST_FIT", x) < 0)
    1340                 return;
    1341         Py_DECREF(x);
     1338    x = PyInt_FromLong(CL_BEST_FIT);
     1339    if (x == NULL || PyDict_SetItemString(d, "BEST_FIT", x) < 0)
     1340        return;
     1341    Py_DECREF(x);
    13421342#endif
    13431343#ifdef CL_BIDIRECTIONAL
    1344         x = PyInt_FromLong(CL_BIDIRECTIONAL);
    1345         if (x == NULL || PyDict_SetItemString(d, "BIDIRECTIONAL", x) < 0)
    1346                 return;
    1347         Py_DECREF(x);
     1344    x = PyInt_FromLong(CL_BIDIRECTIONAL);
     1345    if (x == NULL || PyDict_SetItemString(d, "BIDIRECTIONAL", x) < 0)
     1346        return;
     1347    Py_DECREF(x);
    13481348#endif
    13491349#ifdef CL_BITRATE
    1350         x = PyInt_FromLong(CL_BITRATE);
    1351         if (x == NULL || PyDict_SetItemString(d, "BITRATE", x) < 0)
    1352                 return;
    1353         Py_DECREF(x);
     1350    x = PyInt_FromLong(CL_BITRATE);
     1351    if (x == NULL || PyDict_SetItemString(d, "BITRATE", x) < 0)
     1352        return;
     1353    Py_DECREF(x);
    13541354#endif
    13551355#ifdef CL_BITRATE_POLICY
    1356         x = PyInt_FromLong(CL_BITRATE_POLICY);
    1357         if (x == NULL || PyDict_SetItemString(d, "BITRATE_POLICY", x) < 0)
    1358                 return;
    1359         Py_DECREF(x);
     1356    x = PyInt_FromLong(CL_BITRATE_POLICY);
     1357    if (x == NULL || PyDict_SetItemString(d, "BITRATE_POLICY", x) < 0)
     1358        return;
     1359    Py_DECREF(x);
    13601360#endif
    13611361#ifdef CL_BITRATE_TARGET
    1362         x = PyInt_FromLong(CL_BITRATE_TARGET);
    1363         if (x == NULL || PyDict_SetItemString(d, "BITRATE_TARGET", x) < 0)
    1364                 return;
    1365         Py_DECREF(x);
     1362    x = PyInt_FromLong(CL_BITRATE_TARGET);
     1363    if (x == NULL || PyDict_SetItemString(d, "BITRATE_TARGET", x) < 0)
     1364        return;
     1365    Py_DECREF(x);
    13661366#endif
    13671367#ifdef CL_BITS_PER_COMPONENT
    1368         x = PyInt_FromLong(CL_BITS_PER_COMPONENT);
    1369         if (x == NULL || PyDict_SetItemString(d, "BITS_PER_COMPONENT", x) < 0)
    1370                 return;
    1371         Py_DECREF(x);
     1368    x = PyInt_FromLong(CL_BITS_PER_COMPONENT);
     1369    if (x == NULL || PyDict_SetItemString(d, "BITS_PER_COMPONENT", x) < 0)
     1370        return;
     1371    Py_DECREF(x);
    13721372#endif
    13731373#ifdef CL_BLENDING
    1374         x = PyInt_FromLong(CL_BLENDING);
    1375         if (x == NULL || PyDict_SetItemString(d, "BLENDING", x) < 0)
    1376                 return;
    1377         Py_DECREF(x);
     1374    x = PyInt_FromLong(CL_BLENDING);
     1375    if (x == NULL || PyDict_SetItemString(d, "BLENDING", x) < 0)
     1376        return;
     1377    Py_DECREF(x);
    13781378#endif
    13791379#ifdef CL_BLOCK_SIZE
    1380         x = PyInt_FromLong(CL_BLOCK_SIZE);
    1381         if (x == NULL || PyDict_SetItemString(d, "BLOCK_SIZE", x) < 0)
    1382                 return;
    1383         Py_DECREF(x);
     1380    x = PyInt_FromLong(CL_BLOCK_SIZE);
     1381    if (x == NULL || PyDict_SetItemString(d, "BLOCK_SIZE", x) < 0)
     1382        return;
     1383    Py_DECREF(x);
    13841384#endif
    13851385#ifdef CL_BOTTOM_UP
    1386         x = PyInt_FromLong(CL_BOTTOM_UP);
    1387         if (x == NULL || PyDict_SetItemString(d, "BOTTOM_UP", x) < 0)
    1388                 return;
    1389         Py_DECREF(x);
     1386    x = PyInt_FromLong(CL_BOTTOM_UP);
     1387    if (x == NULL || PyDict_SetItemString(d, "BOTTOM_UP", x) < 0)
     1388        return;
     1389    Py_DECREF(x);
    13901390#endif
    13911391#ifdef CL_BUFFER_NOT_CREATED
    1392         x = PyInt_FromLong(CL_BUFFER_NOT_CREATED);
    1393         if (x == NULL || PyDict_SetItemString(d, "BUFFER_NOT_CREATED", x) < 0)
    1394                 return;
    1395         Py_DECREF(x);
     1392    x = PyInt_FromLong(CL_BUFFER_NOT_CREATED);
     1393    if (x == NULL || PyDict_SetItemString(d, "BUFFER_NOT_CREATED", x) < 0)
     1394        return;
     1395    Py_DECREF(x);
    13961396#endif
    13971397#ifdef CL_BUF_COMPRESSED
    1398         x = PyInt_FromLong(CL_BUF_COMPRESSED);
    1399         if (x == NULL || PyDict_SetItemString(d, "BUF_COMPRESSED", x) < 0)
    1400                 return;
    1401         Py_DECREF(x);
     1398    x = PyInt_FromLong(CL_BUF_COMPRESSED);
     1399    if (x == NULL || PyDict_SetItemString(d, "BUF_COMPRESSED", x) < 0)
     1400        return;
     1401    Py_DECREF(x);
    14021402#endif
    14031403#ifdef CL_BUF_DATA
    1404         x = PyInt_FromLong(CL_BUF_DATA);
    1405         if (x == NULL || PyDict_SetItemString(d, "BUF_DATA", x) < 0)
    1406                 return;
    1407         Py_DECREF(x);
     1404    x = PyInt_FromLong(CL_BUF_DATA);
     1405    if (x == NULL || PyDict_SetItemString(d, "BUF_DATA", x) < 0)
     1406        return;
     1407    Py_DECREF(x);
    14081408#endif
    14091409#ifdef CL_BUF_FRAME
    1410         x = PyInt_FromLong(CL_BUF_FRAME);
    1411         if (x == NULL || PyDict_SetItemString(d, "BUF_FRAME", x) < 0)
    1412                 return;
    1413         Py_DECREF(x);
     1410    x = PyInt_FromLong(CL_BUF_FRAME);
     1411    if (x == NULL || PyDict_SetItemString(d, "BUF_FRAME", x) < 0)
     1412        return;
     1413    Py_DECREF(x);
    14141414#endif
    14151415#ifdef CL_CHANNEL_POLICY
    1416         x = PyInt_FromLong(CL_CHANNEL_POLICY);
    1417         if (x == NULL || PyDict_SetItemString(d, "CHANNEL_POLICY", x) < 0)
    1418                 return;
    1419         Py_DECREF(x);
     1416    x = PyInt_FromLong(CL_CHANNEL_POLICY);
     1417    if (x == NULL || PyDict_SetItemString(d, "CHANNEL_POLICY", x) < 0)
     1418        return;
     1419    Py_DECREF(x);
    14201420#endif
    14211421#ifdef CL_CHROMA_THRESHOLD
    1422         x = PyInt_FromLong(CL_CHROMA_THRESHOLD);
    1423         if (x == NULL || PyDict_SetItemString(d, "CHROMA_THRESHOLD", x) < 0)
    1424                 return;
    1425         Py_DECREF(x);
     1422    x = PyInt_FromLong(CL_CHROMA_THRESHOLD);
     1423    if (x == NULL || PyDict_SetItemString(d, "CHROMA_THRESHOLD", x) < 0)
     1424        return;
     1425    Py_DECREF(x);
    14261426#endif
    14271427#ifdef CL_CODEC
    1428         x = PyInt_FromLong(CL_CODEC);
    1429         if (x == NULL || PyDict_SetItemString(d, "CODEC", x) < 0)
    1430                 return;
    1431         Py_DECREF(x);
     1428    x = PyInt_FromLong(CL_CODEC);
     1429    if (x == NULL || PyDict_SetItemString(d, "CODEC", x) < 0)
     1430        return;
     1431    Py_DECREF(x);
    14321432#endif
    14331433#ifdef CL_COMPONENTS
    1434         x = PyInt_FromLong(CL_COMPONENTS);
    1435         if (x == NULL || PyDict_SetItemString(d, "COMPONENTS", x) < 0)
    1436                 return;
    1437         Py_DECREF(x);
     1434    x = PyInt_FromLong(CL_COMPONENTS);
     1435    if (x == NULL || PyDict_SetItemString(d, "COMPONENTS", x) < 0)
     1436        return;
     1437    Py_DECREF(x);
    14381438#endif
    14391439#ifdef CL_COMPRESSED_BUFFER_SIZE
    1440         x = PyInt_FromLong(CL_COMPRESSED_BUFFER_SIZE);
    1441         if (x == NULL || PyDict_SetItemString(d, "COMPRESSED_BUFFER_SIZE", x) < 0)
    1442                 return;
    1443         Py_DECREF(x);
     1440    x = PyInt_FromLong(CL_COMPRESSED_BUFFER_SIZE);
     1441    if (x == NULL || PyDict_SetItemString(d, "COMPRESSED_BUFFER_SIZE", x) < 0)
     1442        return;
     1443    Py_DECREF(x);
    14441444#endif
    14451445#ifdef CL_COMPRESSION_RATIO
    1446         x = PyInt_FromLong(CL_COMPRESSION_RATIO);
    1447         if (x == NULL || PyDict_SetItemString(d, "COMPRESSION_RATIO", x) < 0)
    1448                 return;
    1449         Py_DECREF(x);
     1446    x = PyInt_FromLong(CL_COMPRESSION_RATIO);
     1447    if (x == NULL || PyDict_SetItemString(d, "COMPRESSION_RATIO", x) < 0)
     1448        return;
     1449    Py_DECREF(x);
    14501450#endif
    14511451#ifdef CL_COMPRESSOR
    1452         x = PyInt_FromLong(CL_COMPRESSOR);
    1453         if (x == NULL || PyDict_SetItemString(d, "COMPRESSOR", x) < 0)
    1454                 return;
    1455         Py_DECREF(x);
     1452    x = PyInt_FromLong(CL_COMPRESSOR);
     1453    if (x == NULL || PyDict_SetItemString(d, "COMPRESSOR", x) < 0)
     1454        return;
     1455    Py_DECREF(x);
    14561456#endif
    14571457#ifdef CL_CONTINUOUS_BLOCK
    1458         x = PyInt_FromLong(CL_CONTINUOUS_BLOCK);
    1459         if (x == NULL || PyDict_SetItemString(d, "CONTINUOUS_BLOCK", x) < 0)
    1460                 return;
    1461         Py_DECREF(x);
     1458    x = PyInt_FromLong(CL_CONTINUOUS_BLOCK);
     1459    if (x == NULL || PyDict_SetItemString(d, "CONTINUOUS_BLOCK", x) < 0)
     1460        return;
     1461    Py_DECREF(x);
    14621462#endif
    14631463#ifdef CL_CONTINUOUS_NONBLOCK
    1464         x = PyInt_FromLong(CL_CONTINUOUS_NONBLOCK);
    1465         if (x == NULL || PyDict_SetItemString(d, "CONTINUOUS_NONBLOCK", x) < 0)
    1466                 return;
    1467         Py_DECREF(x);
     1464    x = PyInt_FromLong(CL_CONTINUOUS_NONBLOCK);
     1465    if (x == NULL || PyDict_SetItemString(d, "CONTINUOUS_NONBLOCK", x) < 0)
     1466        return;
     1467    Py_DECREF(x);
    14681468#endif
    14691469#ifdef CL_COSMO_CODEC_CONTROL
    1470         x = PyInt_FromLong(CL_COSMO_CODEC_CONTROL);
    1471         if (x == NULL || PyDict_SetItemString(d, "COSMO_CODEC_CONTROL", x) < 0)
    1472                 return;
    1473         Py_DECREF(x);
     1470    x = PyInt_FromLong(CL_COSMO_CODEC_CONTROL);
     1471    if (x == NULL || PyDict_SetItemString(d, "COSMO_CODEC_CONTROL", x) < 0)
     1472        return;
     1473    Py_DECREF(x);
    14741474#endif
    14751475#ifdef CL_COSMO_NUM_PARAMS
    1476         x = PyInt_FromLong(CL_COSMO_NUM_PARAMS);
    1477         if (x == NULL || PyDict_SetItemString(d, "COSMO_NUM_PARAMS", x) < 0)
    1478                 return;
    1479         Py_DECREF(x);
     1476    x = PyInt_FromLong(CL_COSMO_NUM_PARAMS);
     1477    if (x == NULL || PyDict_SetItemString(d, "COSMO_NUM_PARAMS", x) < 0)
     1478        return;
     1479    Py_DECREF(x);
    14801480#endif
    14811481#ifdef CL_COSMO_VALUE_BASE
    1482         x = PyInt_FromLong(CL_COSMO_VALUE_BASE);
    1483         if (x == NULL || PyDict_SetItemString(d, "COSMO_VALUE_BASE", x) < 0)
    1484                 return;
    1485         Py_DECREF(x);
     1482    x = PyInt_FromLong(CL_COSMO_VALUE_BASE);
     1483    if (x == NULL || PyDict_SetItemString(d, "COSMO_VALUE_BASE", x) < 0)
     1484        return;
     1485    Py_DECREF(x);
    14861486#endif
    14871487#ifdef CL_COSMO_VIDEO_MANUAL_CONTROL
    1488         x = PyInt_FromLong(CL_COSMO_VIDEO_MANUAL_CONTROL);
    1489         if (x == NULL || PyDict_SetItemString(d, "COSMO_VIDEO_MANUAL_CONTROL", x) < 0)
    1490                 return;
    1491         Py_DECREF(x);
     1488    x = PyInt_FromLong(CL_COSMO_VIDEO_MANUAL_CONTROL);
     1489    if (x == NULL || PyDict_SetItemString(d, "COSMO_VIDEO_MANUAL_CONTROL", x) < 0)
     1490        return;
     1491    Py_DECREF(x);
    14921492#endif
    14931493#ifdef CL_COSMO_VIDEO_TRANSFER_MODE
    1494         x = PyInt_FromLong(CL_COSMO_VIDEO_TRANSFER_MODE);
    1495         if (x == NULL || PyDict_SetItemString(d, "COSMO_VIDEO_TRANSFER_MODE", x) < 0)
    1496                 return;
    1497         Py_DECREF(x);
     1494    x = PyInt_FromLong(CL_COSMO_VIDEO_TRANSFER_MODE);
     1495    if (x == NULL || PyDict_SetItemString(d, "COSMO_VIDEO_TRANSFER_MODE", x) < 0)
     1496        return;
     1497    Py_DECREF(x);
    14981498#endif
    14991499#ifdef CL_DATA
    1500         x = PyInt_FromLong(CL_DATA);
    1501         if (x == NULL || PyDict_SetItemString(d, "DATA", x) < 0)
    1502                 return;
    1503         Py_DECREF(x);
     1500    x = PyInt_FromLong(CL_DATA);
     1501    if (x == NULL || PyDict_SetItemString(d, "DATA", x) < 0)
     1502        return;
     1503    Py_DECREF(x);
    15041504#endif
    15051505#ifdef CL_DECOMPRESSOR
    1506         x = PyInt_FromLong(CL_DECOMPRESSOR);
    1507         if (x == NULL || PyDict_SetItemString(d, "DECOMPRESSOR", x) < 0)
    1508                 return;
    1509         Py_DECREF(x);
     1506    x = PyInt_FromLong(CL_DECOMPRESSOR);
     1507    if (x == NULL || PyDict_SetItemString(d, "DECOMPRESSOR", x) < 0)
     1508        return;
     1509    Py_DECREF(x);
    15101510#endif
    15111511#ifdef CL_DSO_ERROR
    1512         x = PyInt_FromLong(CL_DSO_ERROR);
    1513         if (x == NULL || PyDict_SetItemString(d, "DSO_ERROR", x) < 0)
    1514                 return;
    1515         Py_DECREF(x);
     1512    x = PyInt_FromLong(CL_DSO_ERROR);
     1513    if (x == NULL || PyDict_SetItemString(d, "DSO_ERROR", x) < 0)
     1514        return;
     1515    Py_DECREF(x);
    15161516#endif
    15171517#ifdef CL_EDGE_THRESHOLD
    1518         x = PyInt_FromLong(CL_EDGE_THRESHOLD);
    1519         if (x == NULL || PyDict_SetItemString(d, "EDGE_THRESHOLD", x) < 0)
    1520                 return;
    1521         Py_DECREF(x);
     1518    x = PyInt_FromLong(CL_EDGE_THRESHOLD);
     1519    if (x == NULL || PyDict_SetItemString(d, "EDGE_THRESHOLD", x) < 0)
     1520        return;
     1521    Py_DECREF(x);
    15221522#endif
    15231523#ifdef CL_ENABLE_IMAGEINFO
    1524         x = PyInt_FromLong(CL_ENABLE_IMAGEINFO);
    1525         if (x == NULL || PyDict_SetItemString(d, "ENABLE_IMAGEINFO", x) < 0)
    1526                 return;
    1527         Py_DECREF(x);
     1524    x = PyInt_FromLong(CL_ENABLE_IMAGEINFO);
     1525    if (x == NULL || PyDict_SetItemString(d, "ENABLE_IMAGEINFO", x) < 0)
     1526        return;
     1527    Py_DECREF(x);
    15281528#endif
    15291529#ifdef CL_END_OF_SEQUENCE
    1530         x = PyInt_FromLong(CL_END_OF_SEQUENCE);
    1531         if (x == NULL || PyDict_SetItemString(d, "END_OF_SEQUENCE", x) < 0)
    1532                 return;
    1533         Py_DECREF(x);
     1530    x = PyInt_FromLong(CL_END_OF_SEQUENCE);
     1531    if (x == NULL || PyDict_SetItemString(d, "END_OF_SEQUENCE", x) < 0)
     1532        return;
     1533    Py_DECREF(x);
    15341534#endif
    15351535#ifdef CL_ENUM_VALUE
    1536         x = PyInt_FromLong(CL_ENUM_VALUE);
    1537         if (x == NULL || PyDict_SetItemString(d, "ENUM_VALUE", x) < 0)
    1538                 return;
    1539         Py_DECREF(x);
     1536    x = PyInt_FromLong(CL_ENUM_VALUE);
     1537    if (x == NULL || PyDict_SetItemString(d, "ENUM_VALUE", x) < 0)
     1538        return;
     1539    Py_DECREF(x);
    15401540#endif
    15411541#ifdef CL_EXACT_COMPRESSION_RATIO
    1542         x = PyInt_FromLong(CL_EXACT_COMPRESSION_RATIO);
    1543         if (x == NULL || PyDict_SetItemString(d, "EXACT_COMPRESSION_RATIO", x) < 0)
    1544                 return;
    1545         Py_DECREF(x);
     1542    x = PyInt_FromLong(CL_EXACT_COMPRESSION_RATIO);
     1543    if (x == NULL || PyDict_SetItemString(d, "EXACT_COMPRESSION_RATIO", x) < 0)
     1544        return;
     1545    Py_DECREF(x);
    15461546#endif
    15471547#ifdef CL_EXTERNAL_DEVICE
    1548         x = PyInt_FromLong((long) CL_EXTERNAL_DEVICE);
    1549         if (x == NULL || PyDict_SetItemString(d, "EXTERNAL_DEVICE", x) < 0)
    1550                 return;
    1551         Py_DECREF(x);
     1548    x = PyInt_FromLong((long) CL_EXTERNAL_DEVICE);
     1549    if (x == NULL || PyDict_SetItemString(d, "EXTERNAL_DEVICE", x) < 0)
     1550        return;
     1551    Py_DECREF(x);
    15521552#endif
    15531553#ifdef CL_FLOATING_ENUM_VALUE
    1554         x = PyInt_FromLong(CL_FLOATING_ENUM_VALUE);
    1555         if (x == NULL || PyDict_SetItemString(d, "FLOATING_ENUM_VALUE", x) < 0)
    1556                 return;
    1557         Py_DECREF(x);
     1554    x = PyInt_FromLong(CL_FLOATING_ENUM_VALUE);
     1555    if (x == NULL || PyDict_SetItemString(d, "FLOATING_ENUM_VALUE", x) < 0)
     1556        return;
     1557    Py_DECREF(x);
    15581558#endif
    15591559#ifdef CL_FLOATING_RANGE_VALUE
    1560         x = PyInt_FromLong(CL_FLOATING_RANGE_VALUE);
    1561         if (x == NULL || PyDict_SetItemString(d, "FLOATING_RANGE_VALUE", x) < 0)
    1562                 return;
    1563         Py_DECREF(x);
     1560    x = PyInt_FromLong(CL_FLOATING_RANGE_VALUE);
     1561    if (x == NULL || PyDict_SetItemString(d, "FLOATING_RANGE_VALUE", x) < 0)
     1562        return;
     1563    Py_DECREF(x);
    15641564#endif
    15651565#ifdef CL_FORMAT
    1566         x = PyInt_FromLong(CL_FORMAT);
    1567         if (x == NULL || PyDict_SetItemString(d, "FORMAT", x) < 0)
    1568                 return;
    1569         Py_DECREF(x);
     1566    x = PyInt_FromLong(CL_FORMAT);
     1567    if (x == NULL || PyDict_SetItemString(d, "FORMAT", x) < 0)
     1568        return;
     1569    Py_DECREF(x);
    15701570#endif
    15711571#ifdef CL_FORMAT_ABGR
    1572         x = PyInt_FromLong(CL_FORMAT_ABGR);
    1573         if (x == NULL || PyDict_SetItemString(d, "FORMAT_ABGR", x) < 0)
    1574                 return;
    1575         Py_DECREF(x);
     1572    x = PyInt_FromLong(CL_FORMAT_ABGR);
     1573    if (x == NULL || PyDict_SetItemString(d, "FORMAT_ABGR", x) < 0)
     1574        return;
     1575    Py_DECREF(x);
    15761576#endif
    15771577#ifdef CL_FORMAT_BGR
    1578         x = PyInt_FromLong(CL_FORMAT_BGR);
    1579         if (x == NULL || PyDict_SetItemString(d, "FORMAT_BGR", x) < 0)
    1580                 return;
    1581         Py_DECREF(x);
     1578    x = PyInt_FromLong(CL_FORMAT_BGR);
     1579    if (x == NULL || PyDict_SetItemString(d, "FORMAT_BGR", x) < 0)
     1580        return;
     1581    Py_DECREF(x);
    15821582#endif
    15831583#ifdef CL_FORMAT_BGR233
    1584         x = PyInt_FromLong(CL_FORMAT_BGR233);
    1585         if (x == NULL || PyDict_SetItemString(d, "FORMAT_BGR233", x) < 0)
    1586                 return;
    1587         Py_DECREF(x);
     1584    x = PyInt_FromLong(CL_FORMAT_BGR233);
     1585    if (x == NULL || PyDict_SetItemString(d, "FORMAT_BGR233", x) < 0)
     1586        return;
     1587    Py_DECREF(x);
    15881588#endif
    15891589#ifdef CL_FORMAT_GRAYSCALE
    1590         x = PyInt_FromLong(CL_FORMAT_GRAYSCALE);
    1591         if (x == NULL || PyDict_SetItemString(d, "FORMAT_GRAYSCALE", x) < 0)
    1592                 return;
    1593         Py_DECREF(x);
     1590    x = PyInt_FromLong(CL_FORMAT_GRAYSCALE);
     1591    if (x == NULL || PyDict_SetItemString(d, "FORMAT_GRAYSCALE", x) < 0)
     1592        return;
     1593    Py_DECREF(x);
    15941594#endif
    15951595#ifdef CL_FORMAT_MONO
    1596         x = PyInt_FromLong(CL_FORMAT_MONO);
    1597         if (x == NULL || PyDict_SetItemString(d, "FORMAT_MONO", x) < 0)
    1598                 return;
    1599         Py_DECREF(x);
     1596    x = PyInt_FromLong(CL_FORMAT_MONO);
     1597    if (x == NULL || PyDict_SetItemString(d, "FORMAT_MONO", x) < 0)
     1598        return;
     1599    Py_DECREF(x);
    16001600#endif
    16011601#ifdef CL_FORMAT_RBG323
    1602         x = PyInt_FromLong(CL_FORMAT_RBG323);
    1603         if (x == NULL || PyDict_SetItemString(d, "FORMAT_RBG323", x) < 0)
    1604                 return;
    1605         Py_DECREF(x);
     1602    x = PyInt_FromLong(CL_FORMAT_RBG323);
     1603    if (x == NULL || PyDict_SetItemString(d, "FORMAT_RBG323", x) < 0)
     1604        return;
     1605    Py_DECREF(x);
    16061606#endif
    16071607#ifdef CL_FORMAT_STEREO_INTERLEAVED
    1608         x = PyInt_FromLong(CL_FORMAT_STEREO_INTERLEAVED);
    1609         if (x == NULL || PyDict_SetItemString(d, "FORMAT_STEREO_INTERLEAVED", x) < 0)
    1610                 return;
    1611         Py_DECREF(x);
     1608    x = PyInt_FromLong(CL_FORMAT_STEREO_INTERLEAVED);
     1609    if (x == NULL || PyDict_SetItemString(d, "FORMAT_STEREO_INTERLEAVED", x) < 0)
     1610        return;
     1611    Py_DECREF(x);
    16121612#endif
    16131613#ifdef CL_FORMAT_XBGR
    1614         x = PyInt_FromLong(CL_FORMAT_XBGR);
    1615         if (x == NULL || PyDict_SetItemString(d, "FORMAT_XBGR", x) < 0)
    1616                 return;
    1617         Py_DECREF(x);
     1614    x = PyInt_FromLong(CL_FORMAT_XBGR);
     1615    if (x == NULL || PyDict_SetItemString(d, "FORMAT_XBGR", x) < 0)
     1616        return;
     1617    Py_DECREF(x);
    16181618#endif
    16191619#ifdef CL_FORMAT_YCbCr
    1620         x = PyInt_FromLong(CL_FORMAT_YCbCr);
    1621         if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr", x) < 0)
    1622                 return;
    1623         Py_DECREF(x);
     1620    x = PyInt_FromLong(CL_FORMAT_YCbCr);
     1621    if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr", x) < 0)
     1622        return;
     1623    Py_DECREF(x);
    16241624#endif
    16251625#ifdef CL_FORMAT_YCbCr422
    1626         x = PyInt_FromLong(CL_FORMAT_YCbCr422);
    1627         if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr422", x) < 0)
    1628                 return;
    1629         Py_DECREF(x);
     1626    x = PyInt_FromLong(CL_FORMAT_YCbCr422);
     1627    if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr422", x) < 0)
     1628        return;
     1629    Py_DECREF(x);
    16301630#endif
    16311631#ifdef CL_FORMAT_YCbCr422DC
    1632         x = PyInt_FromLong(CL_FORMAT_YCbCr422DC);
    1633         if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr422DC", x) < 0)
    1634                 return;
    1635         Py_DECREF(x);
     1632    x = PyInt_FromLong(CL_FORMAT_YCbCr422DC);
     1633    if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr422DC", x) < 0)
     1634        return;
     1635    Py_DECREF(x);
    16361636#endif
    16371637#ifdef CL_FRAME
    1638         x = PyInt_FromLong(CL_FRAME);
    1639         if (x == NULL || PyDict_SetItemString(d, "FRAME", x) < 0)
    1640                 return;
    1641         Py_DECREF(x);
     1638    x = PyInt_FromLong(CL_FRAME);
     1639    if (x == NULL || PyDict_SetItemString(d, "FRAME", x) < 0)
     1640        return;
     1641    Py_DECREF(x);
    16421642#endif
    16431643#ifdef CL_FRAMES_PER_CHUNK
    1644         x = PyInt_FromLong(CL_FRAMES_PER_CHUNK);
    1645         if (x == NULL || PyDict_SetItemString(d, "FRAMES_PER_CHUNK", x) < 0)
    1646                 return;
    1647         Py_DECREF(x);
     1644    x = PyInt_FromLong(CL_FRAMES_PER_CHUNK);
     1645    if (x == NULL || PyDict_SetItemString(d, "FRAMES_PER_CHUNK", x) < 0)
     1646        return;
     1647    Py_DECREF(x);
    16481648#endif
    16491649#ifdef CL_FRAME_BUFFER_SIZE
    1650         x = PyInt_FromLong(CL_FRAME_BUFFER_SIZE);
    1651         if (x == NULL || PyDict_SetItemString(d, "FRAME_BUFFER_SIZE", x) < 0)
    1652                 return;
    1653         Py_DECREF(x);
     1650    x = PyInt_FromLong(CL_FRAME_BUFFER_SIZE);
     1651    if (x == NULL || PyDict_SetItemString(d, "FRAME_BUFFER_SIZE", x) < 0)
     1652        return;
     1653    Py_DECREF(x);
    16541654#endif
    16551655#ifdef CL_FRAME_BUFFER_SIZE_ZERO
    1656         x = PyInt_FromLong(CL_FRAME_BUFFER_SIZE_ZERO);
    1657         if (x == NULL || PyDict_SetItemString(d, "FRAME_BUFFER_SIZE_ZERO", x) < 0)
    1658                 return;
    1659         Py_DECREF(x);
     1656    x = PyInt_FromLong(CL_FRAME_BUFFER_SIZE_ZERO);
     1657    if (x == NULL || PyDict_SetItemString(d, "FRAME_BUFFER_SIZE_ZERO", x) < 0)
     1658        return;
     1659    Py_DECREF(x);
    16601660#endif
    16611661#ifdef CL_FRAME_INDEX
    1662         x = PyInt_FromLong(CL_FRAME_INDEX);
    1663         if (x == NULL || PyDict_SetItemString(d, "FRAME_INDEX", x) < 0)
    1664                 return;
    1665         Py_DECREF(x);
     1662    x = PyInt_FromLong(CL_FRAME_INDEX);
     1663    if (x == NULL || PyDict_SetItemString(d, "FRAME_INDEX", x) < 0)
     1664        return;
     1665    Py_DECREF(x);
    16661666#endif
    16671667#ifdef CL_FRAME_RATE
    1668         x = PyInt_FromLong(CL_FRAME_RATE);
    1669         if (x == NULL || PyDict_SetItemString(d, "FRAME_RATE", x) < 0)
    1670                 return;
    1671         Py_DECREF(x);
     1668    x = PyInt_FromLong(CL_FRAME_RATE);
     1669    if (x == NULL || PyDict_SetItemString(d, "FRAME_RATE", x) < 0)
     1670        return;
     1671    Py_DECREF(x);
    16721672#endif
    16731673#ifdef CL_FRAME_SIZE
    1674         x = PyInt_FromLong(CL_FRAME_SIZE);
    1675         if (x == NULL || PyDict_SetItemString(d, "FRAME_SIZE", x) < 0)
    1676                 return;
    1677         Py_DECREF(x);
     1674    x = PyInt_FromLong(CL_FRAME_SIZE);
     1675    if (x == NULL || PyDict_SetItemString(d, "FRAME_SIZE", x) < 0)
     1676        return;
     1677    Py_DECREF(x);
    16781678#endif
    16791679#ifdef CL_FRAME_TYPE
    1680         x = PyInt_FromLong(CL_FRAME_TYPE);
    1681         if (x == NULL || PyDict_SetItemString(d, "FRAME_TYPE", x) < 0)
    1682                 return;
    1683         Py_DECREF(x);
     1680    x = PyInt_FromLong(CL_FRAME_TYPE);
     1681    if (x == NULL || PyDict_SetItemString(d, "FRAME_TYPE", x) < 0)
     1682        return;
     1683    Py_DECREF(x);
    16841684#endif
    16851685#ifdef CL_G711_ALAW
    1686         x = PyInt_FromLong(CL_G711_ALAW);
    1687         if (x == NULL || PyDict_SetItemString(d, "G711_ALAW", x) < 0)
    1688                 return;
    1689         Py_DECREF(x);
     1686    x = PyInt_FromLong(CL_G711_ALAW);
     1687    if (x == NULL || PyDict_SetItemString(d, "G711_ALAW", x) < 0)
     1688        return;
     1689    Py_DECREF(x);
    16901690#endif
    16911691#ifdef CL_G711_ALAW_SOFTWARE
    1692         x = PyInt_FromLong(CL_G711_ALAW_SOFTWARE);
    1693         if (x == NULL || PyDict_SetItemString(d, "G711_ALAW_SOFTWARE", x) < 0)
    1694                 return;
    1695         Py_DECREF(x);
     1692    x = PyInt_FromLong(CL_G711_ALAW_SOFTWARE);
     1693    if (x == NULL || PyDict_SetItemString(d, "G711_ALAW_SOFTWARE", x) < 0)
     1694        return;
     1695    Py_DECREF(x);
    16961696#endif
    16971697#ifdef CL_G711_ULAW
    1698         x = PyInt_FromLong(CL_G711_ULAW);
    1699         if (x == NULL || PyDict_SetItemString(d, "G711_ULAW", x) < 0)
    1700                 return;
    1701         Py_DECREF(x);
     1698    x = PyInt_FromLong(CL_G711_ULAW);
     1699    if (x == NULL || PyDict_SetItemString(d, "G711_ULAW", x) < 0)
     1700        return;
     1701    Py_DECREF(x);
    17021702#endif
    17031703#ifdef CL_G711_ULAW_SOFTWARE
    1704         x = PyInt_FromLong(CL_G711_ULAW_SOFTWARE);
    1705         if (x == NULL || PyDict_SetItemString(d, "G711_ULAW_SOFTWARE", x) < 0)
    1706                 return;
    1707         Py_DECREF(x);
     1704    x = PyInt_FromLong(CL_G711_ULAW_SOFTWARE);
     1705    if (x == NULL || PyDict_SetItemString(d, "G711_ULAW_SOFTWARE", x) < 0)
     1706        return;
     1707    Py_DECREF(x);
    17081708#endif
    17091709#ifdef CL_GRAYSCALE
    1710         x = PyInt_FromLong(CL_GRAYSCALE);
    1711         if (x == NULL || PyDict_SetItemString(d, "GRAYSCALE", x) < 0)
    1712                 return;
    1713         Py_DECREF(x);
     1710    x = PyInt_FromLong(CL_GRAYSCALE);
     1711    if (x == NULL || PyDict_SetItemString(d, "GRAYSCALE", x) < 0)
     1712        return;
     1713    Py_DECREF(x);
    17141714#endif
    17151715#ifdef CL_HDCC
    1716         x = PyInt_FromLong(CL_HDCC);
    1717         if (x == NULL || PyDict_SetItemString(d, "HDCC", x) < 0)
    1718                 return;
    1719         Py_DECREF(x);
     1716    x = PyInt_FromLong(CL_HDCC);
     1717    if (x == NULL || PyDict_SetItemString(d, "HDCC", x) < 0)
     1718        return;
     1719    Py_DECREF(x);
    17201720#endif
    17211721#ifdef CL_HDCC_SAMPLES_PER_TILE
    1722         x = PyInt_FromLong(CL_HDCC_SAMPLES_PER_TILE);
    1723         if (x == NULL || PyDict_SetItemString(d, "HDCC_SAMPLES_PER_TILE", x) < 0)
    1724                 return;
    1725         Py_DECREF(x);
     1722    x = PyInt_FromLong(CL_HDCC_SAMPLES_PER_TILE);
     1723    if (x == NULL || PyDict_SetItemString(d, "HDCC_SAMPLES_PER_TILE", x) < 0)
     1724        return;
     1725    Py_DECREF(x);
    17261726#endif
    17271727#ifdef CL_HDCC_SOFTWARE
    1728         x = PyInt_FromLong(CL_HDCC_SOFTWARE);
    1729         if (x == NULL || PyDict_SetItemString(d, "HDCC_SOFTWARE", x) < 0)
    1730                 return;
    1731         Py_DECREF(x);
     1728    x = PyInt_FromLong(CL_HDCC_SOFTWARE);
     1729    if (x == NULL || PyDict_SetItemString(d, "HDCC_SOFTWARE", x) < 0)
     1730        return;
     1731    Py_DECREF(x);
    17321732#endif
    17331733#ifdef CL_HDCC_TILE_THRESHOLD
    1734         x = PyInt_FromLong(CL_HDCC_TILE_THRESHOLD);
    1735         if (x == NULL || PyDict_SetItemString(d, "HDCC_TILE_THRESHOLD", x) < 0)
    1736                 return;
    1737         Py_DECREF(x);
     1734    x = PyInt_FromLong(CL_HDCC_TILE_THRESHOLD);
     1735    if (x == NULL || PyDict_SetItemString(d, "HDCC_TILE_THRESHOLD", x) < 0)
     1736        return;
     1737    Py_DECREF(x);
    17381738#endif
    17391739#ifdef CL_HEADER_START_CODE
    1740         x = PyInt_FromLong(CL_HEADER_START_CODE);
    1741         if (x == NULL || PyDict_SetItemString(d, "HEADER_START_CODE", x) < 0)
    1742                 return;
    1743         Py_DECREF(x);
     1740    x = PyInt_FromLong(CL_HEADER_START_CODE);
     1741    if (x == NULL || PyDict_SetItemString(d, "HEADER_START_CODE", x) < 0)
     1742        return;
     1743    Py_DECREF(x);
    17441744#endif
    17451745#ifdef CL_IMAGEINFO_FIELDMASK
    1746         x = PyInt_FromLong(CL_IMAGEINFO_FIELDMASK);
    1747         if (x == NULL || PyDict_SetItemString(d, "IMAGEINFO_FIELDMASK", x) < 0)
    1748                 return;
    1749         Py_DECREF(x);
     1746    x = PyInt_FromLong(CL_IMAGEINFO_FIELDMASK);
     1747    if (x == NULL || PyDict_SetItemString(d, "IMAGEINFO_FIELDMASK", x) < 0)
     1748        return;
     1749    Py_DECREF(x);
    17501750#endif
    17511751#ifdef CL_IMAGE_CROP_BOTTOM
    1752         x = PyInt_FromLong(CL_IMAGE_CROP_BOTTOM);
    1753         if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_BOTTOM", x) < 0)
    1754                 return;
    1755         Py_DECREF(x);
     1752    x = PyInt_FromLong(CL_IMAGE_CROP_BOTTOM);
     1753    if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_BOTTOM", x) < 0)
     1754        return;
     1755    Py_DECREF(x);
    17561756#endif
    17571757#ifdef CL_IMAGE_CROP_LEFT
    1758         x = PyInt_FromLong(CL_IMAGE_CROP_LEFT);
    1759         if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_LEFT", x) < 0)
    1760                 return;
    1761         Py_DECREF(x);
     1758    x = PyInt_FromLong(CL_IMAGE_CROP_LEFT);
     1759    if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_LEFT", x) < 0)
     1760        return;
     1761    Py_DECREF(x);
    17621762#endif
    17631763#ifdef CL_IMAGE_CROP_RIGHT
    1764         x = PyInt_FromLong(CL_IMAGE_CROP_RIGHT);
    1765         if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_RIGHT", x) < 0)
    1766                 return;
    1767         Py_DECREF(x);
     1764    x = PyInt_FromLong(CL_IMAGE_CROP_RIGHT);
     1765    if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_RIGHT", x) < 0)
     1766        return;
     1767    Py_DECREF(x);
    17681768#endif
    17691769#ifdef CL_IMAGE_CROP_TOP
    1770         x = PyInt_FromLong(CL_IMAGE_CROP_TOP);
    1771         if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_TOP", x) < 0)
    1772                 return;
    1773         Py_DECREF(x);
     1770    x = PyInt_FromLong(CL_IMAGE_CROP_TOP);
     1771    if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_TOP", x) < 0)
     1772        return;
     1773    Py_DECREF(x);
    17741774#endif
    17751775#ifdef CL_IMAGE_HEIGHT
    1776         x = PyInt_FromLong(CL_IMAGE_HEIGHT);
    1777         if (x == NULL || PyDict_SetItemString(d, "IMAGE_HEIGHT", x) < 0)
    1778                 return;
    1779         Py_DECREF(x);
     1776    x = PyInt_FromLong(CL_IMAGE_HEIGHT);
     1777    if (x == NULL || PyDict_SetItemString(d, "IMAGE_HEIGHT", x) < 0)
     1778        return;
     1779    Py_DECREF(x);
    17801780#endif
    17811781#ifdef CL_IMAGE_WIDTH
    1782         x = PyInt_FromLong(CL_IMAGE_WIDTH);
    1783         if (x == NULL || PyDict_SetItemString(d, "IMAGE_WIDTH", x) < 0)
    1784                 return;
    1785         Py_DECREF(x);
     1782    x = PyInt_FromLong(CL_IMAGE_WIDTH);
     1783    if (x == NULL || PyDict_SetItemString(d, "IMAGE_WIDTH", x) < 0)
     1784        return;
     1785    Py_DECREF(x);
    17861786#endif
    17871787#ifdef CL_IMPACT_CODEC_CONTROL
    1788         x = PyInt_FromLong(CL_IMPACT_CODEC_CONTROL);
    1789         if (x == NULL || PyDict_SetItemString(d, "IMPACT_CODEC_CONTROL", x) < 0)
    1790                 return;
    1791         Py_DECREF(x);
     1788    x = PyInt_FromLong(CL_IMPACT_CODEC_CONTROL);
     1789    if (x == NULL || PyDict_SetItemString(d, "IMPACT_CODEC_CONTROL", x) < 0)
     1790        return;
     1791    Py_DECREF(x);
    17921792#endif
    17931793#ifdef CL_IMPACT_FRAME_INTERLEAVE
    1794         x = PyInt_FromLong(CL_IMPACT_FRAME_INTERLEAVE);
    1795         if (x == NULL || PyDict_SetItemString(d, "IMPACT_FRAME_INTERLEAVE", x) < 0)
    1796                 return;
    1797         Py_DECREF(x);
     1794    x = PyInt_FromLong(CL_IMPACT_FRAME_INTERLEAVE);
     1795    if (x == NULL || PyDict_SetItemString(d, "IMPACT_FRAME_INTERLEAVE", x) < 0)
     1796        return;
     1797    Py_DECREF(x);
    17981798#endif
    17991799#ifdef CL_IMPACT_NUM_PARAMS
    1800         x = PyInt_FromLong(CL_IMPACT_NUM_PARAMS);
    1801         if (x == NULL || PyDict_SetItemString(d, "IMPACT_NUM_PARAMS", x) < 0)
    1802                 return;
    1803         Py_DECREF(x);
     1800    x = PyInt_FromLong(CL_IMPACT_NUM_PARAMS);
     1801    if (x == NULL || PyDict_SetItemString(d, "IMPACT_NUM_PARAMS", x) < 0)
     1802        return;
     1803    Py_DECREF(x);
    18041804#endif
    18051805#ifdef CL_INTERNAL_FORMAT
    1806         x = PyInt_FromLong(CL_INTERNAL_FORMAT);
    1807         if (x == NULL || PyDict_SetItemString(d, "INTERNAL_FORMAT", x) < 0)
    1808                 return;
    1809         Py_DECREF(x);
     1806    x = PyInt_FromLong(CL_INTERNAL_FORMAT);
     1807    if (x == NULL || PyDict_SetItemString(d, "INTERNAL_FORMAT", x) < 0)
     1808        return;
     1809    Py_DECREF(x);
    18101810#endif
    18111811#ifdef CL_INTERNAL_IMAGE_HEIGHT
    1812         x = PyInt_FromLong(CL_INTERNAL_IMAGE_HEIGHT);
    1813         if (x == NULL || PyDict_SetItemString(d, "INTERNAL_IMAGE_HEIGHT", x) < 0)
    1814                 return;
    1815         Py_DECREF(x);
     1812    x = PyInt_FromLong(CL_INTERNAL_IMAGE_HEIGHT);
     1813    if (x == NULL || PyDict_SetItemString(d, "INTERNAL_IMAGE_HEIGHT", x) < 0)
     1814        return;
     1815    Py_DECREF(x);
    18161816#endif
    18171817#ifdef CL_INTERNAL_IMAGE_WIDTH
    1818         x = PyInt_FromLong(CL_INTERNAL_IMAGE_WIDTH);
    1819         if (x == NULL || PyDict_SetItemString(d, "INTERNAL_IMAGE_WIDTH", x) < 0)
    1820                 return;
    1821         Py_DECREF(x);
     1818    x = PyInt_FromLong(CL_INTERNAL_IMAGE_WIDTH);
     1819    if (x == NULL || PyDict_SetItemString(d, "INTERNAL_IMAGE_WIDTH", x) < 0)
     1820        return;
     1821    Py_DECREF(x);
    18221822#endif
    18231823#ifdef CL_INTRA
    1824         x = PyInt_FromLong(CL_INTRA);
    1825         if (x == NULL || PyDict_SetItemString(d, "INTRA", x) < 0)
    1826                 return;
    1827         Py_DECREF(x);
     1824    x = PyInt_FromLong(CL_INTRA);
     1825    if (x == NULL || PyDict_SetItemString(d, "INTRA", x) < 0)
     1826        return;
     1827    Py_DECREF(x);
    18281828#endif
    18291829#ifdef CL_JPEG
    1830         x = PyInt_FromLong(CL_JPEG);
    1831         if (x == NULL || PyDict_SetItemString(d, "JPEG", x) < 0)
    1832                 return;
    1833         Py_DECREF(x);
     1830    x = PyInt_FromLong(CL_JPEG);
     1831    if (x == NULL || PyDict_SetItemString(d, "JPEG", x) < 0)
     1832        return;
     1833    Py_DECREF(x);
    18341834#endif
    18351835#ifdef CL_JPEG_COSMO
    1836         x = PyInt_FromLong(CL_JPEG_COSMO);
    1837         if (x == NULL || PyDict_SetItemString(d, "JPEG_COSMO", x) < 0)
    1838                 return;
    1839         Py_DECREF(x);
     1836    x = PyInt_FromLong(CL_JPEG_COSMO);
     1837    if (x == NULL || PyDict_SetItemString(d, "JPEG_COSMO", x) < 0)
     1838        return;
     1839    Py_DECREF(x);
    18401840#endif
    18411841#ifdef CL_JPEG_ERROR
    1842         x = PyInt_FromLong(CL_JPEG_ERROR);
    1843         if (x == NULL || PyDict_SetItemString(d, "JPEG_ERROR", x) < 0)
    1844                 return;
    1845         Py_DECREF(x);
     1842    x = PyInt_FromLong(CL_JPEG_ERROR);
     1843    if (x == NULL || PyDict_SetItemString(d, "JPEG_ERROR", x) < 0)
     1844        return;
     1845    Py_DECREF(x);
    18461846#endif
    18471847#ifdef CL_JPEG_IMPACT
    1848         x = PyInt_FromLong(CL_JPEG_IMPACT);
    1849         if (x == NULL || PyDict_SetItemString(d, "JPEG_IMPACT", x) < 0)
    1850                 return;
    1851         Py_DECREF(x);
     1848    x = PyInt_FromLong(CL_JPEG_IMPACT);
     1849    if (x == NULL || PyDict_SetItemString(d, "JPEG_IMPACT", x) < 0)
     1850        return;
     1851    Py_DECREF(x);
    18521852#endif
    18531853#ifdef CL_JPEG_NUM_PARAMS
    1854         x = PyInt_FromLong(CL_JPEG_NUM_PARAMS);
    1855         if (x == NULL || PyDict_SetItemString(d, "JPEG_NUM_PARAMS", x) < 0)
    1856                 return;
    1857         Py_DECREF(x);
     1854    x = PyInt_FromLong(CL_JPEG_NUM_PARAMS);
     1855    if (x == NULL || PyDict_SetItemString(d, "JPEG_NUM_PARAMS", x) < 0)
     1856        return;
     1857    Py_DECREF(x);
    18581858#endif
    18591859#ifdef CL_JPEG_QUALITY_FACTOR
    1860         x = PyInt_FromLong(CL_JPEG_QUALITY_FACTOR);
    1861         if (x == NULL || PyDict_SetItemString(d, "JPEG_QUALITY_FACTOR", x) < 0)
    1862                 return;
    1863         Py_DECREF(x);
     1860    x = PyInt_FromLong(CL_JPEG_QUALITY_FACTOR);
     1861    if (x == NULL || PyDict_SetItemString(d, "JPEG_QUALITY_FACTOR", x) < 0)
     1862        return;
     1863    Py_DECREF(x);
    18641864#endif
    18651865#ifdef CL_JPEG_QUANTIZATION_TABLES
    1866         x = PyInt_FromLong(CL_JPEG_QUANTIZATION_TABLES);
    1867         if (x == NULL || PyDict_SetItemString(d, "JPEG_QUANTIZATION_TABLES", x) < 0)
    1868                 return;
    1869         Py_DECREF(x);
     1866    x = PyInt_FromLong(CL_JPEG_QUANTIZATION_TABLES);
     1867    if (x == NULL || PyDict_SetItemString(d, "JPEG_QUANTIZATION_TABLES", x) < 0)
     1868        return;
     1869    Py_DECREF(x);
    18701870#endif
    18711871#ifdef CL_JPEG_SOFTWARE
    1872         x = PyInt_FromLong(CL_JPEG_SOFTWARE);
    1873         if (x == NULL || PyDict_SetItemString(d, "JPEG_SOFTWARE", x) < 0)
    1874                 return;
    1875         Py_DECREF(x);
     1872    x = PyInt_FromLong(CL_JPEG_SOFTWARE);
     1873    if (x == NULL || PyDict_SetItemString(d, "JPEG_SOFTWARE", x) < 0)
     1874        return;
     1875    Py_DECREF(x);
    18761876#endif
    18771877#ifdef CL_JPEG_STREAM_HEADERS
    1878         x = PyInt_FromLong(CL_JPEG_STREAM_HEADERS);
    1879         if (x == NULL || PyDict_SetItemString(d, "JPEG_STREAM_HEADERS", x) < 0)
    1880                 return;
    1881         Py_DECREF(x);
     1878    x = PyInt_FromLong(CL_JPEG_STREAM_HEADERS);
     1879    if (x == NULL || PyDict_SetItemString(d, "JPEG_STREAM_HEADERS", x) < 0)
     1880        return;
     1881    Py_DECREF(x);
    18821882#endif
    18831883#ifdef CL_KEYFRAME
    1884         x = PyInt_FromLong(CL_KEYFRAME);
    1885         if (x == NULL || PyDict_SetItemString(d, "KEYFRAME", x) < 0)
    1886                 return;
    1887         Py_DECREF(x);
     1884    x = PyInt_FromLong(CL_KEYFRAME);
     1885    if (x == NULL || PyDict_SetItemString(d, "KEYFRAME", x) < 0)
     1886        return;
     1887    Py_DECREF(x);
    18881888#endif
    18891889#ifdef CL_KEYFRAME_DISTANCE
    1890         x = PyInt_FromLong(CL_KEYFRAME_DISTANCE);
    1891         if (x == NULL || PyDict_SetItemString(d, "KEYFRAME_DISTANCE", x) < 0)
    1892                 return;
    1893         Py_DECREF(x);
     1890    x = PyInt_FromLong(CL_KEYFRAME_DISTANCE);
     1891    if (x == NULL || PyDict_SetItemString(d, "KEYFRAME_DISTANCE", x) < 0)
     1892        return;
     1893    Py_DECREF(x);
    18941894#endif
    18951895#ifdef CL_LAST_FRAME_INDEX
    1896         x = PyInt_FromLong(CL_LAST_FRAME_INDEX);
    1897         if (x == NULL || PyDict_SetItemString(d, "LAST_FRAME_INDEX", x) < 0)
    1898                 return;
    1899         Py_DECREF(x);
     1896    x = PyInt_FromLong(CL_LAST_FRAME_INDEX);
     1897    if (x == NULL || PyDict_SetItemString(d, "LAST_FRAME_INDEX", x) < 0)
     1898        return;
     1899    Py_DECREF(x);
    19001900#endif
    19011901#ifdef CL_LAYER
    1902         x = PyInt_FromLong(CL_LAYER);
    1903         if (x == NULL || PyDict_SetItemString(d, "LAYER", x) < 0)
    1904                 return;
    1905         Py_DECREF(x);
     1902    x = PyInt_FromLong(CL_LAYER);
     1903    if (x == NULL || PyDict_SetItemString(d, "LAYER", x) < 0)
     1904        return;
     1905    Py_DECREF(x);
    19061906#endif
    19071907#ifdef CL_LUMA_THRESHOLD
    1908         x = PyInt_FromLong(CL_LUMA_THRESHOLD);
    1909         if (x == NULL || PyDict_SetItemString(d, "LUMA_THRESHOLD", x) < 0)
    1910                 return;
    1911         Py_DECREF(x);
     1908    x = PyInt_FromLong(CL_LUMA_THRESHOLD);
     1909    if (x == NULL || PyDict_SetItemString(d, "LUMA_THRESHOLD", x) < 0)
     1910        return;
     1911    Py_DECREF(x);
    19121912#endif
    19131913#ifdef CL_MAX_NUMBER_OF_AUDIO_ALGORITHMS
    1914         x = PyInt_FromLong(CL_MAX_NUMBER_OF_AUDIO_ALGORITHMS);
    1915         if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_AUDIO_ALGORITHMS", x) < 0)
    1916                 return;
    1917         Py_DECREF(x);
     1914    x = PyInt_FromLong(CL_MAX_NUMBER_OF_AUDIO_ALGORITHMS);
     1915    if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_AUDIO_ALGORITHMS", x) < 0)
     1916        return;
     1917    Py_DECREF(x);
    19181918#endif
    19191919#ifdef CL_MAX_NUMBER_OF_FORMATS
    1920         x = PyInt_FromLong(CL_MAX_NUMBER_OF_FORMATS);
    1921         if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_FORMATS", x) < 0)
    1922                 return;
    1923         Py_DECREF(x);
     1920    x = PyInt_FromLong(CL_MAX_NUMBER_OF_FORMATS);
     1921    if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_FORMATS", x) < 0)
     1922        return;
     1923    Py_DECREF(x);
    19241924#endif
    19251925#ifdef CL_MAX_NUMBER_OF_ORIGINAL_FORMATS
    1926         x = PyInt_FromLong(CL_MAX_NUMBER_OF_ORIGINAL_FORMATS);
    1927         if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_ORIGINAL_FORMATS", x) < 0)
    1928                 return;
    1929         Py_DECREF(x);
     1926    x = PyInt_FromLong(CL_MAX_NUMBER_OF_ORIGINAL_FORMATS);
     1927    if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_ORIGINAL_FORMATS", x) < 0)
     1928        return;
     1929    Py_DECREF(x);
    19301930#endif
    19311931#ifdef CL_MAX_NUMBER_OF_PARAMS
    1932         x = PyInt_FromLong(CL_MAX_NUMBER_OF_PARAMS);
    1933         if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_PARAMS", x) < 0)
    1934                 return;
    1935         Py_DECREF(x);
     1932    x = PyInt_FromLong(CL_MAX_NUMBER_OF_PARAMS);
     1933    if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_PARAMS", x) < 0)
     1934        return;
     1935    Py_DECREF(x);
    19361936#endif
    19371937#ifdef CL_MAX_NUMBER_OF_VIDEO_ALGORITHMS
    1938         x = PyInt_FromLong(CL_MAX_NUMBER_OF_VIDEO_ALGORITHMS);
    1939         if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_VIDEO_ALGORITHMS", x) < 0)
    1940                 return;
    1941         Py_DECREF(x);
     1938    x = PyInt_FromLong(CL_MAX_NUMBER_OF_VIDEO_ALGORITHMS);
     1939    if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_VIDEO_ALGORITHMS", x) < 0)
     1940        return;
     1941    Py_DECREF(x);
    19421942#endif
    19431943#ifdef CL_MONO
    1944         x = PyInt_FromLong(CL_MONO);
    1945         if (x == NULL || PyDict_SetItemString(d, "MONO", x) < 0)
    1946                 return;
    1947         Py_DECREF(x);
     1944    x = PyInt_FromLong(CL_MONO);
     1945    if (x == NULL || PyDict_SetItemString(d, "MONO", x) < 0)
     1946        return;
     1947    Py_DECREF(x);
    19481948#endif
    19491949#ifdef CL_MPEG1_AUDIO_AWARE
    1950         x = PyInt_FromLong(CL_MPEG1_AUDIO_AWARE);
    1951         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_AWARE", x) < 0)
    1952                 return;
    1953         Py_DECREF(x);
     1950    x = PyInt_FromLong(CL_MPEG1_AUDIO_AWARE);
     1951    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_AWARE", x) < 0)
     1952        return;
     1953    Py_DECREF(x);
    19541954#endif
    19551955#ifdef CL_MPEG1_AUDIO_LAYER
    1956         x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER);
    1957         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER", x) < 0)
    1958                 return;
    1959         Py_DECREF(x);
     1956    x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER);
     1957    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER", x) < 0)
     1958        return;
     1959    Py_DECREF(x);
    19601960#endif
    19611961#ifdef CL_MPEG1_AUDIO_LAYER_I
    1962         x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER_I);
    1963         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER_I", x) < 0)
    1964                 return;
    1965         Py_DECREF(x);
     1962    x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER_I);
     1963    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER_I", x) < 0)
     1964        return;
     1965    Py_DECREF(x);
    19661966#endif
    19671967#ifdef CL_MPEG1_AUDIO_LAYER_II
    1968         x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER_II);
    1969         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER_II", x) < 0)
    1970                 return;
    1971         Py_DECREF(x);
     1968    x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER_II);
     1969    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER_II", x) < 0)
     1970        return;
     1971    Py_DECREF(x);
    19721972#endif
    19731973#ifdef CL_MPEG1_AUDIO_MODE
    1974         x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE);
    1975         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE", x) < 0)
    1976                 return;
    1977         Py_DECREF(x);
     1974    x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE);
     1975    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE", x) < 0)
     1976        return;
     1977    Py_DECREF(x);
    19781978#endif
    19791979#ifdef CL_MPEG1_AUDIO_MODE_DUAL
    1980         x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_DUAL);
    1981         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_DUAL", x) < 0)
    1982                 return;
    1983         Py_DECREF(x);
     1980    x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_DUAL);
     1981    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_DUAL", x) < 0)
     1982        return;
     1983    Py_DECREF(x);
    19841984#endif
    19851985#ifdef CL_MPEG1_AUDIO_MODE_JOINT
    1986         x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_JOINT);
    1987         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_JOINT", x) < 0)
    1988                 return;
    1989         Py_DECREF(x);
     1986    x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_JOINT);
     1987    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_JOINT", x) < 0)
     1988        return;
     1989    Py_DECREF(x);
    19901990#endif
    19911991#ifdef CL_MPEG1_AUDIO_MODE_SINGLE
    1992         x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_SINGLE);
    1993         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_SINGLE", x) < 0)
    1994                 return;
    1995         Py_DECREF(x);
     1992    x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_SINGLE);
     1993    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_SINGLE", x) < 0)
     1994        return;
     1995    Py_DECREF(x);
    19961996#endif
    19971997#ifdef CL_MPEG1_AUDIO_MODE_STEREO
    1998         x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_STEREO);
    1999         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_STEREO", x) < 0)
    2000                 return;
    2001         Py_DECREF(x);
     1998    x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_STEREO);
     1999    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_STEREO", x) < 0)
     2000        return;
     2001    Py_DECREF(x);
    20022002#endif
    20032003#ifdef CL_MPEG1_AUDIO_SOFTWARE
    2004         x = PyInt_FromLong(CL_MPEG1_AUDIO_SOFTWARE);
    2005         if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_SOFTWARE", x) < 0)
    2006                 return;
    2007         Py_DECREF(x);
     2004    x = PyInt_FromLong(CL_MPEG1_AUDIO_SOFTWARE);
     2005    if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_SOFTWARE", x) < 0)
     2006        return;
     2007    Py_DECREF(x);
    20082008#endif
    20092009#ifdef CL_MPEG1_END_OF_STREAM
    2010         x = PyInt_FromLong(CL_MPEG1_END_OF_STREAM);
    2011         if (x == NULL || PyDict_SetItemString(d, "MPEG1_END_OF_STREAM", x) < 0)
    2012                 return;
    2013         Py_DECREF(x);
     2010    x = PyInt_FromLong(CL_MPEG1_END_OF_STREAM);
     2011    if (x == NULL || PyDict_SetItemString(d, "MPEG1_END_OF_STREAM", x) < 0)
     2012        return;
     2013    Py_DECREF(x);
    20142014#endif
    20152015#ifdef CL_MPEG1_ERROR
    2016         x = PyInt_FromLong(CL_MPEG1_ERROR);
    2017         if (x == NULL || PyDict_SetItemString(d, "MPEG1_ERROR", x) < 0)
    2018                 return;
    2019         Py_DECREF(x);
     2016    x = PyInt_FromLong(CL_MPEG1_ERROR);
     2017    if (x == NULL || PyDict_SetItemString(d, "MPEG1_ERROR", x) < 0)
     2018        return;
     2019    Py_DECREF(x);
    20202020#endif
    20212021#ifdef CL_MPEG1_NUM_PARAMS
    2022         x = PyInt_FromLong(CL_MPEG1_NUM_PARAMS);
    2023         if (x == NULL || PyDict_SetItemString(d, "MPEG1_NUM_PARAMS", x) < 0)
    2024                 return;
    2025         Py_DECREF(x);
     2022    x = PyInt_FromLong(CL_MPEG1_NUM_PARAMS);
     2023    if (x == NULL || PyDict_SetItemString(d, "MPEG1_NUM_PARAMS", x) < 0)
     2024        return;
     2025    Py_DECREF(x);
    20262026#endif
    20272027#ifdef CL_MPEG1_VIDEO_M
    2028         x = PyInt_FromLong(CL_MPEG1_VIDEO_M);
    2029         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_M", x) < 0)
    2030                 return;
    2031         Py_DECREF(x);
     2028    x = PyInt_FromLong(CL_MPEG1_VIDEO_M);
     2029    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_M", x) < 0)
     2030        return;
     2031    Py_DECREF(x);
    20322032#endif
    20332033#ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X
    2034         x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X);
    2035         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X", x) < 0)
    2036                 return;
    2037         Py_DECREF(x);
     2034    x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X);
     2035    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X", x) < 0)
     2036        return;
     2037    Py_DECREF(x);
    20382038#endif
    20392039#ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y
    2040         x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y);
    2041         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y", x) < 0)
    2042                 return;
    2043         Py_DECREF(x);
     2040    x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y);
     2041    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y", x) < 0)
     2042        return;
     2043    Py_DECREF(x);
    20442044#endif
    20452045#ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X
    2046         x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X);
    2047         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X", x) < 0)
    2048                 return;
    2049         Py_DECREF(x);
     2046    x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X);
     2047    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X", x) < 0)
     2048        return;
     2049    Py_DECREF(x);
    20502050#endif
    20512051#ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y
    2052         x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y);
    2053         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y", x) < 0)
    2054                 return;
    2055         Py_DECREF(x);
     2052    x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y);
     2053    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y", x) < 0)
     2054        return;
     2055    Py_DECREF(x);
    20562056#endif
    20572057#ifdef CL_MPEG1_VIDEO_N
    2058         x = PyInt_FromLong(CL_MPEG1_VIDEO_N);
    2059         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_N", x) < 0)
    2060                 return;
    2061         Py_DECREF(x);
     2058    x = PyInt_FromLong(CL_MPEG1_VIDEO_N);
     2059    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_N", x) < 0)
     2060        return;
     2061    Py_DECREF(x);
    20622062#endif
    20632063#ifdef CL_MPEG1_VIDEO_SOFTNESS
    2064         x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS);
    2065         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS", x) < 0)
    2066                 return;
    2067         Py_DECREF(x);
     2064    x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS);
     2065    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS", x) < 0)
     2066        return;
     2067    Py_DECREF(x);
    20682068#endif
    20692069#ifdef CL_MPEG1_VIDEO_SOFTNESS_MAXIMUM
    2070         x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_MAXIMUM);
    2071         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_MAXIMUM", x) < 0)
    2072                 return;
    2073         Py_DECREF(x);
     2070    x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_MAXIMUM);
     2071    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_MAXIMUM", x) < 0)
     2072        return;
     2073    Py_DECREF(x);
    20742074#endif
    20752075#ifdef CL_MPEG1_VIDEO_SOFTNESS_MEDIUM
    2076         x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_MEDIUM);
    2077         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_MEDIUM", x) < 0)
    2078                 return;
    2079         Py_DECREF(x);
     2076    x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_MEDIUM);
     2077    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_MEDIUM", x) < 0)
     2078        return;
     2079    Py_DECREF(x);
    20802080#endif
    20812081#ifdef CL_MPEG1_VIDEO_SOFTNESS_NONE
    2082         x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_NONE);
    2083         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_NONE", x) < 0)
    2084                 return;
    2085         Py_DECREF(x);
     2082    x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_NONE);
     2083    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_NONE", x) < 0)
     2084        return;
     2085    Py_DECREF(x);
    20862086#endif
    20872087#ifdef CL_MPEG1_VIDEO_SOFTWARE
    2088         x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTWARE);
    2089         if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTWARE", x) < 0)
    2090                 return;
    2091         Py_DECREF(x);
     2088    x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTWARE);
     2089    if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTWARE", x) < 0)
     2090        return;
     2091    Py_DECREF(x);
    20922092#endif
    20932093#ifdef CL_MPEG_VIDEO
    2094         x = PyInt_FromLong(CL_MPEG_VIDEO);
    2095         if (x == NULL || PyDict_SetItemString(d, "MPEG_VIDEO", x) < 0)
    2096                 return;
    2097         Py_DECREF(x);
     2094    x = PyInt_FromLong(CL_MPEG_VIDEO);
     2095    if (x == NULL || PyDict_SetItemString(d, "MPEG_VIDEO", x) < 0)
     2096        return;
     2097    Py_DECREF(x);
    20982098#endif
    20992099#ifdef CL_MULTIRATE_AWARE
    2100         x = PyInt_FromLong(CL_MULTIRATE_AWARE);
    2101         if (x == NULL || PyDict_SetItemString(d, "MULTIRATE_AWARE", x) < 0)
    2102                 return;
    2103         Py_DECREF(x);
     2100    x = PyInt_FromLong(CL_MULTIRATE_AWARE);
     2101    if (x == NULL || PyDict_SetItemString(d, "MULTIRATE_AWARE", x) < 0)
     2102        return;
     2103    Py_DECREF(x);
    21042104#endif
    21052105#ifdef CL_MVC1
    2106         x = PyInt_FromLong(CL_MVC1);
    2107         if (x == NULL || PyDict_SetItemString(d, "MVC1", x) < 0)
    2108                 return;
    2109         Py_DECREF(x);
     2106    x = PyInt_FromLong(CL_MVC1);
     2107    if (x == NULL || PyDict_SetItemString(d, "MVC1", x) < 0)
     2108        return;
     2109    Py_DECREF(x);
    21102110#endif
    21112111#ifdef CL_MVC1_SOFTWARE
    2112         x = PyInt_FromLong(CL_MVC1_SOFTWARE);
    2113         if (x == NULL || PyDict_SetItemString(d, "MVC1_SOFTWARE", x) < 0)
    2114                 return;
    2115         Py_DECREF(x);
     2112    x = PyInt_FromLong(CL_MVC1_SOFTWARE);
     2113    if (x == NULL || PyDict_SetItemString(d, "MVC1_SOFTWARE", x) < 0)
     2114        return;
     2115    Py_DECREF(x);
    21162116#endif
    21172117#ifdef CL_MVC2
    2118         x = PyInt_FromLong(CL_MVC2);
    2119         if (x == NULL || PyDict_SetItemString(d, "MVC2", x) < 0)
    2120                 return;
    2121         Py_DECREF(x);
     2118    x = PyInt_FromLong(CL_MVC2);
     2119    if (x == NULL || PyDict_SetItemString(d, "MVC2", x) < 0)
     2120        return;
     2121    Py_DECREF(x);
    21222122#endif
    21232123#ifdef CL_MVC2_BLENDING
    2124         x = PyInt_FromLong(CL_MVC2_BLENDING);
    2125         if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING", x) < 0)
    2126                 return;
    2127         Py_DECREF(x);
     2124    x = PyInt_FromLong(CL_MVC2_BLENDING);
     2125    if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING", x) < 0)
     2126        return;
     2127    Py_DECREF(x);
    21282128#endif
    21292129#ifdef CL_MVC2_BLENDING_OFF
    2130         x = PyInt_FromLong(CL_MVC2_BLENDING_OFF);
    2131         if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING_OFF", x) < 0)
    2132                 return;
    2133         Py_DECREF(x);
     2130    x = PyInt_FromLong(CL_MVC2_BLENDING_OFF);
     2131    if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING_OFF", x) < 0)
     2132        return;
     2133    Py_DECREF(x);
    21342134#endif
    21352135#ifdef CL_MVC2_BLENDING_ON
    2136         x = PyInt_FromLong(CL_MVC2_BLENDING_ON);
    2137         if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING_ON", x) < 0)
    2138                 return;
    2139         Py_DECREF(x);
     2136    x = PyInt_FromLong(CL_MVC2_BLENDING_ON);
     2137    if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING_ON", x) < 0)
     2138        return;
     2139    Py_DECREF(x);
    21402140#endif
    21412141#ifdef CL_MVC2_CHROMA_THRESHOLD
    2142         x = PyInt_FromLong(CL_MVC2_CHROMA_THRESHOLD);
    2143         if (x == NULL || PyDict_SetItemString(d, "MVC2_CHROMA_THRESHOLD", x) < 0)
    2144                 return;
    2145         Py_DECREF(x);
     2142    x = PyInt_FromLong(CL_MVC2_CHROMA_THRESHOLD);
     2143    if (x == NULL || PyDict_SetItemString(d, "MVC2_CHROMA_THRESHOLD", x) < 0)
     2144        return;
     2145    Py_DECREF(x);
    21462146#endif
    21472147#ifdef CL_MVC2_EDGE_THRESHOLD
    2148         x = PyInt_FromLong(CL_MVC2_EDGE_THRESHOLD);
    2149         if (x == NULL || PyDict_SetItemString(d, "MVC2_EDGE_THRESHOLD", x) < 0)
    2150                 return;
    2151         Py_DECREF(x);
     2148    x = PyInt_FromLong(CL_MVC2_EDGE_THRESHOLD);
     2149    if (x == NULL || PyDict_SetItemString(d, "MVC2_EDGE_THRESHOLD", x) < 0)
     2150        return;
     2151    Py_DECREF(x);
    21522152#endif
    21532153#ifdef CL_MVC2_ERROR
    2154         x = PyInt_FromLong(CL_MVC2_ERROR);
    2155         if (x == NULL || PyDict_SetItemString(d, "MVC2_ERROR", x) < 0)
    2156                 return;
    2157         Py_DECREF(x);
     2154    x = PyInt_FromLong(CL_MVC2_ERROR);
     2155    if (x == NULL || PyDict_SetItemString(d, "MVC2_ERROR", x) < 0)
     2156        return;
     2157    Py_DECREF(x);
    21582158#endif
    21592159#ifdef CL_MVC2_LUMA_THRESHOLD
    2160         x = PyInt_FromLong(CL_MVC2_LUMA_THRESHOLD);
    2161         if (x == NULL || PyDict_SetItemString(d, "MVC2_LUMA_THRESHOLD", x) < 0)
    2162                 return;
    2163         Py_DECREF(x);
     2160    x = PyInt_FromLong(CL_MVC2_LUMA_THRESHOLD);
     2161    if (x == NULL || PyDict_SetItemString(d, "MVC2_LUMA_THRESHOLD", x) < 0)
     2162        return;
     2163    Py_DECREF(x);
    21642164#endif
    21652165#ifdef CL_MVC2_SOFTWARE
    2166         x = PyInt_FromLong(CL_MVC2_SOFTWARE);
    2167         if (x == NULL || PyDict_SetItemString(d, "MVC2_SOFTWARE", x) < 0)
    2168                 return;
    2169         Py_DECREF(x);
     2166    x = PyInt_FromLong(CL_MVC2_SOFTWARE);
     2167    if (x == NULL || PyDict_SetItemString(d, "MVC2_SOFTWARE", x) < 0)
     2168        return;
     2169    Py_DECREF(x);
    21702170#endif
    21712171#ifdef CL_MVC3_QUALITY_LEVEL
    2172         x = PyInt_FromLong(CL_MVC3_QUALITY_LEVEL);
    2173         if (x == NULL || PyDict_SetItemString(d, "MVC3_QUALITY_LEVEL", x) < 0)
    2174                 return;
    2175         Py_DECREF(x);
     2172    x = PyInt_FromLong(CL_MVC3_QUALITY_LEVEL);
     2173    if (x == NULL || PyDict_SetItemString(d, "MVC3_QUALITY_LEVEL", x) < 0)
     2174        return;
     2175    Py_DECREF(x);
    21762176#endif
    21772177#ifdef CL_MVC3_SOFTWARE
    2178         x = PyInt_FromLong(CL_MVC3_SOFTWARE);
    2179         if (x == NULL || PyDict_SetItemString(d, "MVC3_SOFTWARE", x) < 0)
    2180                 return;
    2181         Py_DECREF(x);
     2178    x = PyInt_FromLong(CL_MVC3_SOFTWARE);
     2179    if (x == NULL || PyDict_SetItemString(d, "MVC3_SOFTWARE", x) < 0)
     2180        return;
     2181    Py_DECREF(x);
    21822182#endif
    21832183#ifdef CL_NEXT_NOT_AVAILABLE
    2184         x = PyInt_FromLong(CL_NEXT_NOT_AVAILABLE);
    2185         if (x == NULL || PyDict_SetItemString(d, "NEXT_NOT_AVAILABLE", x) < 0)
    2186                 return;
    2187         Py_DECREF(x);
     2184    x = PyInt_FromLong(CL_NEXT_NOT_AVAILABLE);
     2185    if (x == NULL || PyDict_SetItemString(d, "NEXT_NOT_AVAILABLE", x) < 0)
     2186        return;
     2187    Py_DECREF(x);
    21882188#endif
    21892189#ifdef CL_NOISE_MARGIN
    2190         x = PyInt_FromLong(CL_NOISE_MARGIN);
    2191         if (x == NULL || PyDict_SetItemString(d, "NOISE_MARGIN", x) < 0)
    2192                 return;
    2193         Py_DECREF(x);
     2190    x = PyInt_FromLong(CL_NOISE_MARGIN);
     2191    if (x == NULL || PyDict_SetItemString(d, "NOISE_MARGIN", x) < 0)
     2192        return;
     2193    Py_DECREF(x);
    21942194#endif
    21952195#ifdef CL_NONE
    2196         x = PyInt_FromLong(CL_NONE);
    2197         if (x == NULL || PyDict_SetItemString(d, "NONE", x) < 0)
    2198                 return;
    2199         Py_DECREF(x);
     2196    x = PyInt_FromLong(CL_NONE);
     2197    if (x == NULL || PyDict_SetItemString(d, "NONE", x) < 0)
     2198        return;
     2199    Py_DECREF(x);
    22002200#endif
    22012201#ifdef CL_NUMBER_OF_FORMATS
    2202         x = PyInt_FromLong(CL_NUMBER_OF_FORMATS);
    2203         if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_FORMATS", x) < 0)
    2204                 return;
    2205         Py_DECREF(x);
     2202    x = PyInt_FromLong(CL_NUMBER_OF_FORMATS);
     2203    if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_FORMATS", x) < 0)
     2204        return;
     2205    Py_DECREF(x);
    22062206#endif
    22072207#ifdef CL_NUMBER_OF_FRAMES
    2208         x = PyInt_FromLong(CL_NUMBER_OF_FRAMES);
    2209         if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_FRAMES", x) < 0)
    2210                 return;
    2211         Py_DECREF(x);
     2208    x = PyInt_FromLong(CL_NUMBER_OF_FRAMES);
     2209    if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_FRAMES", x) < 0)
     2210        return;
     2211    Py_DECREF(x);
    22122212#endif
    22132213#ifdef CL_NUMBER_OF_PARAMS
    2214         x = PyInt_FromLong(CL_NUMBER_OF_PARAMS);
    2215         if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_PARAMS", x) < 0)
    2216                 return;
    2217         Py_DECREF(x);
     2214    x = PyInt_FromLong(CL_NUMBER_OF_PARAMS);
     2215    if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_PARAMS", x) < 0)
     2216        return;
     2217    Py_DECREF(x);
    22182218#endif
    22192219#ifdef CL_NUMBER_OF_PARAMS_FREEZE
    2220         x = PyInt_FromLong(CL_NUMBER_OF_PARAMS_FREEZE);
    2221         if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_PARAMS_FREEZE", x) < 0)
    2222                 return;
    2223         Py_DECREF(x);
     2220    x = PyInt_FromLong(CL_NUMBER_OF_PARAMS_FREEZE);
     2221    if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_PARAMS_FREEZE", x) < 0)
     2222        return;
     2223    Py_DECREF(x);
    22242224#endif
    22252225#ifdef CL_NUMBER_OF_VIDEO_FORMATS
    2226         x = PyInt_FromLong(CL_NUMBER_OF_VIDEO_FORMATS);
    2227         if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_VIDEO_FORMATS", x) < 0)
    2228                 return;
    2229         Py_DECREF(x);
     2226    x = PyInt_FromLong(CL_NUMBER_OF_VIDEO_FORMATS);
     2227    if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_VIDEO_FORMATS", x) < 0)
     2228        return;
     2229    Py_DECREF(x);
    22302230#endif
    22312231#ifdef CL_ORIENTATION
    2232         x = PyInt_FromLong(CL_ORIENTATION);
    2233         if (x == NULL || PyDict_SetItemString(d, "ORIENTATION", x) < 0)
    2234                 return;
    2235         Py_DECREF(x);
     2232    x = PyInt_FromLong(CL_ORIENTATION);
     2233    if (x == NULL || PyDict_SetItemString(d, "ORIENTATION", x) < 0)
     2234        return;
     2235    Py_DECREF(x);
    22362236#endif
    22372237#ifdef CL_ORIGINAL_FORMAT
    2238         x = PyInt_FromLong(CL_ORIGINAL_FORMAT);
    2239         if (x == NULL || PyDict_SetItemString(d, "ORIGINAL_FORMAT", x) < 0)
    2240                 return;
    2241         Py_DECREF(x);
     2238    x = PyInt_FromLong(CL_ORIGINAL_FORMAT);
     2239    if (x == NULL || PyDict_SetItemString(d, "ORIGINAL_FORMAT", x) < 0)
     2240        return;
     2241    Py_DECREF(x);
    22422242#endif
    22432243#ifdef CL_PARAM_OUT_OF_RANGE
    2244         x = PyInt_FromLong(CL_PARAM_OUT_OF_RANGE);
    2245         if (x == NULL || PyDict_SetItemString(d, "PARAM_OUT_OF_RANGE", x) < 0)
    2246                 return;
    2247         Py_DECREF(x);
     2244    x = PyInt_FromLong(CL_PARAM_OUT_OF_RANGE);
     2245    if (x == NULL || PyDict_SetItemString(d, "PARAM_OUT_OF_RANGE", x) < 0)
     2246        return;
     2247    Py_DECREF(x);
    22482248#endif
    22492249#ifdef CL_PIXEL_ASPECT
    2250         x = PyInt_FromLong(CL_PIXEL_ASPECT);
    2251         if (x == NULL || PyDict_SetItemString(d, "PIXEL_ASPECT", x) < 0)
    2252                 return;
    2253         Py_DECREF(x);
     2250    x = PyInt_FromLong(CL_PIXEL_ASPECT);
     2251    if (x == NULL || PyDict_SetItemString(d, "PIXEL_ASPECT", x) < 0)
     2252        return;
     2253    Py_DECREF(x);
    22542254#endif
    22552255#ifdef CL_PREDICTED
    2256         x = PyInt_FromLong(CL_PREDICTED);
    2257         if (x == NULL || PyDict_SetItemString(d, "PREDICTED", x) < 0)
    2258                 return;
    2259         Py_DECREF(x);
     2256    x = PyInt_FromLong(CL_PREDICTED);
     2257    if (x == NULL || PyDict_SetItemString(d, "PREDICTED", x) < 0)
     2258        return;
     2259    Py_DECREF(x);
    22602260#endif
    22612261#ifdef CL_PREROLL
    2262         x = PyInt_FromLong(CL_PREROLL);
    2263         if (x == NULL || PyDict_SetItemString(d, "PREROLL", x) < 0)
    2264                 return;
    2265         Py_DECREF(x);
     2262    x = PyInt_FromLong(CL_PREROLL);
     2263    if (x == NULL || PyDict_SetItemString(d, "PREROLL", x) < 0)
     2264        return;
     2265    Py_DECREF(x);
    22662266#endif
    22672267#ifdef CL_QUALITY_FACTOR
    2268         x = PyInt_FromLong(CL_QUALITY_FACTOR);
    2269         if (x == NULL || PyDict_SetItemString(d, "QUALITY_FACTOR", x) < 0)
    2270                 return;
    2271         Py_DECREF(x);
     2268    x = PyInt_FromLong(CL_QUALITY_FACTOR);
     2269    if (x == NULL || PyDict_SetItemString(d, "QUALITY_FACTOR", x) < 0)
     2270        return;
     2271    Py_DECREF(x);
    22722272#endif
    22732273#ifdef CL_QUALITY_LEVEL
    2274         x = PyInt_FromLong(CL_QUALITY_LEVEL);
    2275         if (x == NULL || PyDict_SetItemString(d, "QUALITY_LEVEL", x) < 0)
    2276                 return;
    2277         Py_DECREF(x);
     2274    x = PyInt_FromLong(CL_QUALITY_LEVEL);
     2275    if (x == NULL || PyDict_SetItemString(d, "QUALITY_LEVEL", x) < 0)
     2276        return;
     2277    Py_DECREF(x);
    22782278#endif
    22792279#ifdef CL_QUALITY_SPATIAL
    2280         x = PyInt_FromLong(CL_QUALITY_SPATIAL);
    2281         if (x == NULL || PyDict_SetItemString(d, "QUALITY_SPATIAL", x) < 0)
    2282                 return;
    2283         Py_DECREF(x);
     2280    x = PyInt_FromLong(CL_QUALITY_SPATIAL);
     2281    if (x == NULL || PyDict_SetItemString(d, "QUALITY_SPATIAL", x) < 0)
     2282        return;
     2283    Py_DECREF(x);
    22842284#endif
    22852285#ifdef CL_QUALITY_TEMPORAL
    2286         x = PyInt_FromLong(CL_QUALITY_TEMPORAL);
    2287         if (x == NULL || PyDict_SetItemString(d, "QUALITY_TEMPORAL", x) < 0)
    2288                 return;
    2289         Py_DECREF(x);
     2286    x = PyInt_FromLong(CL_QUALITY_TEMPORAL);
     2287    if (x == NULL || PyDict_SetItemString(d, "QUALITY_TEMPORAL", x) < 0)
     2288        return;
     2289    Py_DECREF(x);
    22902290#endif
    22912291#ifdef CL_QUANTIZATION_TABLES
    2292         x = PyInt_FromLong(CL_QUANTIZATION_TABLES);
    2293         if (x == NULL || PyDict_SetItemString(d, "QUANTIZATION_TABLES", x) < 0)
    2294                 return;
    2295         Py_DECREF(x);
     2292    x = PyInt_FromLong(CL_QUANTIZATION_TABLES);
     2293    if (x == NULL || PyDict_SetItemString(d, "QUANTIZATION_TABLES", x) < 0)
     2294        return;
     2295    Py_DECREF(x);
    22962296#endif
    22972297#ifdef CL_RANGE_VALUE
    2298         x = PyInt_FromLong(CL_RANGE_VALUE);
    2299         if (x == NULL || PyDict_SetItemString(d, "RANGE_VALUE", x) < 0)
    2300                 return;
    2301         Py_DECREF(x);
     2298    x = PyInt_FromLong(CL_RANGE_VALUE);
     2299    if (x == NULL || PyDict_SetItemString(d, "RANGE_VALUE", x) < 0)
     2300        return;
     2301    Py_DECREF(x);
    23022302#endif
    23032303#ifdef CL_RGB
    2304         x = PyInt_FromLong(CL_RGB);
    2305         if (x == NULL || PyDict_SetItemString(d, "RGB", x) < 0)
    2306                 return;
    2307         Py_DECREF(x);
     2304    x = PyInt_FromLong(CL_RGB);
     2305    if (x == NULL || PyDict_SetItemString(d, "RGB", x) < 0)
     2306        return;
     2307    Py_DECREF(x);
    23082308#endif
    23092309#ifdef CL_RGB332
    2310         x = PyInt_FromLong(CL_RGB332);
    2311         if (x == NULL || PyDict_SetItemString(d, "RGB332", x) < 0)
    2312                 return;
    2313         Py_DECREF(x);
     2310    x = PyInt_FromLong(CL_RGB332);
     2311    if (x == NULL || PyDict_SetItemString(d, "RGB332", x) < 0)
     2312        return;
     2313    Py_DECREF(x);
    23142314#endif
    23152315#ifdef CL_RGB8
    2316         x = PyInt_FromLong(CL_RGB8);
    2317         if (x == NULL || PyDict_SetItemString(d, "RGB8", x) < 0)
    2318                 return;
    2319         Py_DECREF(x);
     2316    x = PyInt_FromLong(CL_RGB8);
     2317    if (x == NULL || PyDict_SetItemString(d, "RGB8", x) < 0)
     2318        return;
     2319    Py_DECREF(x);
    23202320#endif
    23212321#ifdef CL_RGBA
    2322         x = PyInt_FromLong(CL_RGBA);
    2323         if (x == NULL || PyDict_SetItemString(d, "RGBA", x) < 0)
    2324                 return;
    2325         Py_DECREF(x);
     2322    x = PyInt_FromLong(CL_RGBA);
     2323    if (x == NULL || PyDict_SetItemString(d, "RGBA", x) < 0)
     2324        return;
     2325    Py_DECREF(x);
    23262326#endif
    23272327#ifdef CL_RGBX
    2328         x = PyInt_FromLong(CL_RGBX);
    2329         if (x == NULL || PyDict_SetItemString(d, "RGBX", x) < 0)
    2330                 return;
    2331         Py_DECREF(x);
     2328    x = PyInt_FromLong(CL_RGBX);
     2329    if (x == NULL || PyDict_SetItemString(d, "RGBX", x) < 0)
     2330        return;
     2331    Py_DECREF(x);
    23322332#endif
    23332333#ifdef CL_RLE
    2334         x = PyInt_FromLong(CL_RLE);
    2335         if (x == NULL || PyDict_SetItemString(d, "RLE", x) < 0)
    2336                 return;
    2337         Py_DECREF(x);
     2334    x = PyInt_FromLong(CL_RLE);
     2335    if (x == NULL || PyDict_SetItemString(d, "RLE", x) < 0)
     2336        return;
     2337    Py_DECREF(x);
    23382338#endif
    23392339#ifdef CL_RLE24
    2340         x = PyInt_FromLong(CL_RLE24);
    2341         if (x == NULL || PyDict_SetItemString(d, "RLE24", x) < 0)
    2342                 return;
    2343         Py_DECREF(x);
     2340    x = PyInt_FromLong(CL_RLE24);
     2341    if (x == NULL || PyDict_SetItemString(d, "RLE24", x) < 0)
     2342        return;
     2343    Py_DECREF(x);
    23442344#endif
    23452345#ifdef CL_RLE24_SOFTWARE
    2346         x = PyInt_FromLong(CL_RLE24_SOFTWARE);
    2347         if (x == NULL || PyDict_SetItemString(d, "RLE24_SOFTWARE", x) < 0)
    2348                 return;
    2349         Py_DECREF(x);
     2346    x = PyInt_FromLong(CL_RLE24_SOFTWARE);
     2347    if (x == NULL || PyDict_SetItemString(d, "RLE24_SOFTWARE", x) < 0)
     2348        return;
     2349    Py_DECREF(x);
    23502350#endif
    23512351#ifdef CL_RLE_SOFTWARE
    2352         x = PyInt_FromLong(CL_RLE_SOFTWARE);
    2353         if (x == NULL || PyDict_SetItemString(d, "RLE_SOFTWARE", x) < 0)
    2354                 return;
    2355         Py_DECREF(x);
     2352    x = PyInt_FromLong(CL_RLE_SOFTWARE);
     2353    if (x == NULL || PyDict_SetItemString(d, "RLE_SOFTWARE", x) < 0)
     2354        return;
     2355    Py_DECREF(x);
    23562356#endif
    23572357#ifdef CL_RTR
    2358         x = PyInt_FromLong(CL_RTR);
    2359         if (x == NULL || PyDict_SetItemString(d, "RTR", x) < 0)
    2360                 return;
    2361         Py_DECREF(x);
     2358    x = PyInt_FromLong(CL_RTR);
     2359    if (x == NULL || PyDict_SetItemString(d, "RTR", x) < 0)
     2360        return;
     2361    Py_DECREF(x);
    23622362#endif
    23632363#ifdef CL_RTR1
    2364         x = PyInt_FromLong(CL_RTR1);
    2365         if (x == NULL || PyDict_SetItemString(d, "RTR1", x) < 0)
    2366                 return;
    2367         Py_DECREF(x);
     2364    x = PyInt_FromLong(CL_RTR1);
     2365    if (x == NULL || PyDict_SetItemString(d, "RTR1", x) < 0)
     2366        return;
     2367    Py_DECREF(x);
    23682368#endif
    23692369#ifdef CL_RTR_QUALITY_LEVEL
    2370         x = PyInt_FromLong(CL_RTR_QUALITY_LEVEL);
    2371         if (x == NULL || PyDict_SetItemString(d, "RTR_QUALITY_LEVEL", x) < 0)
    2372                 return;
    2373         Py_DECREF(x);
     2370    x = PyInt_FromLong(CL_RTR_QUALITY_LEVEL);
     2371    if (x == NULL || PyDict_SetItemString(d, "RTR_QUALITY_LEVEL", x) < 0)
     2372        return;
     2373    Py_DECREF(x);
    23742374#endif
    23752375#ifdef CL_SAMPLES_PER_TILE
    2376         x = PyInt_FromLong(CL_SAMPLES_PER_TILE);
    2377         if (x == NULL || PyDict_SetItemString(d, "SAMPLES_PER_TILE", x) < 0)
    2378                 return;
    2379         Py_DECREF(x);
     2376    x = PyInt_FromLong(CL_SAMPLES_PER_TILE);
     2377    if (x == NULL || PyDict_SetItemString(d, "SAMPLES_PER_TILE", x) < 0)
     2378        return;
     2379    Py_DECREF(x);
    23802380#endif
    23812381#ifdef CL_SCHEME_BUSY
    2382         x = PyInt_FromLong(CL_SCHEME_BUSY);
    2383         if (x == NULL || PyDict_SetItemString(d, "SCHEME_BUSY", x) < 0)
    2384                 return;
    2385         Py_DECREF(x);
     2382    x = PyInt_FromLong(CL_SCHEME_BUSY);
     2383    if (x == NULL || PyDict_SetItemString(d, "SCHEME_BUSY", x) < 0)
     2384        return;
     2385    Py_DECREF(x);
    23862386#endif
    23872387#ifdef CL_SCHEME_NOT_AVAILABLE
    2388         x = PyInt_FromLong(CL_SCHEME_NOT_AVAILABLE);
    2389         if (x == NULL || PyDict_SetItemString(d, "SCHEME_NOT_AVAILABLE", x) < 0)
    2390                 return;
    2391         Py_DECREF(x);
     2388    x = PyInt_FromLong(CL_SCHEME_NOT_AVAILABLE);
     2389    if (x == NULL || PyDict_SetItemString(d, "SCHEME_NOT_AVAILABLE", x) < 0)
     2390        return;
     2391    Py_DECREF(x);
    23922392#endif
    23932393#ifdef CL_SPEED
    2394         x = PyInt_FromLong(CL_SPEED);
    2395         if (x == NULL || PyDict_SetItemString(d, "SPEED", x) < 0)
    2396                 return;
    2397         Py_DECREF(x);
     2394    x = PyInt_FromLong(CL_SPEED);
     2395    if (x == NULL || PyDict_SetItemString(d, "SPEED", x) < 0)
     2396        return;
     2397    Py_DECREF(x);
    23982398#endif
    23992399#ifdef CL_STEREO_INTERLEAVED
    2400         x = PyInt_FromLong(CL_STEREO_INTERLEAVED);
    2401         if (x == NULL || PyDict_SetItemString(d, "STEREO_INTERLEAVED", x) < 0)
    2402                 return;
    2403         Py_DECREF(x);
     2400    x = PyInt_FromLong(CL_STEREO_INTERLEAVED);
     2401    if (x == NULL || PyDict_SetItemString(d, "STEREO_INTERLEAVED", x) < 0)
     2402        return;
     2403    Py_DECREF(x);
    24042404#endif
    24052405#ifdef CL_STREAM_HEADERS
    2406         x = PyInt_FromLong(CL_STREAM_HEADERS);
    2407         if (x == NULL || PyDict_SetItemString(d, "STREAM_HEADERS", x) < 0)
    2408                 return;
    2409         Py_DECREF(x);
     2406    x = PyInt_FromLong(CL_STREAM_HEADERS);
     2407    if (x == NULL || PyDict_SetItemString(d, "STREAM_HEADERS", x) < 0)
     2408        return;
     2409    Py_DECREF(x);
    24102410#endif
    24112411#ifdef CL_TILE_THRESHOLD
    2412         x = PyInt_FromLong(CL_TILE_THRESHOLD);
    2413         if (x == NULL || PyDict_SetItemString(d, "TILE_THRESHOLD", x) < 0)
    2414                 return;
    2415         Py_DECREF(x);
     2412    x = PyInt_FromLong(CL_TILE_THRESHOLD);
     2413    if (x == NULL || PyDict_SetItemString(d, "TILE_THRESHOLD", x) < 0)
     2414        return;
     2415    Py_DECREF(x);
    24162416#endif
    24172417#ifdef CL_TOP_DOWN
    2418         x = PyInt_FromLong(CL_TOP_DOWN);
    2419         if (x == NULL || PyDict_SetItemString(d, "TOP_DOWN", x) < 0)
    2420                 return;
    2421         Py_DECREF(x);
     2418    x = PyInt_FromLong(CL_TOP_DOWN);
     2419    if (x == NULL || PyDict_SetItemString(d, "TOP_DOWN", x) < 0)
     2420        return;
     2421    Py_DECREF(x);
    24222422#endif
    24232423#ifdef CL_ULAW
    2424         x = PyInt_FromLong(CL_ULAW);
    2425         if (x == NULL || PyDict_SetItemString(d, "ULAW", x) < 0)
    2426                 return;
    2427         Py_DECREF(x);
     2424    x = PyInt_FromLong(CL_ULAW);
     2425    if (x == NULL || PyDict_SetItemString(d, "ULAW", x) < 0)
     2426        return;
     2427    Py_DECREF(x);
    24282428#endif
    24292429#ifdef CL_UNCOMPRESSED
    2430         x = PyInt_FromLong(CL_UNCOMPRESSED);
    2431         if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED", x) < 0)
    2432                 return;
    2433         Py_DECREF(x);
     2430    x = PyInt_FromLong(CL_UNCOMPRESSED);
     2431    if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED", x) < 0)
     2432        return;
     2433    Py_DECREF(x);
    24342434#endif
    24352435#ifdef CL_UNCOMPRESSED_AUDIO
    2436         x = PyInt_FromLong(CL_UNCOMPRESSED_AUDIO);
    2437         if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED_AUDIO", x) < 0)
    2438                 return;
    2439         Py_DECREF(x);
     2436    x = PyInt_FromLong(CL_UNCOMPRESSED_AUDIO);
     2437    if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED_AUDIO", x) < 0)
     2438        return;
     2439    Py_DECREF(x);
    24402440#endif
    24412441#ifdef CL_UNCOMPRESSED_VIDEO
    2442         x = PyInt_FromLong(CL_UNCOMPRESSED_VIDEO);
    2443         if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED_VIDEO", x) < 0)
    2444                 return;
    2445         Py_DECREF(x);
     2442    x = PyInt_FromLong(CL_UNCOMPRESSED_VIDEO);
     2443    if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED_VIDEO", x) < 0)
     2444        return;
     2445    Py_DECREF(x);
    24462446#endif
    24472447#ifdef CL_UNKNOWN_SCHEME
    2448         x = PyInt_FromLong(CL_UNKNOWN_SCHEME);
    2449         if (x == NULL || PyDict_SetItemString(d, "UNKNOWN_SCHEME", x) < 0)
    2450                 return;
    2451         Py_DECREF(x);
     2448    x = PyInt_FromLong(CL_UNKNOWN_SCHEME);
     2449    if (x == NULL || PyDict_SetItemString(d, "UNKNOWN_SCHEME", x) < 0)
     2450        return;
     2451    Py_DECREF(x);
    24522452#endif
    24532453#ifdef CL_VIDEO
    2454         x = PyInt_FromLong(CL_VIDEO);
    2455         if (x == NULL || PyDict_SetItemString(d, "VIDEO", x) < 0)
    2456                 return;
    2457         Py_DECREF(x);
     2454    x = PyInt_FromLong(CL_VIDEO);
     2455    if (x == NULL || PyDict_SetItemString(d, "VIDEO", x) < 0)
     2456        return;
     2457    Py_DECREF(x);
    24582458#endif
    24592459#ifdef CL_Y
    2460         x = PyInt_FromLong(CL_Y);
    2461         if (x == NULL || PyDict_SetItemString(d, "Y", x) < 0)
    2462                 return;
    2463         Py_DECREF(x);
     2460    x = PyInt_FromLong(CL_Y);
     2461    if (x == NULL || PyDict_SetItemString(d, "Y", x) < 0)
     2462        return;
     2463    Py_DECREF(x);
    24642464#endif
    24652465#ifdef CL_YCbCr
    2466         x = PyInt_FromLong(CL_YCbCr);
    2467         if (x == NULL || PyDict_SetItemString(d, "YCbCr", x) < 0)
    2468                 return;
    2469         Py_DECREF(x);
     2466    x = PyInt_FromLong(CL_YCbCr);
     2467    if (x == NULL || PyDict_SetItemString(d, "YCbCr", x) < 0)
     2468        return;
     2469    Py_DECREF(x);
    24702470#endif
    24712471#ifdef CL_YCbCr422
    2472         x = PyInt_FromLong(CL_YCbCr422);
    2473         if (x == NULL || PyDict_SetItemString(d, "YCbCr422", x) < 0)
    2474                 return;
    2475         Py_DECREF(x);
     2472    x = PyInt_FromLong(CL_YCbCr422);
     2473    if (x == NULL || PyDict_SetItemString(d, "YCbCr422", x) < 0)
     2474        return;
     2475    Py_DECREF(x);
    24762476#endif
    24772477#ifdef CL_YCbCr422DC
    2478         x = PyInt_FromLong(CL_YCbCr422DC);
    2479         if (x == NULL || PyDict_SetItemString(d, "YCbCr422DC", x) < 0)
    2480                 return;
    2481         Py_DECREF(x);
     2478    x = PyInt_FromLong(CL_YCbCr422DC);
     2479    if (x == NULL || PyDict_SetItemString(d, "YCbCr422DC", x) < 0)
     2480        return;
     2481    Py_DECREF(x);
    24822482#endif
    24832483#ifdef CL_YCbCr422HC
    2484         x = PyInt_FromLong(CL_YCbCr422HC);
    2485         if (x == NULL || PyDict_SetItemString(d, "YCbCr422HC", x) < 0)
    2486                 return;
    2487         Py_DECREF(x);
     2484    x = PyInt_FromLong(CL_YCbCr422HC);
     2485    if (x == NULL || PyDict_SetItemString(d, "YCbCr422HC", x) < 0)
     2486        return;
     2487    Py_DECREF(x);
    24882488#endif
    24892489#ifdef CL_YUV
    2490         x = PyInt_FromLong(CL_YUV);
    2491         if (x == NULL || PyDict_SetItemString(d, "YUV", x) < 0)
    2492                 return;
    2493         Py_DECREF(x);
     2490    x = PyInt_FromLong(CL_YUV);
     2491    if (x == NULL || PyDict_SetItemString(d, "YUV", x) < 0)
     2492        return;
     2493    Py_DECREF(x);
    24942494#endif
    24952495#ifdef CL_YUV422
    2496         x = PyInt_FromLong(CL_YUV422);
    2497         if (x == NULL || PyDict_SetItemString(d, "YUV422", x) < 0)
    2498                 return;
    2499         Py_DECREF(x);
     2496    x = PyInt_FromLong(CL_YUV422);
     2497    if (x == NULL || PyDict_SetItemString(d, "YUV422", x) < 0)
     2498        return;
     2499    Py_DECREF(x);
    25002500#endif
    25012501#ifdef CL_YUV422DC
    2502         x = PyInt_FromLong(CL_YUV422DC);
    2503         if (x == NULL || PyDict_SetItemString(d, "YUV422DC", x) < 0)
    2504                 return;
    2505         Py_DECREF(x);
     2502    x = PyInt_FromLong(CL_YUV422DC);
     2503    if (x == NULL || PyDict_SetItemString(d, "YUV422DC", x) < 0)
     2504        return;
     2505    Py_DECREF(x);
    25062506#endif
    25072507#ifdef CL_YUV422HC
    2508         x = PyInt_FromLong(CL_YUV422HC);
    2509         if (x == NULL || PyDict_SetItemString(d, "YUV422HC", x) < 0)
    2510                 return;
    2511         Py_DECREF(x);
     2508    x = PyInt_FromLong(CL_YUV422HC);
     2509    if (x == NULL || PyDict_SetItemString(d, "YUV422HC", x) < 0)
     2510        return;
     2511    Py_DECREF(x);
    25122512#endif
    25132513#ifdef AWCMP_STEREO
    2514         x = PyInt_FromLong(AWCMP_STEREO);
    2515         if (x == NULL || PyDict_SetItemString(d, "AWCMP_STEREO", x) < 0)
    2516                 return;
    2517         Py_DECREF(x);
     2514    x = PyInt_FromLong(AWCMP_STEREO);
     2515    if (x == NULL || PyDict_SetItemString(d, "AWCMP_STEREO", x) < 0)
     2516        return;
     2517    Py_DECREF(x);
    25182518#endif
    25192519#ifdef AWCMP_JOINT_STEREO
    2520         x = PyInt_FromLong(AWCMP_JOINT_STEREO);
    2521         if (x == NULL || PyDict_SetItemString(d, "AWCMP_JOINT_STEREO", x) < 0)
    2522                 return;
    2523         Py_DECREF(x);
     2520    x = PyInt_FromLong(AWCMP_JOINT_STEREO);
     2521    if (x == NULL || PyDict_SetItemString(d, "AWCMP_JOINT_STEREO", x) < 0)
     2522        return;
     2523    Py_DECREF(x);
    25242524#endif
    25252525#ifdef AWCMP_INDEPENDENT
    2526         x = PyInt_FromLong(AWCMP_INDEPENDENT);
    2527         if (x == NULL || PyDict_SetItemString(d, "AWCMP_INDEPENDENT", x) < 0)
    2528                 return;
    2529         Py_DECREF(x);
     2526    x = PyInt_FromLong(AWCMP_INDEPENDENT);
     2527    if (x == NULL || PyDict_SetItemString(d, "AWCMP_INDEPENDENT", x) < 0)
     2528        return;
     2529    Py_DECREF(x);
    25302530#endif
    25312531#ifdef AWCMP_FIXED_RATE
    2532         x = PyInt_FromLong(AWCMP_FIXED_RATE);
    2533         if (x == NULL || PyDict_SetItemString(d, "AWCMP_FIXED_RATE", x) < 0)
    2534                 return;
    2535         Py_DECREF(x);
     2532    x = PyInt_FromLong(AWCMP_FIXED_RATE);
     2533    if (x == NULL || PyDict_SetItemString(d, "AWCMP_FIXED_RATE", x) < 0)
     2534        return;
     2535    Py_DECREF(x);
    25362536#endif
    25372537#ifdef AWCMP_CONST_QUAL
    2538         x = PyInt_FromLong(AWCMP_CONST_QUAL);
    2539         if (x == NULL || PyDict_SetItemString(d, "AWCMP_CONST_QUAL", x) < 0)
    2540                 return;
    2541         Py_DECREF(x);
     2538    x = PyInt_FromLong(AWCMP_CONST_QUAL);
     2539    if (x == NULL || PyDict_SetItemString(d, "AWCMP_CONST_QUAL", x) < 0)
     2540        return;
     2541    Py_DECREF(x);
    25422542#endif
    25432543#ifdef AWCMP_LOSSLESS
    2544         x = PyInt_FromLong(AWCMP_LOSSLESS);
    2545         if (x == NULL || PyDict_SetItemString(d, "AWCMP_LOSSLESS", x) < 0)
    2546                 return;
    2547         Py_DECREF(x);
     2544    x = PyInt_FromLong(AWCMP_LOSSLESS);
     2545    if (x == NULL || PyDict_SetItemString(d, "AWCMP_LOSSLESS", x) < 0)
     2546        return;
     2547    Py_DECREF(x);
    25482548#endif
    25492549#ifdef AWCMP_MPEG_LAYER_I
    2550         x = PyInt_FromLong(AWCMP_MPEG_LAYER_I);
    2551         if (x == NULL || PyDict_SetItemString(d, "AWCMP_MPEG_LAYER_I", x) < 0)
    2552                 return;
    2553         Py_DECREF(x);
     2550    x = PyInt_FromLong(AWCMP_MPEG_LAYER_I);
     2551    if (x == NULL || PyDict_SetItemString(d, "AWCMP_MPEG_LAYER_I", x) < 0)
     2552        return;
     2553    Py_DECREF(x);
    25542554#endif
    25552555#ifdef AWCMP_MPEG_LAYER_II
    2556         x = PyInt_FromLong(AWCMP_MPEG_LAYER_II);
    2557         if (x == NULL || PyDict_SetItemString(d, "AWCMP_MPEG_LAYER_II", x) < 0)
    2558                 return;
    2559         Py_DECREF(x);
    2560 #endif
    2561 
    2562         (void) clSetErrorHandler(cl_ErrorHandler);
    2563 }
     2556    x = PyInt_FromLong(AWCMP_MPEG_LAYER_II);
     2557    if (x == NULL || PyDict_SetItemString(d, "AWCMP_MPEG_LAYER_II", x) < 0)
     2558        return;
     2559    Py_DECREF(x);
     2560#endif
     2561
     2562    (void) clSetErrorHandler(cl_ErrorHandler);
     2563}
Note: See TracChangeset for help on using the changeset viewer.