annotate Modules/clmodule.c @ 58765:2ba7677bfa95 legacy-trunk

testCopysign was defined twice in test_math; combine the definitions
author Mark Dickinson <dickinsm@gmail.com>
date Sat, 06 Feb 2010 23:11:25 +0000
parents 52294af4b663
children fd25030223b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
1
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
2
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
3 /* Cl objects */
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
4
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
5 #define CLDEBUG
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
6
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
7 #include <stdarg.h>
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
8 #include <cl.h>
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
9 #if defined(CL_JPEG_SOFTWARE) && !defined(CL_JPEG_COSMO)
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
10 #include <dmedia/cl_cosmo.h>
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
11 #endif
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
12 #include "Python.h"
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
13
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
14 typedef struct {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
15 PyObject_HEAD
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
16 int ob_isCompressor; /* Compressor or Decompressor */
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
17 CL_Handle ob_compressorHdl;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
18 int *ob_paramtypes;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
19 int ob_nparams;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
20 } clobject;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
21
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
22 static PyObject *ClError; /* exception cl.error */
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
23
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
24 static int error_handler_called = 0;
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
25
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
26 /*
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
27 * We want to use the function prototypes that are available in the C
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
28 * compiler on the SGI. Because of that, we need to declare the first
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
29 * argument of the compressor and decompressor methods as "object *",
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
30 * even though they are really "clobject *". Therefore we cast the
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
31 * argument to the proper type using this macro.
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
32 */
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
33 #define SELF ((clobject *) self)
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
34
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
35 /********************************************************************
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
36 Utility routines.
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
37 ********************************************************************/
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
38 static void
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
39 cl_ErrorHandler(CL_Handle handle, int code, const char *fmt, ...)
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
40 {
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
41 va_list ap;
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
42 char errbuf[BUFSIZ]; /* hopefully big enough */
1075
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
43 char *p;
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
44
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
45 if (PyErr_Occurred()) /* don't change existing error */
1075
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
46 return;
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
47 error_handler_called = 1;
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
48 va_start(ap, fmt);
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
49 vsprintf(errbuf, fmt, ap);
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
50 va_end(ap);
1075
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
51 p = &errbuf[strlen(errbuf) - 1]; /* swat the line feed */
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
52 if (*p == '\n')
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
53 *p = 0;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
54 PyErr_SetString(ClError, errbuf);
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
55 }
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
56
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
57 /*
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
58 * This assumes that params are always in the range 0 to some maximum.
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
59 */
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
60 static int
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
61 param_type_is_float(clobject *self, int param)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
62 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
63 int bufferlength;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
64
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
65 if (self->ob_paramtypes == NULL) {
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
66 error_handler_called = 0;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
67 bufferlength = clQueryParams(self->ob_compressorHdl, 0, 0);
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
68 if (error_handler_called)
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
69 return -1;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
70
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
71 self->ob_paramtypes = PyMem_NEW(int, bufferlength);
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
72 if (self->ob_paramtypes == NULL)
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
73 return -1;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
74 self->ob_nparams = bufferlength / 2;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
75
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
76 (void) clQueryParams(self->ob_compressorHdl,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
77 self->ob_paramtypes, bufferlength);
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
78 if (error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
79 PyMem_DEL(self->ob_paramtypes);
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
80 self->ob_paramtypes = NULL;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
81 return -1;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
82 }
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
83 }
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
84
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
85 if (param < 0 || param >= self->ob_nparams)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
86 return -1;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
87
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
88 if (self->ob_paramtypes[param*2 + 1] == CL_FLOATING_ENUM_VALUE ||
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
89 self->ob_paramtypes[param*2 + 1] == CL_FLOATING_RANGE_VALUE)
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
90 return 1;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
91 else
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
92 return 0;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
93 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
94
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
95 /********************************************************************
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
96 Single image compression/decompression.
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
97 ********************************************************************/
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
98 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
99 cl_CompressImage(PyObject *self, PyObject *args)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
100 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
101 int compressionScheme, width, height, originalFormat;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
102 float compressionRatio;
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
103 int frameBufferSize, compressedBufferSize;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
104 char *frameBuffer;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
105 PyObject *compressedBuffer;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
106
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
107 if (!PyArg_ParseTuple(args, "iiiifs#", &compressionScheme,
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
108 &width, &height,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
109 &originalFormat, &compressionRatio, &frameBuffer,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
110 &frameBufferSize))
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
111 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
112
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
113 retry:
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
114 compressedBuffer = PyString_FromStringAndSize(NULL, frameBufferSize);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
115 if (compressedBuffer == NULL)
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
116 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
117
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
118 compressedBufferSize = frameBufferSize;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
119 error_handler_called = 0;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
120 if (clCompressImage(compressionScheme, width, height, originalFormat,
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
121 compressionRatio, (void *) frameBuffer,
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
122 &compressedBufferSize,
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
123 (void *) PyString_AsString(compressedBuffer))
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
124 == FAILURE || error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
125 Py_DECREF(compressedBuffer);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
126 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
127 PyErr_SetString(ClError, "clCompressImage failed");
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
128 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
129 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
130
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
131 if (compressedBufferSize > frameBufferSize) {
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
132 frameBufferSize = compressedBufferSize;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
133 Py_DECREF(compressedBuffer);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
134 goto retry;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
135 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
136
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
137 if (compressedBufferSize < frameBufferSize)
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
138 _PyString_Resize(&compressedBuffer, compressedBufferSize);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
139
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
140 return compressedBuffer;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
141 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
142
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
143 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
144 cl_DecompressImage(PyObject *self, PyObject *args)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
145 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
146 int compressionScheme, width, height, originalFormat;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
147 char *compressedBuffer;
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
148 int compressedBufferSize, frameBufferSize;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
149 PyObject *frameBuffer;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
150
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
151 if (!PyArg_ParseTuple(args, "iiiis#", &compressionScheme, &width, &height,
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
152 &originalFormat, &compressedBuffer,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
153 &compressedBufferSize))
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
154 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
155
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
156 frameBufferSize = width * height * CL_BytesPerPixel(originalFormat);
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
157
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
158 frameBuffer = PyString_FromStringAndSize(NULL, frameBufferSize);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
159 if (frameBuffer == NULL)
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
160 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
161
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
162 error_handler_called = 0;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
163 if (clDecompressImage(compressionScheme, width, height, originalFormat,
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
164 compressedBufferSize, compressedBuffer,
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
165 (void *) PyString_AsString(frameBuffer))
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
166 == FAILURE || error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
167 Py_DECREF(frameBuffer);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
168 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
169 PyErr_SetString(ClError, "clDecompressImage failed");
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
170 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
171 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
172
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
173 return frameBuffer;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
174 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
175
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
176 /********************************************************************
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
177 Sequential compression/decompression.
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
178 ********************************************************************/
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
179 #define CheckCompressor(self) if ((self)->ob_compressorHdl == NULL) { \
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
180 PyErr_SetString(PyExc_RuntimeError, "(de)compressor not active"); \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
181 return NULL; \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
182 }
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
183
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
184 static PyObject *
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
185 doClose(clobject *self, int (*close_func)(CL_Handle))
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
186 {
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
187 CheckCompressor(self);
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
188
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
189 error_handler_called = 0;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
190 if ((*close_func)(self->ob_compressorHdl) == FAILURE ||
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
191 error_handler_called) {
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
192 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
193 PyErr_SetString(ClError, "close failed");
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
194 return NULL;
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
195 }
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
196
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
197 self->ob_compressorHdl = NULL;
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
198
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
199 if (self->ob_paramtypes)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
200 PyMem_DEL(self->ob_paramtypes);
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
201 self->ob_paramtypes = NULL;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
202
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
203 Py_INCREF(Py_None);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
204 return Py_None;
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
205 }
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
206
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
207 static PyObject *
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
208 clm_CloseCompressor(PyObject *self)
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
209 {
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
210 return doClose(SELF, clCloseCompressor);
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
211 }
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
212
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
213 static PyObject *
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
214 clm_CloseDecompressor(PyObject *self)
1075
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
215 {
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
216 return doClose(SELF, clCloseDecompressor);
1075
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
217 }
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
218
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
219 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
220 clm_Compress(PyObject *self, PyObject *args)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
221 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
222 int numberOfFrames;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
223 int frameBufferSize, compressedBufferSize, size;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
224 char *frameBuffer;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
225 PyObject *data;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
226
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
227 CheckCompressor(SELF);
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
228
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
229 if (!PyArg_Parse(args, "(is#)", &numberOfFrames,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
230 &frameBuffer, &frameBufferSize))
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
231 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
232
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
233 error_handler_called = 0;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
234 size = clGetParam(SELF->ob_compressorHdl, CL_COMPRESSED_BUFFER_SIZE);
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
235 compressedBufferSize = size;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
236 if (error_handler_called)
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
237 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
238
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
239 data = PyString_FromStringAndSize(NULL, size);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
240 if (data == NULL)
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
241 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
242
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
243 error_handler_called = 0;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
244 if (clCompress(SELF->ob_compressorHdl, numberOfFrames,
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
245 (void *) frameBuffer, &compressedBufferSize,
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
246 (void *) PyString_AsString(data)) == FAILURE ||
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
247 error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
248 Py_DECREF(data);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
249 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
250 PyErr_SetString(ClError, "compress failed");
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
251 return NULL;
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
252 }
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
253
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
254 if (compressedBufferSize < size)
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
255 if (_PyString_Resize(&data, compressedBufferSize))
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
256 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
257
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
258 if (compressedBufferSize > size) {
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
259 /* we didn't get all "compressed" data */
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
260 Py_DECREF(data);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
261 PyErr_SetString(ClError,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
262 "compressed data is more than fitted");
1075
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
263 return NULL;
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
264 }
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
265
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
266 return data;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
267 }
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
268
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
269 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
270 clm_Decompress(PyObject *self, PyObject *args)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
271 {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
272 PyObject *data;
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
273 int numberOfFrames;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
274 char *compressedData;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
275 int compressedDataSize, dataSize;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
276
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
277 CheckCompressor(SELF);
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
278
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
279 if (!PyArg_Parse(args, "(is#)", &numberOfFrames, &compressedData,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
280 &compressedDataSize))
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
281 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
282
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
283 error_handler_called = 0;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
284 dataSize = clGetParam(SELF->ob_compressorHdl, CL_FRAME_BUFFER_SIZE);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
285 if (error_handler_called)
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
286 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
287
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
288 data = PyString_FromStringAndSize(NULL, dataSize);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
289 if (data == NULL)
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
290 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
291
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
292 error_handler_called = 0;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
293 if (clDecompress(SELF->ob_compressorHdl, numberOfFrames,
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
294 compressedDataSize, (void *) compressedData,
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
295 (void *) PyString_AsString(data)) == FAILURE ||
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
296 error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
297 Py_DECREF(data);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
298 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
299 PyErr_SetString(ClError, "decompress failed");
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
300 return NULL;
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
301 }
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
302
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
303 return data;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
304 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
305
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
306 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
307 doParams(clobject *self, PyObject *args, int (*func)(CL_Handle, int *, int),
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
308 int modified)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
309 {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
310 PyObject *list, *v;
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
311 int *PVbuffer;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
312 int length;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
313 int i;
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
314 float number;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
315
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
316 CheckCompressor(self);
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
317
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
318 if (!PyArg_Parse(args, "O", &list))
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
319 return NULL;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
320 if (!PyList_Check(list)) {
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
321 PyErr_BadArgument();
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
322 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
323 }
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
324 length = PyList_Size(list);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
325 PVbuffer = PyMem_NEW(int, length);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
326 if (PVbuffer == NULL)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
327 return PyErr_NoMemory();
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
328 for (i = 0; i < length; i++) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
329 v = PyList_GetItem(list, i);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
330 if (PyFloat_Check(v)) {
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
331 number = PyFloat_AsDouble(v);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
332 PVbuffer[i] = CL_TypeIsInt(number);
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
333 } else if (PyInt_Check(v)) {
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
334 PVbuffer[i] = PyInt_AsLong(v);
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
335 if ((i & 1) &&
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
336 param_type_is_float(self, PVbuffer[i-1]) > 0) {
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
337 number = PVbuffer[i];
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
338 PVbuffer[i] = CL_TypeIsInt(number);
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
339 }
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
340 } else {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
341 PyMem_DEL(PVbuffer);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
342 PyErr_BadArgument();
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
343 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
344 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
345 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
346
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
347 error_handler_called = 0;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
348 (*func)(self->ob_compressorHdl, PVbuffer, length);
1334
f3848f74b282 * clmodule.c (doParams): free PVbuffer in error condition.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1252
diff changeset
349 if (error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
350 PyMem_DEL(PVbuffer);
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
351 return NULL;
1334
f3848f74b282 * clmodule.c (doParams): free PVbuffer in error condition.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1252
diff changeset
352 }
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
353
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
354 if (modified) {
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
355 for (i = 0; i < length; i++) {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
356 if ((i & 1) &&
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
357 param_type_is_float(self, PVbuffer[i-1]) > 0) {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
358 number = CL_TypeIsFloat(PVbuffer[i]);
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
359 v = PyFloat_FromDouble(number);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
360 } else
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
361 v = PyInt_FromLong(PVbuffer[i]);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
362 PyList_SetItem(list, i, v);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
363 }
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
364 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
365
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
366 PyMem_DEL(PVbuffer);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
367
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
368 Py_INCREF(Py_None);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
369 return Py_None;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
370 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
371
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
372 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
373 clm_GetParams(PyObject *self, PyObject *args)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
374 {
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
375 return doParams(SELF, args, clGetParams, 1);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
376 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
377
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
378 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
379 clm_SetParams(PyObject *self, PyObject *args)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
380 {
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
381 return doParams(SELF, args, clSetParams, 0);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
382 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
383
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
384 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
385 do_get(clobject *self, PyObject *args, int (*func)(CL_Handle, int))
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
386 {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
387 int paramID, value;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
388 float fvalue;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
389
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
390 CheckCompressor(self);
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
391
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
392 if (!PyArg_Parse(args, "i", &paramID))
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
393 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
394
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
395 error_handler_called = 0;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
396 value = (*func)(self->ob_compressorHdl, paramID);
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
397 if (error_handler_called)
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
398 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
399
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
400 if (param_type_is_float(self, paramID) > 0) {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
401 fvalue = CL_TypeIsFloat(value);
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
402 return PyFloat_FromDouble(fvalue);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
403 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
404
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
405 return PyInt_FromLong(value);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
406 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
407
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
408 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
409 clm_GetParam(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
410 {
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
411 return do_get(SELF, args, clGetParam);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
412 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
413
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
414 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
415 clm_GetDefault(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
416 {
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
417 return do_get(SELF, args, clGetDefault);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
418 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
419
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
420 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
421 clm_SetParam(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
422 {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
423 int paramID, value;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
424 float fvalue;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
425
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
426 CheckCompressor(SELF);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
427
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
428 if (!PyArg_Parse(args, "(ii)", &paramID, &value)) {
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
429 PyErr_Clear();
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
430 if (!PyArg_Parse(args, "(if)", &paramID, &fvalue)) {
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
431 PyErr_Clear();
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
432 PyErr_SetString(PyExc_TypeError,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
433 "bad argument list (format '(ii)' or '(if)')");
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
434 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
435 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
436 value = CL_TypeIsInt(fvalue);
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
437 } else {
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
438 if (param_type_is_float(SELF, paramID) > 0) {
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
439 fvalue = value;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
440 value = CL_TypeIsInt(fvalue);
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
441 }
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
442 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
443
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
444 error_handler_called = 0;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
445 value = clSetParam(SELF->ob_compressorHdl, paramID, value);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
446 if (error_handler_called)
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
447 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
448
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
449 if (param_type_is_float(SELF, paramID) > 0)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
450 return PyFloat_FromDouble(CL_TypeIsFloat(value));
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
451 else
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
452 return PyInt_FromLong(value);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
453 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
454
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
455 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
456 clm_GetParamID(PyObject *self, PyObject *args)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
457 {
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
458 char *name;
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
459 int value;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
460
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
461 CheckCompressor(SELF);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
462
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
463 if (!PyArg_Parse(args, "s", &name))
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
464 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
465
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
466 error_handler_called = 0;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
467 value = clGetParamID(SELF->ob_compressorHdl, name);
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
468 if (value == FAILURE || error_handler_called) {
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
469 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
470 PyErr_SetString(ClError, "getparamid failed");
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
471 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
472 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
473
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
474 return PyInt_FromLong(value);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
475 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
476
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
477 static PyObject *
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
478 clm_QueryParams(PyObject *self)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
479 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
480 int bufferlength;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
481 int *PVbuffer;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
482 PyObject *list;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
483 int i;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
484
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
485 CheckCompressor(SELF);
1070
1a54d320f296 Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1061
diff changeset
486
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
487 error_handler_called = 0;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
488 bufferlength = clQueryParams(SELF->ob_compressorHdl, 0, 0);
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
489 if (error_handler_called)
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
490 return NULL;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
491
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
492 PVbuffer = PyMem_NEW(int, bufferlength);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
493 if (PVbuffer == NULL)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
494 return PyErr_NoMemory();
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
495
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
496 bufferlength = clQueryParams(SELF->ob_compressorHdl, PVbuffer,
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
497 bufferlength);
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
498 if (error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
499 PyMem_DEL(PVbuffer);
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
500 return NULL;
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
501 }
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
502
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
503 list = PyList_New(bufferlength);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
504 if (list == NULL) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
505 PyMem_DEL(PVbuffer);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
506 return NULL;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
507 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
508
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
509 for (i = 0; i < bufferlength; i++) {
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
510 if (i & 1)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
511 PyList_SetItem(list, i, PyInt_FromLong(PVbuffer[i]));
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
512 else if (PVbuffer[i] == 0) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
513 Py_INCREF(Py_None);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
514 PyList_SetItem(list, i, Py_None);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
515 } else
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
516 PyList_SetItem(list, i,
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
517 PyString_FromString((char *) PVbuffer[i]));
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
518 }
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
519
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
520 PyMem_DEL(PVbuffer);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
521
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
522 return list;
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
523 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
524
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
525 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
526 clm_GetMinMax(PyObject *self, PyObject *args)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
527 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
528 int param, min, max;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
529 float fmin, fmax;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
530
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
531 CheckCompressor(SELF);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
532
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
533 if (!PyArg_Parse(args, "i", &param))
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
534 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
535
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
536 clGetMinMax(SELF->ob_compressorHdl, param, &min, &max);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
537
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
538 if (param_type_is_float(SELF, param) > 0) {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
539 fmin = CL_TypeIsFloat(min);
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
540 fmax = CL_TypeIsFloat(max);
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
541 return Py_BuildValue("(ff)", fmin, fmax);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
542 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
543
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
544 return Py_BuildValue("(ii)", min, max);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
545 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
546
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
547 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
548 clm_GetName(PyObject *self, PyObject *args)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
549 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
550 int param;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
551 char *name;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
552
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
553 CheckCompressor(SELF);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
554
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
555 if (!PyArg_Parse(args, "i", &param))
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
556 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
557
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
558 error_handler_called = 0;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
559 name = clGetName(SELF->ob_compressorHdl, param);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
560 if (name == NULL || error_handler_called) {
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
561 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
562 PyErr_SetString(ClError, "getname failed");
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
563 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
564 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
565
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
566 return PyString_FromString(name);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
567 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
568
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
569 static PyObject *
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
570 clm_QuerySchemeFromHandle(PyObject *self)
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
571 {
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
572 CheckCompressor(SELF);
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
573 return PyInt_FromLong(clQuerySchemeFromHandle(SELF->ob_compressorHdl));
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
574 }
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
575
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
576 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
577 clm_ReadHeader(PyObject *self, PyObject *args)
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
578 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
579 char *header;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
580 int headerSize;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
581
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
582 CheckCompressor(SELF);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
583
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
584 if (!PyArg_Parse(args, "s#", &header, &headerSize))
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
585 return NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
586
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
587 return PyInt_FromLong(clReadHeader(SELF->ob_compressorHdl,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
588 headerSize, header));
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
589 }
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
590
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
591 static PyMethodDef compressor_methods[] = {
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
592 {"close", clm_CloseCompressor, METH_NOARGS}, /* alias */
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
593 {"CloseCompressor", clm_CloseCompressor, METH_NOARGS},
21757
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
594 {"Compress", clm_Compress, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
595 {"GetDefault", clm_GetDefault, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
596 {"GetMinMax", clm_GetMinMax, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
597 {"GetName", clm_GetName, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
598 {"GetParam", clm_GetParam, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
599 {"GetParamID", clm_GetParamID, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
600 {"GetParams", clm_GetParams, METH_OLDARGS},
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
601 {"QueryParams", clm_QueryParams, METH_NOARGS},
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
602 {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_NOARGS},
21757
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
603 {"SetParam", clm_SetParam, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
604 {"SetParams", clm_SetParams, METH_OLDARGS},
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
605 {NULL, NULL} /* sentinel */
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
606 };
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
607
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
608 static PyMethodDef decompressor_methods[] = {
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
609 {"close", clm_CloseDecompressor, METH_NOARGS}, /* alias */
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
610 {"CloseDecompressor", clm_CloseDecompressor, METH_NOARGS},
21757
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
611 {"Decompress", clm_Decompress, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
612 {"GetDefault", clm_GetDefault, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
613 {"GetMinMax", clm_GetMinMax, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
614 {"GetName", clm_GetName, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
615 {"GetParam", clm_GetParam, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
616 {"GetParamID", clm_GetParamID, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
617 {"GetParams", clm_GetParams, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
618 {"ReadHeader", clm_ReadHeader, METH_OLDARGS},
22708
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
619 {"QueryParams", clm_QueryParams, METH_NOARGS},
aea6dfeaaab8 Convert from using METH_OLDARGS to METH_NOARGS.
Neal Norwitz <nnorwitz@gmail.com>
parents: 21757
diff changeset
620 {"QuerySchemeFromHandle",clm_QuerySchemeFromHandle, METH_NOARGS},
21757
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
621 {"SetParam", clm_SetParam, METH_OLDARGS},
40631ae74b17 Patch #477750: Use METH_ constants in Modules.
Martin v. Löwis <martin@v.loewis.de>
parents: 21313
diff changeset
622 {"SetParams", clm_SetParams, METH_OLDARGS},
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
623 {NULL, NULL} /* sentinel */
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
624 };
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
625
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
626 static void
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
627 cl_dealloc(PyObject *self)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
628 {
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
629 if (SELF->ob_compressorHdl) {
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
630 if (SELF->ob_isCompressor)
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
631 clCloseCompressor(SELF->ob_compressorHdl);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
632 else
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
633 clCloseDecompressor(SELF->ob_compressorHdl);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
634 }
12576
1c7c2dd1beb1 Vladimir Marangozov's long-awaited malloc restructuring.
Guido van Rossum <guido@python.org>
parents: 6457
diff changeset
635 PyObject_Del(self);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
636 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
637
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
638 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
639 cl_getattr(PyObject *self, char *name)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
640 {
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
641 if (SELF->ob_isCompressor)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
642 return Py_FindMethod(compressor_methods, self, name);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
643 else
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
644 return Py_FindMethod(decompressor_methods, self, name);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
645 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
646
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
647 static PyTypeObject Cltype = {
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
648 PyObject_HEAD_INIT(&PyType_Type)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
649 0, /*ob_size*/
21313
91dd223829c6 Patch supplied by Burton Radons for his own SF bug #487390: Modifying
Guido van Rossum <guido@python.org>
parents: 14375
diff changeset
650 "cl.cl", /*tp_name*/
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
651 sizeof(clobject), /*tp_size*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
652 0, /*tp_itemsize*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
653 /* methods */
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1334
diff changeset
654 (destructor)cl_dealloc, /*tp_dealloc*/
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
655 0, /*tp_print*/
1746
1940892d2fe3 Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents: 1334
diff changeset
656 (getattrfunc)cl_getattr, /*tp_getattr*/
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
657 0, /*tp_setattr*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
658 0, /*tp_compare*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
659 0, /*tp_repr*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
660 0, /*tp_as_number*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
661 0, /*tp_as_sequence*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
662 0, /*tp_as_mapping*/
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
663 };
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
664
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
665 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
666 doOpen(PyObject *self, PyObject *args, int (*open_func)(int, CL_Handle *),
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
667 int iscompressor)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
668 {
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
669 int scheme;
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
670 clobject *new;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
671
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
672 if (!PyArg_ParseTuple(args, "i", &scheme))
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
673 return NULL;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
674
12576
1c7c2dd1beb1 Vladimir Marangozov's long-awaited malloc restructuring.
Guido van Rossum <guido@python.org>
parents: 6457
diff changeset
675 new = PyObject_New(clobject, &Cltype);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
676 if (new == NULL)
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
677 return NULL;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
678
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
679 new->ob_compressorHdl = NULL;
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
680 new->ob_isCompressor = iscompressor;
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
681 new->ob_paramtypes = NULL;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
682
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
683 error_handler_called = 0;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
684 if ((*open_func)(scheme, &new->ob_compressorHdl) == FAILURE ||
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
685 error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
686 Py_DECREF(new);
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
687 if (!error_handler_called)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
688 PyErr_SetString(ClError, "Open(De)Compressor failed");
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
689 return NULL;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
690 }
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
691 return (PyObject *)new;
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
692 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
693
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
694 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
695 cl_OpenCompressor(PyObject *self, PyObject *args)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
696 {
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
697 return doOpen(self, args, clOpenCompressor, 1);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
698 }
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
699
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
700 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
701 cl_OpenDecompressor(PyObject *self, PyObject *args)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
702 {
1116
c26f5bec3438 adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1075
diff changeset
703 return doOpen(self, args, clOpenDecompressor, 0);
1075
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
704 }
98cb6a1252cb Lots of little fixes.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1070
diff changeset
705
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
706 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
707 cl_QueryScheme(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
708 {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
709 char *header;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
710 int headerlen;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
711 int scheme;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
712
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
713 if (!PyArg_ParseTuple(args, "s#", &header, &headerlen))
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
714 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
715
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
716 scheme = clQueryScheme(header);
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
717 if (scheme < 0) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
718 PyErr_SetString(ClError, "unknown compression scheme");
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
719 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
720 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
721
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
722 return PyInt_FromLong(scheme);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
723 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
724
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
725 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
726 cl_QueryMaxHeaderSize(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
727 {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
728 int scheme;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
729
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
730 if (!PyArg_ParseTuple(args, "i", &scheme))
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
731 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
732
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
733 return PyInt_FromLong(clQueryMaxHeaderSize(scheme));
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
734 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
735
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
736 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
737 cl_QueryAlgorithms(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
738 {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
739 int algorithmMediaType;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
740 int bufferlength;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
741 int *PVbuffer;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
742 PyObject *list;
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
743 int i;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
744
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
745 if (!PyArg_ParseTuple(args, "i", &algorithmMediaType))
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
746 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
747
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
748 error_handler_called = 0;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
749 bufferlength = clQueryAlgorithms(algorithmMediaType, 0, 0);
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
750 if (error_handler_called)
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
751 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
752
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
753 PVbuffer = PyMem_NEW(int, bufferlength);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
754 if (PVbuffer == NULL)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
755 return PyErr_NoMemory();
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
756
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
757 bufferlength = clQueryAlgorithms(algorithmMediaType, PVbuffer,
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
758 bufferlength);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
759 if (error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
760 PyMem_DEL(PVbuffer);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
761 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
762 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
763
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
764 list = PyList_New(bufferlength);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
765 if (list == NULL) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
766 PyMem_DEL(PVbuffer);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
767 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
768 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
769
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
770 for (i = 0; i < bufferlength; i++) {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
771 if (i & 1)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
772 PyList_SetItem(list, i, PyInt_FromLong(PVbuffer[i]));
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
773 else if (PVbuffer[i] == 0) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
774 Py_INCREF(Py_None);
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
775 PyList_SetItem(list, i, Py_None);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
776 } else
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
777 PyList_SetItem(list, i,
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
778 PyString_FromString((char *) PVbuffer[i]));
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
779 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
780
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
781 PyMem_DEL(PVbuffer);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
782
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
783 return list;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
784 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
785
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
786 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
787 cl_QuerySchemeFromName(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
788 {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
789 int algorithmMediaType;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
790 char *name;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
791 int scheme;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
792
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
793 if (!PyArg_ParseTuple(args, "is", &algorithmMediaType, &name))
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
794 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
795
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
796 error_handler_called = 0;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
797 scheme = clQuerySchemeFromName(algorithmMediaType, name);
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
798 if (error_handler_called) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
799 PyErr_SetString(ClError, "unknown compression scheme");
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
800 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
801 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
802
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
803 return PyInt_FromLong(scheme);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
804 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
805
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
806 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
807 cl_GetAlgorithmName(PyObject *self, PyObject *args)
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
808 {
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
809 int scheme;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
810 char *name;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
811
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
812 if (!PyArg_ParseTuple(args, "i", &scheme))
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
813 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
814
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
815 name = clGetAlgorithmName(scheme);
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
816 if (name == 0) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
817 PyErr_SetString(ClError, "unknown compression scheme");
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
818 return NULL;
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
819 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
820
47527
52294af4b663 This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents: 47294
diff changeset
821 return PyString_FromString(name);
1205
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
822 }
ecfbc246eeaa CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents: 1116
diff changeset
823
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
824 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
825 do_set(PyObject *self, PyObject *args, int (*func)(int, int, int))
1222
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
826 {
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
827 int scheme, paramID, value;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
828 float fvalue;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
829 int is_float = 0;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
830
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
831 if (!PyArg_ParseTuple(args, "iii", &scheme, &paramID, &value)) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
832 PyErr_Clear();
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
833 if (!PyArg_ParseTuple(args, "iif", &scheme, &paramID, &fvalue)) {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
834 PyErr_Clear();
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
835 PyErr_SetString(PyExc_TypeError,
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
836 "bad argument list (format '(iii)' or '(iif)')");
1222
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
837 return NULL;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
838 }
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
839 value = CL_TypeIsInt(fvalue);
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
840 is_float = 1;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
841 } else {
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
842 /* check some parameters which we know to be floats */
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
843 switch (scheme) {
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
844 case CL_COMPRESSION_RATIO:
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
845 case CL_SPEED:
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
846 fvalue = value;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
847 value = CL_TypeIsInt(fvalue);
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
848 is_float = 1;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
849 break;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
850 }
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
851 }
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
852
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
853 error_handler_called = 0;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
854 value = (*func)(scheme, paramID, value);
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
855 if (error_handler_called)
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
856 return NULL;
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
857
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
858 if (is_float)
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
859 return PyFloat_FromDouble(CL_TypeIsFloat(value));
1222
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
860 else
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
861 return PyInt_FromLong(value);
1222
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
862 }
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
863
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
864 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
865 cl_SetDefault(PyObject *self, PyObject *args)
1222
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
866 {
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
867 return do_set(self, args, clSetDefault);
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
868 }
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
869
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
870 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
871 cl_SetMin(PyObject *self, PyObject *args)
1222
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
872 {
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
873 return do_set(self, args, clSetMin);
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
874 }
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
875
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
876 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
877 cl_SetMax(PyObject *self, PyObject *args)
1222
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
878 {
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
879 return do_set(self, args, clSetMax);
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
880 }
ce7ae8f81b06 * clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents: 1219
diff changeset
881
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
882 #define func(name, handler) \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
883 static PyObject *cl_##name(PyObject *self, PyObject *args) \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
884 { \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
885 int x; \
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
886 if (!PyArg_ParseTuple(args, "i", &x)) return NULL; \
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
887 return Py##handler(CL_##name(x)); \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
888 }
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
889
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
890 #define func2(name, handler) \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
891 static PyObject *cl_##name(PyObject *self, PyObject *args) \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
892 { \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
893 int a1, a2; \
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
894 if (!PyArg_ParseTuple(args, "ii", &a1, &a2)) return NULL; \
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
895 return Py##handler(CL_##name(a1, a2)); \
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
896 }
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
897
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
898 func(BytesPerSample, Int_FromLong)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
899 func(BytesPerPixel, Int_FromLong)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
900 func(AudioFormatName, String_FromString)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
901 func(VideoFormatName, String_FromString)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
902 func(AlgorithmNumber, Int_FromLong)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
903 func(AlgorithmType, Int_FromLong)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
904 func2(Algorithm, Int_FromLong)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
905 func(ParamNumber, Int_FromLong)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
906 func(ParamType, Int_FromLong)
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
907 func2(ParamID, Int_FromLong)
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
908
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
909 #ifdef CLDEBUG
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
910 static PyObject *
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
911 cvt_type(PyObject *self, PyObject *args)
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
912 {
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
913 int number;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
914 float fnumber;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
915
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
916 if (PyArg_Parse(args, "i", &number))
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
917 return PyFloat_FromDouble(CL_TypeIsFloat(number));
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
918 else {
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
919 PyErr_Clear();
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
920 if (PyArg_Parse(args, "f", &fnumber))
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
921 return PyInt_FromLong(CL_TypeIsInt(fnumber));
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
922 return NULL;
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
923 }
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
924 }
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
925 #endif
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
926
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
927 static PyMethodDef cl_methods[] = {
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
928 {"CompressImage", cl_CompressImage, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
929 {"DecompressImage", cl_DecompressImage, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
930 {"GetAlgorithmName", cl_GetAlgorithmName, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
931 {"OpenCompressor", cl_OpenCompressor, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
932 {"OpenDecompressor", cl_OpenDecompressor, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
933 {"QueryAlgorithms", cl_QueryAlgorithms, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
934 {"QueryMaxHeaderSize", cl_QueryMaxHeaderSize, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
935 {"QueryScheme", cl_QueryScheme, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
936 {"QuerySchemeFromName", cl_QuerySchemeFromName, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
937 {"SetDefault", cl_SetDefault, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
938 {"SetMax", cl_SetMax, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
939 {"SetMin", cl_SetMin, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
940 {"BytesPerSample", cl_BytesPerSample, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
941 {"BytesPerPixel", cl_BytesPerPixel, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
942 {"AudioFormatName", cl_AudioFormatName, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
943 {"VideoFormatName", cl_VideoFormatName, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
944 {"AlgorithmNumber", cl_AlgorithmNumber, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
945 {"AlgorithmType", cl_AlgorithmType, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
946 {"Algorithm", cl_Algorithm, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
947 {"ParamNumber", cl_ParamNumber, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
948 {"ParamType", cl_ParamType, METH_VARARGS},
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
949 {"ParamID", cl_ParamID, METH_VARARGS},
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
950 #ifdef CLDEBUG
22772
59d3913a29c4 Convert more METH_OLDARGS & PyArg_Parse()
Neal Norwitz <nnorwitz@gmail.com>
parents: 22708
diff changeset
951 {"cvt_type", cvt_type, METH_VARARGS},
1219
64ec7bd2e837 * clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents: 1205
diff changeset
952 #endif
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
953 {NULL, NULL} /* Sentinel */
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
954 };
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
955
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
956 #ifdef CL_JPEG_SOFTWARE
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
957 #define IRIX_5_3_LIBRARY
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
958 #endif
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
959
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
960 void
13651
8a063423e0b7 Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',
Thomas Wouters <thomas@python.org>
parents: 13256
diff changeset
961 initcl(void)
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
962 {
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
963 PyObject *m, *d, *x;
47002
71aa903eb7ac Deprecate CL, CL_old, and cl for 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 36324
diff changeset
964
71aa903eb7ac Deprecate CL, CL_old, and cl for 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 36324
diff changeset
965 if (PyErr_WarnPy3k("the cl module has been removed in "
71aa903eb7ac Deprecate CL, CL_old, and cl for 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 36324
diff changeset
966 "Python 3.0", 2) < 0)
71aa903eb7ac Deprecate CL, CL_old, and cl for 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 36324
diff changeset
967 return;
71aa903eb7ac Deprecate CL, CL_old, and cl for 3.0.
Brett Cannon <bcannon@gmail.com>
parents: 36324
diff changeset
968
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
969 m = Py_InitModule("cl", cl_methods);
36324
1af7f719ed28 Check return result from Py_InitModule*(). This API can fail.
Neal Norwitz <nnorwitz@gmail.com>
parents: 23295
diff changeset
970 if (m == NULL)
1af7f719ed28 Check return result from Py_InitModule*(). This API can fail.
Neal Norwitz <nnorwitz@gmail.com>
parents: 23295
diff changeset
971 return;
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
972 d = PyModule_GetDict(m);
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
973
6367
2c29b8982643 Apply two changes, systematically:
Guido van Rossum <guido@python.org>
parents: 5985
diff changeset
974 ClError = PyErr_NewException("cl.error", NULL, NULL);
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
975 (void) PyDict_SetItemString(d, "error", ClError);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
976
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
977 #ifdef CL_ADDED_ALGORITHM_ERROR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
978 x = PyInt_FromLong(CL_ADDED_ALGORITHM_ERROR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
979 if (x == NULL || PyDict_SetItemString(d, "ADDED_ALGORITHM_ERROR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
980 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
981 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
982 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
983 #ifdef CL_ALAW
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
984 x = PyInt_FromLong(CL_ALAW);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
985 if (x == NULL || PyDict_SetItemString(d, "ALAW", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
986 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
987 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
988 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
989 #ifdef CL_ALGORITHM_ID
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
990 x = PyInt_FromLong(CL_ALGORITHM_ID);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
991 if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_ID", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
992 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
993 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
994 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
995 #ifdef CL_ALGORITHM_TABLE_FULL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
996 x = PyInt_FromLong(CL_ALGORITHM_TABLE_FULL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
997 if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_TABLE_FULL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
998 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
999 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1000 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1001 #ifdef CL_ALGORITHM_VERSION
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1002 x = PyInt_FromLong(CL_ALGORITHM_VERSION);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1003 if (x == NULL || PyDict_SetItemString(d, "ALGORITHM_VERSION", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1004 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1005 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1006 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1007 #ifdef CL_ALG_AUDIO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1008 x = PyInt_FromLong(CL_ALG_AUDIO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1009 if (x == NULL || PyDict_SetItemString(d, "ALG_AUDIO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1010 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1011 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1012 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1013 #ifdef CL_ALG_VIDEO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1014 x = PyInt_FromLong(CL_ALG_VIDEO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1015 if (x == NULL || PyDict_SetItemString(d, "ALG_VIDEO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1016 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1017 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1018 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1019 #ifdef CL_AUDIO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1020 x = PyInt_FromLong(CL_AUDIO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1021 if (x == NULL || PyDict_SetItemString(d, "AUDIO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1022 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1023 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1024 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1025 #ifdef CL_AWARE_BITRATE_POLICY
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1026 x = PyInt_FromLong(CL_AWARE_BITRATE_POLICY);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1027 if (x == NULL || PyDict_SetItemString(d, "AWARE_BITRATE_POLICY", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1028 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1029 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1030 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1031 #ifdef CL_AWARE_BITRATE_TARGET
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1032 x = PyInt_FromLong(CL_AWARE_BITRATE_TARGET);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1033 if (x == NULL || PyDict_SetItemString(d, "AWARE_BITRATE_TARGET", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1034 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1035 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1036 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1037 #ifdef CL_AWARE_CHANNEL_POLICY
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1038 x = PyInt_FromLong(CL_AWARE_CHANNEL_POLICY);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1039 if (x == NULL || PyDict_SetItemString(d, "AWARE_CHANNEL_POLICY", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1040 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1041 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1042 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1043 #ifdef CL_AWARE_CONST_QUAL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1044 x = PyInt_FromLong(CL_AWARE_CONST_QUAL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1045 if (x == NULL || PyDict_SetItemString(d, "AWARE_CONST_QUAL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1046 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1047 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1048 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1049 #ifdef CL_AWARE_ERROR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1050 x = PyInt_FromLong(CL_AWARE_ERROR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1051 if (x == NULL || PyDict_SetItemString(d, "AWARE_ERROR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1052 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1053 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1054 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1055 #ifdef CL_AWARE_FIXED_RATE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1056 x = PyInt_FromLong(CL_AWARE_FIXED_RATE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1057 if (x == NULL || PyDict_SetItemString(d, "AWARE_FIXED_RATE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1058 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1059 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1060 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1061 #ifdef CL_AWARE_INDEPENDENT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1062 x = PyInt_FromLong(CL_AWARE_INDEPENDENT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1063 if (x == NULL || PyDict_SetItemString(d, "AWARE_INDEPENDENT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1064 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1065 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1066 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1067 #ifdef CL_AWARE_JOINT_STEREO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1068 x = PyInt_FromLong(CL_AWARE_JOINT_STEREO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1069 if (x == NULL || PyDict_SetItemString(d, "AWARE_JOINT_STEREO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1070 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1071 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1072 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1073 #ifdef CL_AWARE_LAYER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1074 x = PyInt_FromLong(CL_AWARE_LAYER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1075 if (x == NULL || PyDict_SetItemString(d, "AWARE_LAYER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1076 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1077 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1078 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1079 #ifdef CL_AWARE_LOSSLESS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1080 x = PyInt_FromLong(CL_AWARE_LOSSLESS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1081 if (x == NULL || PyDict_SetItemString(d, "AWARE_LOSSLESS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1082 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1083 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1084 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1085 #ifdef CL_AWARE_MPEG_AUDIO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1086 x = PyInt_FromLong(CL_AWARE_MPEG_AUDIO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1087 if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_AUDIO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1088 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1089 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1090 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1091 #ifdef CL_AWARE_MPEG_LAYER_I
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1092 x = PyInt_FromLong(CL_AWARE_MPEG_LAYER_I);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1093 if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_LAYER_I", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1094 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1095 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1096 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1097 #ifdef CL_AWARE_MPEG_LAYER_II
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1098 x = PyInt_FromLong(CL_AWARE_MPEG_LAYER_II);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1099 if (x == NULL || PyDict_SetItemString(d, "AWARE_MPEG_LAYER_II", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1100 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1101 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1102 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1103 #ifdef CL_AWARE_MULTIRATE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1104 x = PyInt_FromLong(CL_AWARE_MULTIRATE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1105 if (x == NULL || PyDict_SetItemString(d, "AWARE_MULTIRATE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1106 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1107 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1108 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1109 #ifdef CL_AWARE_NOISE_MARGIN
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1110 x = PyInt_FromLong(CL_AWARE_NOISE_MARGIN);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1111 if (x == NULL || PyDict_SetItemString(d, "AWARE_NOISE_MARGIN", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1112 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1113 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1114 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1115 #ifdef CL_AWARE_STEREO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1116 x = PyInt_FromLong(CL_AWARE_STEREO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1117 if (x == NULL || PyDict_SetItemString(d, "AWARE_STEREO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1118 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1119 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1120 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1121 #ifdef CL_BAD_ALGORITHM_NAME
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1122 x = PyInt_FromLong(CL_BAD_ALGORITHM_NAME);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1123 if (x == NULL || PyDict_SetItemString(d, "BAD_ALGORITHM_NAME", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1124 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1125 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1126 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1127 #ifdef CL_BAD_ALGORITHM_TYPE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1128 x = PyInt_FromLong(CL_BAD_ALGORITHM_TYPE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1129 if (x == NULL || PyDict_SetItemString(d, "BAD_ALGORITHM_TYPE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1130 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1131 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1132 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1133 #ifdef CL_BAD_BLOCK_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1134 x = PyInt_FromLong(CL_BAD_BLOCK_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1135 if (x == NULL || PyDict_SetItemString(d, "BAD_BLOCK_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1136 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1137 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1138 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1139 #ifdef CL_BAD_BOARD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1140 x = PyInt_FromLong(CL_BAD_BOARD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1141 if (x == NULL || PyDict_SetItemString(d, "BAD_BOARD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1142 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1143 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1144 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1145 #ifdef CL_BAD_BUFFERING
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1146 x = PyInt_FromLong(CL_BAD_BUFFERING);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1147 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERING", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1148 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1149 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1150 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1151 #ifdef CL_BAD_BUFFERLENGTH_NEG
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1152 x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_NEG);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1153 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERLENGTH_NEG", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1154 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1155 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1156 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1157 #ifdef CL_BAD_BUFFERLENGTH_ODD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1158 x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_ODD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1159 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFERLENGTH_ODD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1160 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1161 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1162 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1163 #ifdef CL_BAD_BUFFER_EXISTS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1164 x = PyInt_FromLong(CL_BAD_BUFFER_EXISTS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1165 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_EXISTS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1166 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1167 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1168 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1169 #ifdef CL_BAD_BUFFER_HANDLE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1170 x = PyInt_FromLong(CL_BAD_BUFFER_HANDLE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1171 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_HANDLE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1172 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1173 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1174 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1175 #ifdef CL_BAD_BUFFER_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1176 x = PyInt_FromLong(CL_BAD_BUFFER_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1177 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1178 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1179 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1180 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1181 #ifdef CL_BAD_BUFFER_QUERY_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1182 x = PyInt_FromLong(CL_BAD_BUFFER_QUERY_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1183 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_QUERY_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1184 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1185 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1186 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1187 #ifdef CL_BAD_BUFFER_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1188 x = PyInt_FromLong(CL_BAD_BUFFER_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1189 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1190 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1191 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1192 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1193 #ifdef CL_BAD_BUFFER_SIZE_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1194 x = PyInt_FromLong(CL_BAD_BUFFER_SIZE_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1195 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_SIZE_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1196 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1197 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1198 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1199 #ifdef CL_BAD_BUFFER_TYPE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1200 x = PyInt_FromLong(CL_BAD_BUFFER_TYPE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1201 if (x == NULL || PyDict_SetItemString(d, "BAD_BUFFER_TYPE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1202 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1203 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1204 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1205 #ifdef CL_BAD_COMPRESSION_SCHEME
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1206 x = PyInt_FromLong(CL_BAD_COMPRESSION_SCHEME);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1207 if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSION_SCHEME", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1208 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1209 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1210 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1211 #ifdef CL_BAD_COMPRESSOR_HANDLE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1212 x = PyInt_FromLong(CL_BAD_COMPRESSOR_HANDLE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1213 if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSOR_HANDLE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1214 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1215 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1216 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1217 #ifdef CL_BAD_COMPRESSOR_HANDLE_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1218 x = PyInt_FromLong(CL_BAD_COMPRESSOR_HANDLE_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1219 if (x == NULL || PyDict_SetItemString(d, "BAD_COMPRESSOR_HANDLE_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1220 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1221 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1222 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1223 #ifdef CL_BAD_FRAME_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1224 x = PyInt_FromLong(CL_BAD_FRAME_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1225 if (x == NULL || PyDict_SetItemString(d, "BAD_FRAME_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1226 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1227 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1228 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1229 #ifdef CL_BAD_FUNCTIONALITY
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1230 x = PyInt_FromLong(CL_BAD_FUNCTIONALITY);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1231 if (x == NULL || PyDict_SetItemString(d, "BAD_FUNCTIONALITY", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1232 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1233 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1234 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1235 #ifdef CL_BAD_FUNCTION_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1236 x = PyInt_FromLong(CL_BAD_FUNCTION_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1237 if (x == NULL || PyDict_SetItemString(d, "BAD_FUNCTION_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1238 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1239 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1240 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1241 #ifdef CL_BAD_HEADER_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1242 x = PyInt_FromLong(CL_BAD_HEADER_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1243 if (x == NULL || PyDict_SetItemString(d, "BAD_HEADER_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1244 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1245 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1246 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1247 #ifdef CL_BAD_INITIAL_VALUE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1248 x = PyInt_FromLong(CL_BAD_INITIAL_VALUE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1249 if (x == NULL || PyDict_SetItemString(d, "BAD_INITIAL_VALUE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1250 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1251 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1252 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1253 #ifdef CL_BAD_INTERNAL_FORMAT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1254 x = PyInt_FromLong(CL_BAD_INTERNAL_FORMAT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1255 if (x == NULL || PyDict_SetItemString(d, "BAD_INTERNAL_FORMAT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1256 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1257 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1258 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1259 #ifdef CL_BAD_LICENSE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1260 x = PyInt_FromLong(CL_BAD_LICENSE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1261 if (x == NULL || PyDict_SetItemString(d, "BAD_LICENSE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1262 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1263 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1264 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1265 #ifdef CL_BAD_MIN_GT_MAX
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1266 x = PyInt_FromLong(CL_BAD_MIN_GT_MAX);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1267 if (x == NULL || PyDict_SetItemString(d, "BAD_MIN_GT_MAX", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1268 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1269 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1270 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1271 #ifdef CL_BAD_NO_BUFFERSPACE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1272 x = PyInt_FromLong(CL_BAD_NO_BUFFERSPACE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1273 if (x == NULL || PyDict_SetItemString(d, "BAD_NO_BUFFERSPACE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1274 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1275 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1276 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1277 #ifdef CL_BAD_NUMBER_OF_BLOCKS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1278 x = PyInt_FromLong(CL_BAD_NUMBER_OF_BLOCKS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1279 if (x == NULL || PyDict_SetItemString(d, "BAD_NUMBER_OF_BLOCKS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1280 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1281 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1282 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1283 #ifdef CL_BAD_PARAM
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1284 x = PyInt_FromLong(CL_BAD_PARAM);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1285 if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1286 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1287 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1288 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1289 #ifdef CL_BAD_PARAM_ID_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1290 x = PyInt_FromLong(CL_BAD_PARAM_ID_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1291 if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM_ID_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1292 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1293 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1294 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1295 #ifdef CL_BAD_PARAM_TYPE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1296 x = PyInt_FromLong(CL_BAD_PARAM_TYPE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1297 if (x == NULL || PyDict_SetItemString(d, "BAD_PARAM_TYPE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1298 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1299 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1300 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1301 #ifdef CL_BAD_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1302 x = PyInt_FromLong(CL_BAD_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1303 if (x == NULL || PyDict_SetItemString(d, "BAD_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1304 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1305 Py_DECREF(x);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1306 #endif
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1307 #ifdef CL_BAD_PVBUFFER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1308 x = PyInt_FromLong(CL_BAD_PVBUFFER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1309 if (x == NULL || PyDict_SetItemString(d, "BAD_PVBUFFER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1310 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1311 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1312 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1313 #ifdef CL_BAD_SCHEME_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1314 x = PyInt_FromLong(CL_BAD_SCHEME_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1315 if (x == NULL || PyDict_SetItemString(d, "BAD_SCHEME_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1316 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1317 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1318 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1319 #ifdef CL_BAD_STREAM_HEADER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1320 x = PyInt_FromLong(CL_BAD_STREAM_HEADER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1321 if (x == NULL || PyDict_SetItemString(d, "BAD_STREAM_HEADER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1322 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1323 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1324 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1325 #ifdef CL_BAD_STRING_POINTER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1326 x = PyInt_FromLong(CL_BAD_STRING_POINTER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1327 if (x == NULL || PyDict_SetItemString(d, "BAD_STRING_POINTER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1328 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1329 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1330 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1331 #ifdef CL_BAD_TEXT_STRING_PTR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1332 x = PyInt_FromLong(CL_BAD_TEXT_STRING_PTR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1333 if (x == NULL || PyDict_SetItemString(d, "BAD_TEXT_STRING_PTR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1334 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1335 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1336 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1337 #ifdef CL_BEST_FIT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1338 x = PyInt_FromLong(CL_BEST_FIT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1339 if (x == NULL || PyDict_SetItemString(d, "BEST_FIT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1340 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1341 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1342 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1343 #ifdef CL_BIDIRECTIONAL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1344 x = PyInt_FromLong(CL_BIDIRECTIONAL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1345 if (x == NULL || PyDict_SetItemString(d, "BIDIRECTIONAL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1346 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1347 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1348 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1349 #ifdef CL_BITRATE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1350 x = PyInt_FromLong(CL_BITRATE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1351 if (x == NULL || PyDict_SetItemString(d, "BITRATE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1352 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1353 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1354 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1355 #ifdef CL_BITRATE_POLICY
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1356 x = PyInt_FromLong(CL_BITRATE_POLICY);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1357 if (x == NULL || PyDict_SetItemString(d, "BITRATE_POLICY", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1358 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1359 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1360 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1361 #ifdef CL_BITRATE_TARGET
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1362 x = PyInt_FromLong(CL_BITRATE_TARGET);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1363 if (x == NULL || PyDict_SetItemString(d, "BITRATE_TARGET", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1364 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1365 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1366 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1367 #ifdef CL_BITS_PER_COMPONENT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1368 x = PyInt_FromLong(CL_BITS_PER_COMPONENT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1369 if (x == NULL || PyDict_SetItemString(d, "BITS_PER_COMPONENT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1370 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1371 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1372 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1373 #ifdef CL_BLENDING
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1374 x = PyInt_FromLong(CL_BLENDING);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1375 if (x == NULL || PyDict_SetItemString(d, "BLENDING", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1376 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1377 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1378 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1379 #ifdef CL_BLOCK_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1380 x = PyInt_FromLong(CL_BLOCK_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1381 if (x == NULL || PyDict_SetItemString(d, "BLOCK_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1382 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1383 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1384 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1385 #ifdef CL_BOTTOM_UP
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1386 x = PyInt_FromLong(CL_BOTTOM_UP);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1387 if (x == NULL || PyDict_SetItemString(d, "BOTTOM_UP", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1388 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1389 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1390 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1391 #ifdef CL_BUFFER_NOT_CREATED
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1392 x = PyInt_FromLong(CL_BUFFER_NOT_CREATED);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1393 if (x == NULL || PyDict_SetItemString(d, "BUFFER_NOT_CREATED", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1394 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1395 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1396 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1397 #ifdef CL_BUF_COMPRESSED
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1398 x = PyInt_FromLong(CL_BUF_COMPRESSED);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1399 if (x == NULL || PyDict_SetItemString(d, "BUF_COMPRESSED", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1400 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1401 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1402 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1403 #ifdef CL_BUF_DATA
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1404 x = PyInt_FromLong(CL_BUF_DATA);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1405 if (x == NULL || PyDict_SetItemString(d, "BUF_DATA", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1406 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1407 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1408 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1409 #ifdef CL_BUF_FRAME
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1410 x = PyInt_FromLong(CL_BUF_FRAME);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1411 if (x == NULL || PyDict_SetItemString(d, "BUF_FRAME", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1412 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1413 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1414 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1415 #ifdef CL_CHANNEL_POLICY
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1416 x = PyInt_FromLong(CL_CHANNEL_POLICY);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1417 if (x == NULL || PyDict_SetItemString(d, "CHANNEL_POLICY", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1418 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1419 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1420 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1421 #ifdef CL_CHROMA_THRESHOLD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1422 x = PyInt_FromLong(CL_CHROMA_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1423 if (x == NULL || PyDict_SetItemString(d, "CHROMA_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1424 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1425 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1426 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1427 #ifdef CL_CODEC
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1428 x = PyInt_FromLong(CL_CODEC);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1429 if (x == NULL || PyDict_SetItemString(d, "CODEC", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1430 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1431 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1432 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1433 #ifdef CL_COMPONENTS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1434 x = PyInt_FromLong(CL_COMPONENTS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1435 if (x == NULL || PyDict_SetItemString(d, "COMPONENTS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1436 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1437 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1438 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1439 #ifdef CL_COMPRESSED_BUFFER_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1440 x = PyInt_FromLong(CL_COMPRESSED_BUFFER_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1441 if (x == NULL || PyDict_SetItemString(d, "COMPRESSED_BUFFER_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1442 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1443 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1444 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1445 #ifdef CL_COMPRESSION_RATIO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1446 x = PyInt_FromLong(CL_COMPRESSION_RATIO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1447 if (x == NULL || PyDict_SetItemString(d, "COMPRESSION_RATIO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1448 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1449 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1450 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1451 #ifdef CL_COMPRESSOR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1452 x = PyInt_FromLong(CL_COMPRESSOR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1453 if (x == NULL || PyDict_SetItemString(d, "COMPRESSOR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1454 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1455 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1456 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1457 #ifdef CL_CONTINUOUS_BLOCK
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1458 x = PyInt_FromLong(CL_CONTINUOUS_BLOCK);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1459 if (x == NULL || PyDict_SetItemString(d, "CONTINUOUS_BLOCK", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1460 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1461 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1462 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1463 #ifdef CL_CONTINUOUS_NONBLOCK
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1464 x = PyInt_FromLong(CL_CONTINUOUS_NONBLOCK);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1465 if (x == NULL || PyDict_SetItemString(d, "CONTINUOUS_NONBLOCK", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1466 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1467 Py_DECREF(x);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1468 #endif
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1469 #ifdef CL_COSMO_CODEC_CONTROL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1470 x = PyInt_FromLong(CL_COSMO_CODEC_CONTROL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1471 if (x == NULL || PyDict_SetItemString(d, "COSMO_CODEC_CONTROL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1472 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1473 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1474 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1475 #ifdef CL_COSMO_NUM_PARAMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1476 x = PyInt_FromLong(CL_COSMO_NUM_PARAMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1477 if (x == NULL || PyDict_SetItemString(d, "COSMO_NUM_PARAMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1478 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1479 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1480 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1481 #ifdef CL_COSMO_VALUE_BASE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1482 x = PyInt_FromLong(CL_COSMO_VALUE_BASE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1483 if (x == NULL || PyDict_SetItemString(d, "COSMO_VALUE_BASE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1484 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1485 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1486 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1487 #ifdef CL_COSMO_VIDEO_MANUAL_CONTROL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1488 x = PyInt_FromLong(CL_COSMO_VIDEO_MANUAL_CONTROL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1489 if (x == NULL || PyDict_SetItemString(d, "COSMO_VIDEO_MANUAL_CONTROL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1490 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1491 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1492 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1493 #ifdef CL_COSMO_VIDEO_TRANSFER_MODE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1494 x = PyInt_FromLong(CL_COSMO_VIDEO_TRANSFER_MODE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1495 if (x == NULL || PyDict_SetItemString(d, "COSMO_VIDEO_TRANSFER_MODE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1496 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1497 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1498 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1499 #ifdef CL_DATA
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1500 x = PyInt_FromLong(CL_DATA);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1501 if (x == NULL || PyDict_SetItemString(d, "DATA", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1502 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1503 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1504 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1505 #ifdef CL_DECOMPRESSOR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1506 x = PyInt_FromLong(CL_DECOMPRESSOR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1507 if (x == NULL || PyDict_SetItemString(d, "DECOMPRESSOR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1508 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1509 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1510 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1511 #ifdef CL_DSO_ERROR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1512 x = PyInt_FromLong(CL_DSO_ERROR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1513 if (x == NULL || PyDict_SetItemString(d, "DSO_ERROR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1514 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1515 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1516 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1517 #ifdef CL_EDGE_THRESHOLD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1518 x = PyInt_FromLong(CL_EDGE_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1519 if (x == NULL || PyDict_SetItemString(d, "EDGE_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1520 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1521 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1522 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1523 #ifdef CL_ENABLE_IMAGEINFO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1524 x = PyInt_FromLong(CL_ENABLE_IMAGEINFO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1525 if (x == NULL || PyDict_SetItemString(d, "ENABLE_IMAGEINFO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1526 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1527 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1528 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1529 #ifdef CL_END_OF_SEQUENCE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1530 x = PyInt_FromLong(CL_END_OF_SEQUENCE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1531 if (x == NULL || PyDict_SetItemString(d, "END_OF_SEQUENCE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1532 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1533 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1534 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1535 #ifdef CL_ENUM_VALUE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1536 x = PyInt_FromLong(CL_ENUM_VALUE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1537 if (x == NULL || PyDict_SetItemString(d, "ENUM_VALUE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1538 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1539 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1540 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1541 #ifdef CL_EXACT_COMPRESSION_RATIO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1542 x = PyInt_FromLong(CL_EXACT_COMPRESSION_RATIO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1543 if (x == NULL || PyDict_SetItemString(d, "EXACT_COMPRESSION_RATIO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1544 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1545 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1546 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1547 #ifdef CL_EXTERNAL_DEVICE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1548 x = PyInt_FromLong((long) CL_EXTERNAL_DEVICE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1549 if (x == NULL || PyDict_SetItemString(d, "EXTERNAL_DEVICE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1550 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1551 Py_DECREF(x);
4984
77f970076831 Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents: 4600
diff changeset
1552 #endif
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1553 #ifdef CL_FLOATING_ENUM_VALUE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1554 x = PyInt_FromLong(CL_FLOATING_ENUM_VALUE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1555 if (x == NULL || PyDict_SetItemString(d, "FLOATING_ENUM_VALUE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1556 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1557 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1558 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1559 #ifdef CL_FLOATING_RANGE_VALUE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1560 x = PyInt_FromLong(CL_FLOATING_RANGE_VALUE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1561 if (x == NULL || PyDict_SetItemString(d, "FLOATING_RANGE_VALUE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1562 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1563 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1564 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1565 #ifdef CL_FORMAT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1566 x = PyInt_FromLong(CL_FORMAT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1567 if (x == NULL || PyDict_SetItemString(d, "FORMAT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1568 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1569 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1570 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1571 #ifdef CL_FORMAT_ABGR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1572 x = PyInt_FromLong(CL_FORMAT_ABGR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1573 if (x == NULL || PyDict_SetItemString(d, "FORMAT_ABGR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1574 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1575 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1576 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1577 #ifdef CL_FORMAT_BGR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1578 x = PyInt_FromLong(CL_FORMAT_BGR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1579 if (x == NULL || PyDict_SetItemString(d, "FORMAT_BGR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1580 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1581 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1582 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1583 #ifdef CL_FORMAT_BGR233
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1584 x = PyInt_FromLong(CL_FORMAT_BGR233);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1585 if (x == NULL || PyDict_SetItemString(d, "FORMAT_BGR233", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1586 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1587 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1588 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1589 #ifdef CL_FORMAT_GRAYSCALE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1590 x = PyInt_FromLong(CL_FORMAT_GRAYSCALE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1591 if (x == NULL || PyDict_SetItemString(d, "FORMAT_GRAYSCALE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1592 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1593 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1594 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1595 #ifdef CL_FORMAT_MONO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1596 x = PyInt_FromLong(CL_FORMAT_MONO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1597 if (x == NULL || PyDict_SetItemString(d, "FORMAT_MONO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1598 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1599 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1600 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1601 #ifdef CL_FORMAT_RBG323
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1602 x = PyInt_FromLong(CL_FORMAT_RBG323);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1603 if (x == NULL || PyDict_SetItemString(d, "FORMAT_RBG323", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1604 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1605 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1606 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1607 #ifdef CL_FORMAT_STEREO_INTERLEAVED
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1608 x = PyInt_FromLong(CL_FORMAT_STEREO_INTERLEAVED);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1609 if (x == NULL || PyDict_SetItemString(d, "FORMAT_STEREO_INTERLEAVED", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1610 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1611 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1612 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1613 #ifdef CL_FORMAT_XBGR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1614 x = PyInt_FromLong(CL_FORMAT_XBGR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1615 if (x == NULL || PyDict_SetItemString(d, "FORMAT_XBGR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1616 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1617 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1618 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1619 #ifdef CL_FORMAT_YCbCr
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1620 x = PyInt_FromLong(CL_FORMAT_YCbCr);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1621 if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1622 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1623 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1624 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1625 #ifdef CL_FORMAT_YCbCr422
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1626 x = PyInt_FromLong(CL_FORMAT_YCbCr422);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1627 if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr422", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1628 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1629 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1630 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1631 #ifdef CL_FORMAT_YCbCr422DC
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1632 x = PyInt_FromLong(CL_FORMAT_YCbCr422DC);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1633 if (x == NULL || PyDict_SetItemString(d, "FORMAT_YCbCr422DC", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1634 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1635 Py_DECREF(x);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1636 #endif
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1637 #ifdef CL_FRAME
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1638 x = PyInt_FromLong(CL_FRAME);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1639 if (x == NULL || PyDict_SetItemString(d, "FRAME", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1640 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1641 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1642 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1643 #ifdef CL_FRAMES_PER_CHUNK
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1644 x = PyInt_FromLong(CL_FRAMES_PER_CHUNK);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1645 if (x == NULL || PyDict_SetItemString(d, "FRAMES_PER_CHUNK", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1646 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1647 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1648 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1649 #ifdef CL_FRAME_BUFFER_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1650 x = PyInt_FromLong(CL_FRAME_BUFFER_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1651 if (x == NULL || PyDict_SetItemString(d, "FRAME_BUFFER_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1652 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1653 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1654 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1655 #ifdef CL_FRAME_BUFFER_SIZE_ZERO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1656 x = PyInt_FromLong(CL_FRAME_BUFFER_SIZE_ZERO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1657 if (x == NULL || PyDict_SetItemString(d, "FRAME_BUFFER_SIZE_ZERO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1658 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1659 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1660 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1661 #ifdef CL_FRAME_INDEX
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1662 x = PyInt_FromLong(CL_FRAME_INDEX);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1663 if (x == NULL || PyDict_SetItemString(d, "FRAME_INDEX", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1664 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1665 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1666 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1667 #ifdef CL_FRAME_RATE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1668 x = PyInt_FromLong(CL_FRAME_RATE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1669 if (x == NULL || PyDict_SetItemString(d, "FRAME_RATE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1670 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1671 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1672 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1673 #ifdef CL_FRAME_SIZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1674 x = PyInt_FromLong(CL_FRAME_SIZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1675 if (x == NULL || PyDict_SetItemString(d, "FRAME_SIZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1676 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1677 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1678 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1679 #ifdef CL_FRAME_TYPE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1680 x = PyInt_FromLong(CL_FRAME_TYPE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1681 if (x == NULL || PyDict_SetItemString(d, "FRAME_TYPE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1682 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1683 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1684 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1685 #ifdef CL_G711_ALAW
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1686 x = PyInt_FromLong(CL_G711_ALAW);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1687 if (x == NULL || PyDict_SetItemString(d, "G711_ALAW", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1688 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1689 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1690 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1691 #ifdef CL_G711_ALAW_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1692 x = PyInt_FromLong(CL_G711_ALAW_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1693 if (x == NULL || PyDict_SetItemString(d, "G711_ALAW_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1694 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1695 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1696 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1697 #ifdef CL_G711_ULAW
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1698 x = PyInt_FromLong(CL_G711_ULAW);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1699 if (x == NULL || PyDict_SetItemString(d, "G711_ULAW", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1700 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1701 Py_DECREF(x);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1702 #endif
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1703 #ifdef CL_G711_ULAW_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1704 x = PyInt_FromLong(CL_G711_ULAW_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1705 if (x == NULL || PyDict_SetItemString(d, "G711_ULAW_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1706 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1707 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1708 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1709 #ifdef CL_GRAYSCALE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1710 x = PyInt_FromLong(CL_GRAYSCALE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1711 if (x == NULL || PyDict_SetItemString(d, "GRAYSCALE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1712 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1713 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1714 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1715 #ifdef CL_HDCC
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1716 x = PyInt_FromLong(CL_HDCC);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1717 if (x == NULL || PyDict_SetItemString(d, "HDCC", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1718 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1719 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1720 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1721 #ifdef CL_HDCC_SAMPLES_PER_TILE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1722 x = PyInt_FromLong(CL_HDCC_SAMPLES_PER_TILE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1723 if (x == NULL || PyDict_SetItemString(d, "HDCC_SAMPLES_PER_TILE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1724 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1725 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1726 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1727 #ifdef CL_HDCC_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1728 x = PyInt_FromLong(CL_HDCC_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1729 if (x == NULL || PyDict_SetItemString(d, "HDCC_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1730 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1731 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1732 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1733 #ifdef CL_HDCC_TILE_THRESHOLD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1734 x = PyInt_FromLong(CL_HDCC_TILE_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1735 if (x == NULL || PyDict_SetItemString(d, "HDCC_TILE_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1736 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1737 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1738 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1739 #ifdef CL_HEADER_START_CODE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1740 x = PyInt_FromLong(CL_HEADER_START_CODE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1741 if (x == NULL || PyDict_SetItemString(d, "HEADER_START_CODE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1742 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1743 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1744 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1745 #ifdef CL_IMAGEINFO_FIELDMASK
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1746 x = PyInt_FromLong(CL_IMAGEINFO_FIELDMASK);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1747 if (x == NULL || PyDict_SetItemString(d, "IMAGEINFO_FIELDMASK", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1748 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1749 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1750 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1751 #ifdef CL_IMAGE_CROP_BOTTOM
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1752 x = PyInt_FromLong(CL_IMAGE_CROP_BOTTOM);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1753 if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_BOTTOM", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1754 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1755 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1756 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1757 #ifdef CL_IMAGE_CROP_LEFT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1758 x = PyInt_FromLong(CL_IMAGE_CROP_LEFT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1759 if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_LEFT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1760 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1761 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1762 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1763 #ifdef CL_IMAGE_CROP_RIGHT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1764 x = PyInt_FromLong(CL_IMAGE_CROP_RIGHT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1765 if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_RIGHT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1766 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1767 Py_DECREF(x);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1768 #endif
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1769 #ifdef CL_IMAGE_CROP_TOP
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1770 x = PyInt_FromLong(CL_IMAGE_CROP_TOP);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1771 if (x == NULL || PyDict_SetItemString(d, "IMAGE_CROP_TOP", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1772 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1773 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1774 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1775 #ifdef CL_IMAGE_HEIGHT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1776 x = PyInt_FromLong(CL_IMAGE_HEIGHT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1777 if (x == NULL || PyDict_SetItemString(d, "IMAGE_HEIGHT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1778 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1779 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1780 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1781 #ifdef CL_IMAGE_WIDTH
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1782 x = PyInt_FromLong(CL_IMAGE_WIDTH);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1783 if (x == NULL || PyDict_SetItemString(d, "IMAGE_WIDTH", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1784 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1785 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1786 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1787 #ifdef CL_IMPACT_CODEC_CONTROL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1788 x = PyInt_FromLong(CL_IMPACT_CODEC_CONTROL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1789 if (x == NULL || PyDict_SetItemString(d, "IMPACT_CODEC_CONTROL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1790 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1791 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1792 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1793 #ifdef CL_IMPACT_FRAME_INTERLEAVE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1794 x = PyInt_FromLong(CL_IMPACT_FRAME_INTERLEAVE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1795 if (x == NULL || PyDict_SetItemString(d, "IMPACT_FRAME_INTERLEAVE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1796 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1797 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1798 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1799 #ifdef CL_IMPACT_NUM_PARAMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1800 x = PyInt_FromLong(CL_IMPACT_NUM_PARAMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1801 if (x == NULL || PyDict_SetItemString(d, "IMPACT_NUM_PARAMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1802 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1803 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1804 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1805 #ifdef CL_INTERNAL_FORMAT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1806 x = PyInt_FromLong(CL_INTERNAL_FORMAT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1807 if (x == NULL || PyDict_SetItemString(d, "INTERNAL_FORMAT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1808 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1809 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1810 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1811 #ifdef CL_INTERNAL_IMAGE_HEIGHT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1812 x = PyInt_FromLong(CL_INTERNAL_IMAGE_HEIGHT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1813 if (x == NULL || PyDict_SetItemString(d, "INTERNAL_IMAGE_HEIGHT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1814 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1815 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1816 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1817 #ifdef CL_INTERNAL_IMAGE_WIDTH
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1818 x = PyInt_FromLong(CL_INTERNAL_IMAGE_WIDTH);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1819 if (x == NULL || PyDict_SetItemString(d, "INTERNAL_IMAGE_WIDTH", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1820 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1821 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1822 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1823 #ifdef CL_INTRA
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1824 x = PyInt_FromLong(CL_INTRA);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1825 if (x == NULL || PyDict_SetItemString(d, "INTRA", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1826 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1827 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1828 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1829 #ifdef CL_JPEG
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1830 x = PyInt_FromLong(CL_JPEG);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1831 if (x == NULL || PyDict_SetItemString(d, "JPEG", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1832 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1833 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1834 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1835 #ifdef CL_JPEG_COSMO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1836 x = PyInt_FromLong(CL_JPEG_COSMO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1837 if (x == NULL || PyDict_SetItemString(d, "JPEG_COSMO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1838 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1839 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1840 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1841 #ifdef CL_JPEG_ERROR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1842 x = PyInt_FromLong(CL_JPEG_ERROR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1843 if (x == NULL || PyDict_SetItemString(d, "JPEG_ERROR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1844 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1845 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1846 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1847 #ifdef CL_JPEG_IMPACT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1848 x = PyInt_FromLong(CL_JPEG_IMPACT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1849 if (x == NULL || PyDict_SetItemString(d, "JPEG_IMPACT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1850 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1851 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1852 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1853 #ifdef CL_JPEG_NUM_PARAMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1854 x = PyInt_FromLong(CL_JPEG_NUM_PARAMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1855 if (x == NULL || PyDict_SetItemString(d, "JPEG_NUM_PARAMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1856 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1857 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1858 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1859 #ifdef CL_JPEG_QUALITY_FACTOR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1860 x = PyInt_FromLong(CL_JPEG_QUALITY_FACTOR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1861 if (x == NULL || PyDict_SetItemString(d, "JPEG_QUALITY_FACTOR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1862 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1863 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1864 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1865 #ifdef CL_JPEG_QUANTIZATION_TABLES
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1866 x = PyInt_FromLong(CL_JPEG_QUANTIZATION_TABLES);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1867 if (x == NULL || PyDict_SetItemString(d, "JPEG_QUANTIZATION_TABLES", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1868 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1869 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1870 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1871 #ifdef CL_JPEG_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1872 x = PyInt_FromLong(CL_JPEG_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1873 if (x == NULL || PyDict_SetItemString(d, "JPEG_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1874 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1875 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1876 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1877 #ifdef CL_JPEG_STREAM_HEADERS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1878 x = PyInt_FromLong(CL_JPEG_STREAM_HEADERS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1879 if (x == NULL || PyDict_SetItemString(d, "JPEG_STREAM_HEADERS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1880 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1881 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1882 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1883 #ifdef CL_KEYFRAME
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1884 x = PyInt_FromLong(CL_KEYFRAME);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1885 if (x == NULL || PyDict_SetItemString(d, "KEYFRAME", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1886 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1887 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1888 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1889 #ifdef CL_KEYFRAME_DISTANCE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1890 x = PyInt_FromLong(CL_KEYFRAME_DISTANCE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1891 if (x == NULL || PyDict_SetItemString(d, "KEYFRAME_DISTANCE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1892 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1893 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1894 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1895 #ifdef CL_LAST_FRAME_INDEX
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1896 x = PyInt_FromLong(CL_LAST_FRAME_INDEX);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1897 if (x == NULL || PyDict_SetItemString(d, "LAST_FRAME_INDEX", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1898 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1899 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1900 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1901 #ifdef CL_LAYER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1902 x = PyInt_FromLong(CL_LAYER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1903 if (x == NULL || PyDict_SetItemString(d, "LAYER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1904 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1905 Py_DECREF(x);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1906 #endif
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
1907 #ifdef CL_LUMA_THRESHOLD
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1908 x = PyInt_FromLong(CL_LUMA_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1909 if (x == NULL || PyDict_SetItemString(d, "LUMA_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1910 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1911 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1912 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1913 #ifdef CL_MAX_NUMBER_OF_AUDIO_ALGORITHMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1914 x = PyInt_FromLong(CL_MAX_NUMBER_OF_AUDIO_ALGORITHMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1915 if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_AUDIO_ALGORITHMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1916 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1917 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1918 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1919 #ifdef CL_MAX_NUMBER_OF_FORMATS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1920 x = PyInt_FromLong(CL_MAX_NUMBER_OF_FORMATS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1921 if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_FORMATS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1922 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1923 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1924 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1925 #ifdef CL_MAX_NUMBER_OF_ORIGINAL_FORMATS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1926 x = PyInt_FromLong(CL_MAX_NUMBER_OF_ORIGINAL_FORMATS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1927 if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_ORIGINAL_FORMATS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1928 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1929 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1930 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1931 #ifdef CL_MAX_NUMBER_OF_PARAMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1932 x = PyInt_FromLong(CL_MAX_NUMBER_OF_PARAMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1933 if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_PARAMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1934 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1935 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1936 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1937 #ifdef CL_MAX_NUMBER_OF_VIDEO_ALGORITHMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1938 x = PyInt_FromLong(CL_MAX_NUMBER_OF_VIDEO_ALGORITHMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1939 if (x == NULL || PyDict_SetItemString(d, "MAX_NUMBER_OF_VIDEO_ALGORITHMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1940 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1941 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1942 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1943 #ifdef CL_MONO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1944 x = PyInt_FromLong(CL_MONO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1945 if (x == NULL || PyDict_SetItemString(d, "MONO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1946 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1947 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1948 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1949 #ifdef CL_MPEG1_AUDIO_AWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1950 x = PyInt_FromLong(CL_MPEG1_AUDIO_AWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1951 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_AWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1952 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1953 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1954 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1955 #ifdef CL_MPEG1_AUDIO_LAYER
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1956 x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1957 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1958 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1959 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1960 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1961 #ifdef CL_MPEG1_AUDIO_LAYER_I
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1962 x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER_I);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1963 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER_I", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1964 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1965 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1966 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1967 #ifdef CL_MPEG1_AUDIO_LAYER_II
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1968 x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER_II);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1969 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_LAYER_II", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1970 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1971 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1972 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1973 #ifdef CL_MPEG1_AUDIO_MODE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1974 x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1975 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1976 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1977 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1978 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1979 #ifdef CL_MPEG1_AUDIO_MODE_DUAL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1980 x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_DUAL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1981 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_DUAL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1982 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1983 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1984 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1985 #ifdef CL_MPEG1_AUDIO_MODE_JOINT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1986 x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_JOINT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1987 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_JOINT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1988 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1989 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1990 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1991 #ifdef CL_MPEG1_AUDIO_MODE_SINGLE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1992 x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_SINGLE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1993 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_SINGLE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
1994 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1995 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1996 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1997 #ifdef CL_MPEG1_AUDIO_MODE_STEREO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1998 x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE_STEREO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
1999 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_MODE_STEREO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2000 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2001 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2002 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2003 #ifdef CL_MPEG1_AUDIO_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2004 x = PyInt_FromLong(CL_MPEG1_AUDIO_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2005 if (x == NULL || PyDict_SetItemString(d, "MPEG1_AUDIO_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2006 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2007 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2008 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2009 #ifdef CL_MPEG1_END_OF_STREAM
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2010 x = PyInt_FromLong(CL_MPEG1_END_OF_STREAM);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2011 if (x == NULL || PyDict_SetItemString(d, "MPEG1_END_OF_STREAM", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2012 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2013 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2014 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2015 #ifdef CL_MPEG1_ERROR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2016 x = PyInt_FromLong(CL_MPEG1_ERROR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2017 if (x == NULL || PyDict_SetItemString(d, "MPEG1_ERROR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2018 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2019 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2020 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2021 #ifdef CL_MPEG1_NUM_PARAMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2022 x = PyInt_FromLong(CL_MPEG1_NUM_PARAMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2023 if (x == NULL || PyDict_SetItemString(d, "MPEG1_NUM_PARAMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2024 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2025 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2026 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2027 #ifdef CL_MPEG1_VIDEO_M
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2028 x = PyInt_FromLong(CL_MPEG1_VIDEO_M);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2029 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_M", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2030 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2031 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2032 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2033 #ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2034 x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2035 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_X", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2036 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2037 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2038 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2039 #ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2040 x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2041 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_B_Y", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2042 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2043 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2044 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2045 #ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2046 x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2047 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_X", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2048 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2049 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2050 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2051 #ifdef CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2052 x = PyInt_FromLong(CL_MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2053 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_MAX_MOTION_VECTOR_LENGTH_P_Y", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2054 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2055 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2056 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2057 #ifdef CL_MPEG1_VIDEO_N
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2058 x = PyInt_FromLong(CL_MPEG1_VIDEO_N);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2059 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_N", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2060 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2061 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2062 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2063 #ifdef CL_MPEG1_VIDEO_SOFTNESS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2064 x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2065 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2066 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2067 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2068 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2069 #ifdef CL_MPEG1_VIDEO_SOFTNESS_MAXIMUM
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2070 x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_MAXIMUM);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2071 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_MAXIMUM", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2072 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2073 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2074 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2075 #ifdef CL_MPEG1_VIDEO_SOFTNESS_MEDIUM
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2076 x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_MEDIUM);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2077 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_MEDIUM", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2078 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2079 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2080 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2081 #ifdef CL_MPEG1_VIDEO_SOFTNESS_NONE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2082 x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS_NONE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2083 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTNESS_NONE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2084 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2085 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2086 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2087 #ifdef CL_MPEG1_VIDEO_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2088 x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2089 if (x == NULL || PyDict_SetItemString(d, "MPEG1_VIDEO_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2090 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2091 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2092 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2093 #ifdef CL_MPEG_VIDEO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2094 x = PyInt_FromLong(CL_MPEG_VIDEO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2095 if (x == NULL || PyDict_SetItemString(d, "MPEG_VIDEO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2096 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2097 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2098 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2099 #ifdef CL_MULTIRATE_AWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2100 x = PyInt_FromLong(CL_MULTIRATE_AWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2101 if (x == NULL || PyDict_SetItemString(d, "MULTIRATE_AWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2102 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2103 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2104 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2105 #ifdef CL_MVC1
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2106 x = PyInt_FromLong(CL_MVC1);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2107 if (x == NULL || PyDict_SetItemString(d, "MVC1", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2108 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2109 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2110 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2111 #ifdef CL_MVC1_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2112 x = PyInt_FromLong(CL_MVC1_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2113 if (x == NULL || PyDict_SetItemString(d, "MVC1_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2114 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2115 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2116 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2117 #ifdef CL_MVC2
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2118 x = PyInt_FromLong(CL_MVC2);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2119 if (x == NULL || PyDict_SetItemString(d, "MVC2", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2120 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2121 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2122 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2123 #ifdef CL_MVC2_BLENDING
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2124 x = PyInt_FromLong(CL_MVC2_BLENDING);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2125 if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2126 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2127 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2128 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2129 #ifdef CL_MVC2_BLENDING_OFF
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2130 x = PyInt_FromLong(CL_MVC2_BLENDING_OFF);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2131 if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING_OFF", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2132 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2133 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2134 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2135 #ifdef CL_MVC2_BLENDING_ON
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2136 x = PyInt_FromLong(CL_MVC2_BLENDING_ON);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2137 if (x == NULL || PyDict_SetItemString(d, "MVC2_BLENDING_ON", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2138 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2139 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2140 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2141 #ifdef CL_MVC2_CHROMA_THRESHOLD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2142 x = PyInt_FromLong(CL_MVC2_CHROMA_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2143 if (x == NULL || PyDict_SetItemString(d, "MVC2_CHROMA_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2144 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2145 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2146 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2147 #ifdef CL_MVC2_EDGE_THRESHOLD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2148 x = PyInt_FromLong(CL_MVC2_EDGE_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2149 if (x == NULL || PyDict_SetItemString(d, "MVC2_EDGE_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2150 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2151 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2152 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2153 #ifdef CL_MVC2_ERROR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2154 x = PyInt_FromLong(CL_MVC2_ERROR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2155 if (x == NULL || PyDict_SetItemString(d, "MVC2_ERROR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2156 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2157 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2158 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2159 #ifdef CL_MVC2_LUMA_THRESHOLD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2160 x = PyInt_FromLong(CL_MVC2_LUMA_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2161 if (x == NULL || PyDict_SetItemString(d, "MVC2_LUMA_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2162 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2163 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2164 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2165 #ifdef CL_MVC2_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2166 x = PyInt_FromLong(CL_MVC2_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2167 if (x == NULL || PyDict_SetItemString(d, "MVC2_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2168 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2169 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2170 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2171 #ifdef CL_MVC3_QUALITY_LEVEL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2172 x = PyInt_FromLong(CL_MVC3_QUALITY_LEVEL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2173 if (x == NULL || PyDict_SetItemString(d, "MVC3_QUALITY_LEVEL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2174 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2175 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2176 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2177 #ifdef CL_MVC3_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2178 x = PyInt_FromLong(CL_MVC3_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2179 if (x == NULL || PyDict_SetItemString(d, "MVC3_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2180 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2181 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2182 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2183 #ifdef CL_NEXT_NOT_AVAILABLE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2184 x = PyInt_FromLong(CL_NEXT_NOT_AVAILABLE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2185 if (x == NULL || PyDict_SetItemString(d, "NEXT_NOT_AVAILABLE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2186 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2187 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2188 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2189 #ifdef CL_NOISE_MARGIN
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2190 x = PyInt_FromLong(CL_NOISE_MARGIN);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2191 if (x == NULL || PyDict_SetItemString(d, "NOISE_MARGIN", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2192 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2193 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2194 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2195 #ifdef CL_NONE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2196 x = PyInt_FromLong(CL_NONE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2197 if (x == NULL || PyDict_SetItemString(d, "NONE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2198 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2199 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2200 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2201 #ifdef CL_NUMBER_OF_FORMATS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2202 x = PyInt_FromLong(CL_NUMBER_OF_FORMATS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2203 if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_FORMATS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2204 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2205 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2206 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2207 #ifdef CL_NUMBER_OF_FRAMES
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2208 x = PyInt_FromLong(CL_NUMBER_OF_FRAMES);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2209 if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_FRAMES", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2210 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2211 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2212 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2213 #ifdef CL_NUMBER_OF_PARAMS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2214 x = PyInt_FromLong(CL_NUMBER_OF_PARAMS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2215 if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_PARAMS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2216 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2217 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2218 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2219 #ifdef CL_NUMBER_OF_PARAMS_FREEZE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2220 x = PyInt_FromLong(CL_NUMBER_OF_PARAMS_FREEZE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2221 if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_PARAMS_FREEZE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2222 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2223 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2224 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2225 #ifdef CL_NUMBER_OF_VIDEO_FORMATS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2226 x = PyInt_FromLong(CL_NUMBER_OF_VIDEO_FORMATS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2227 if (x == NULL || PyDict_SetItemString(d, "NUMBER_OF_VIDEO_FORMATS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2228 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2229 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2230 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2231 #ifdef CL_ORIENTATION
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2232 x = PyInt_FromLong(CL_ORIENTATION);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2233 if (x == NULL || PyDict_SetItemString(d, "ORIENTATION", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2234 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2235 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2236 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2237 #ifdef CL_ORIGINAL_FORMAT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2238 x = PyInt_FromLong(CL_ORIGINAL_FORMAT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2239 if (x == NULL || PyDict_SetItemString(d, "ORIGINAL_FORMAT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2240 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2241 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2242 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2243 #ifdef CL_PARAM_OUT_OF_RANGE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2244 x = PyInt_FromLong(CL_PARAM_OUT_OF_RANGE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2245 if (x == NULL || PyDict_SetItemString(d, "PARAM_OUT_OF_RANGE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2246 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2247 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2248 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2249 #ifdef CL_PIXEL_ASPECT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2250 x = PyInt_FromLong(CL_PIXEL_ASPECT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2251 if (x == NULL || PyDict_SetItemString(d, "PIXEL_ASPECT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2252 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2253 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2254 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2255 #ifdef CL_PREDICTED
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2256 x = PyInt_FromLong(CL_PREDICTED);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2257 if (x == NULL || PyDict_SetItemString(d, "PREDICTED", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2258 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2259 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2260 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2261 #ifdef CL_PREROLL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2262 x = PyInt_FromLong(CL_PREROLL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2263 if (x == NULL || PyDict_SetItemString(d, "PREROLL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2264 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2265 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2266 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2267 #ifdef CL_QUALITY_FACTOR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2268 x = PyInt_FromLong(CL_QUALITY_FACTOR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2269 if (x == NULL || PyDict_SetItemString(d, "QUALITY_FACTOR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2270 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2271 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2272 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2273 #ifdef CL_QUALITY_LEVEL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2274 x = PyInt_FromLong(CL_QUALITY_LEVEL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2275 if (x == NULL || PyDict_SetItemString(d, "QUALITY_LEVEL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2276 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2277 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2278 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2279 #ifdef CL_QUALITY_SPATIAL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2280 x = PyInt_FromLong(CL_QUALITY_SPATIAL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2281 if (x == NULL || PyDict_SetItemString(d, "QUALITY_SPATIAL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2282 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2283 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2284 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2285 #ifdef CL_QUALITY_TEMPORAL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2286 x = PyInt_FromLong(CL_QUALITY_TEMPORAL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2287 if (x == NULL || PyDict_SetItemString(d, "QUALITY_TEMPORAL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2288 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2289 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2290 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2291 #ifdef CL_QUANTIZATION_TABLES
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2292 x = PyInt_FromLong(CL_QUANTIZATION_TABLES);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2293 if (x == NULL || PyDict_SetItemString(d, "QUANTIZATION_TABLES", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2294 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2295 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2296 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2297 #ifdef CL_RANGE_VALUE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2298 x = PyInt_FromLong(CL_RANGE_VALUE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2299 if (x == NULL || PyDict_SetItemString(d, "RANGE_VALUE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2300 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2301 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2302 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2303 #ifdef CL_RGB
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2304 x = PyInt_FromLong(CL_RGB);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2305 if (x == NULL || PyDict_SetItemString(d, "RGB", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2306 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2307 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2308 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2309 #ifdef CL_RGB332
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2310 x = PyInt_FromLong(CL_RGB332);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2311 if (x == NULL || PyDict_SetItemString(d, "RGB332", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2312 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2313 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2314 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2315 #ifdef CL_RGB8
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2316 x = PyInt_FromLong(CL_RGB8);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2317 if (x == NULL || PyDict_SetItemString(d, "RGB8", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2318 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2319 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2320 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2321 #ifdef CL_RGBA
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2322 x = PyInt_FromLong(CL_RGBA);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2323 if (x == NULL || PyDict_SetItemString(d, "RGBA", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2324 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2325 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2326 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2327 #ifdef CL_RGBX
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2328 x = PyInt_FromLong(CL_RGBX);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2329 if (x == NULL || PyDict_SetItemString(d, "RGBX", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2330 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2331 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2332 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2333 #ifdef CL_RLE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2334 x = PyInt_FromLong(CL_RLE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2335 if (x == NULL || PyDict_SetItemString(d, "RLE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2336 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2337 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2338 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2339 #ifdef CL_RLE24
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2340 x = PyInt_FromLong(CL_RLE24);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2341 if (x == NULL || PyDict_SetItemString(d, "RLE24", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2342 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2343 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2344 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2345 #ifdef CL_RLE24_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2346 x = PyInt_FromLong(CL_RLE24_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2347 if (x == NULL || PyDict_SetItemString(d, "RLE24_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2348 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2349 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2350 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2351 #ifdef CL_RLE_SOFTWARE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2352 x = PyInt_FromLong(CL_RLE_SOFTWARE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2353 if (x == NULL || PyDict_SetItemString(d, "RLE_SOFTWARE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2354 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2355 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2356 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2357 #ifdef CL_RTR
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2358 x = PyInt_FromLong(CL_RTR);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2359 if (x == NULL || PyDict_SetItemString(d, "RTR", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2360 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2361 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2362 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2363 #ifdef CL_RTR1
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2364 x = PyInt_FromLong(CL_RTR1);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2365 if (x == NULL || PyDict_SetItemString(d, "RTR1", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2366 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2367 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2368 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2369 #ifdef CL_RTR_QUALITY_LEVEL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2370 x = PyInt_FromLong(CL_RTR_QUALITY_LEVEL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2371 if (x == NULL || PyDict_SetItemString(d, "RTR_QUALITY_LEVEL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2372 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2373 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2374 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2375 #ifdef CL_SAMPLES_PER_TILE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2376 x = PyInt_FromLong(CL_SAMPLES_PER_TILE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2377 if (x == NULL || PyDict_SetItemString(d, "SAMPLES_PER_TILE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2378 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2379 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2380 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2381 #ifdef CL_SCHEME_BUSY
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2382 x = PyInt_FromLong(CL_SCHEME_BUSY);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2383 if (x == NULL || PyDict_SetItemString(d, "SCHEME_BUSY", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2384 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2385 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2386 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2387 #ifdef CL_SCHEME_NOT_AVAILABLE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2388 x = PyInt_FromLong(CL_SCHEME_NOT_AVAILABLE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2389 if (x == NULL || PyDict_SetItemString(d, "SCHEME_NOT_AVAILABLE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2390 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2391 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2392 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2393 #ifdef CL_SPEED
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2394 x = PyInt_FromLong(CL_SPEED);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2395 if (x == NULL || PyDict_SetItemString(d, "SPEED", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2396 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2397 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2398 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2399 #ifdef CL_STEREO_INTERLEAVED
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2400 x = PyInt_FromLong(CL_STEREO_INTERLEAVED);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2401 if (x == NULL || PyDict_SetItemString(d, "STEREO_INTERLEAVED", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2402 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2403 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2404 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2405 #ifdef CL_STREAM_HEADERS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2406 x = PyInt_FromLong(CL_STREAM_HEADERS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2407 if (x == NULL || PyDict_SetItemString(d, "STREAM_HEADERS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2408 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2409 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2410 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2411 #ifdef CL_TILE_THRESHOLD
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2412 x = PyInt_FromLong(CL_TILE_THRESHOLD);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2413 if (x == NULL || PyDict_SetItemString(d, "TILE_THRESHOLD", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2414 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2415 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2416 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2417 #ifdef CL_TOP_DOWN
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2418 x = PyInt_FromLong(CL_TOP_DOWN);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2419 if (x == NULL || PyDict_SetItemString(d, "TOP_DOWN", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2420 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2421 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2422 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2423 #ifdef CL_ULAW
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2424 x = PyInt_FromLong(CL_ULAW);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2425 if (x == NULL || PyDict_SetItemString(d, "ULAW", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2426 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2427 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2428 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2429 #ifdef CL_UNCOMPRESSED
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2430 x = PyInt_FromLong(CL_UNCOMPRESSED);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2431 if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2432 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2433 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2434 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2435 #ifdef CL_UNCOMPRESSED_AUDIO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2436 x = PyInt_FromLong(CL_UNCOMPRESSED_AUDIO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2437 if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED_AUDIO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2438 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2439 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2440 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2441 #ifdef CL_UNCOMPRESSED_VIDEO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2442 x = PyInt_FromLong(CL_UNCOMPRESSED_VIDEO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2443 if (x == NULL || PyDict_SetItemString(d, "UNCOMPRESSED_VIDEO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2444 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2445 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2446 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2447 #ifdef CL_UNKNOWN_SCHEME
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2448 x = PyInt_FromLong(CL_UNKNOWN_SCHEME);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2449 if (x == NULL || PyDict_SetItemString(d, "UNKNOWN_SCHEME", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2450 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2451 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2452 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2453 #ifdef CL_VIDEO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2454 x = PyInt_FromLong(CL_VIDEO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2455 if (x == NULL || PyDict_SetItemString(d, "VIDEO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2456 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2457 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2458 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2459 #ifdef CL_Y
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2460 x = PyInt_FromLong(CL_Y);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2461 if (x == NULL || PyDict_SetItemString(d, "Y", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2462 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2463 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2464 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2465 #ifdef CL_YCbCr
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2466 x = PyInt_FromLong(CL_YCbCr);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2467 if (x == NULL || PyDict_SetItemString(d, "YCbCr", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2468 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2469 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2470 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2471 #ifdef CL_YCbCr422
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2472 x = PyInt_FromLong(CL_YCbCr422);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2473 if (x == NULL || PyDict_SetItemString(d, "YCbCr422", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2474 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2475 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2476 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2477 #ifdef CL_YCbCr422DC
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2478 x = PyInt_FromLong(CL_YCbCr422DC);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2479 if (x == NULL || PyDict_SetItemString(d, "YCbCr422DC", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2480 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2481 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2482 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2483 #ifdef CL_YCbCr422HC
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2484 x = PyInt_FromLong(CL_YCbCr422HC);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2485 if (x == NULL || PyDict_SetItemString(d, "YCbCr422HC", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2486 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2487 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2488 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2489 #ifdef CL_YUV
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2490 x = PyInt_FromLong(CL_YUV);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2491 if (x == NULL || PyDict_SetItemString(d, "YUV", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2492 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2493 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2494 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2495 #ifdef CL_YUV422
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2496 x = PyInt_FromLong(CL_YUV422);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2497 if (x == NULL || PyDict_SetItemString(d, "YUV422", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2498 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2499 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2500 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2501 #ifdef CL_YUV422DC
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2502 x = PyInt_FromLong(CL_YUV422DC);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2503 if (x == NULL || PyDict_SetItemString(d, "YUV422DC", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2504 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2505 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2506 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2507 #ifdef CL_YUV422HC
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2508 x = PyInt_FromLong(CL_YUV422HC);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2509 if (x == NULL || PyDict_SetItemString(d, "YUV422HC", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2510 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2511 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2512 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2513 #ifdef AWCMP_STEREO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2514 x = PyInt_FromLong(AWCMP_STEREO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2515 if (x == NULL || PyDict_SetItemString(d, "AWCMP_STEREO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2516 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2517 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2518 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2519 #ifdef AWCMP_JOINT_STEREO
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2520 x = PyInt_FromLong(AWCMP_JOINT_STEREO);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2521 if (x == NULL || PyDict_SetItemString(d, "AWCMP_JOINT_STEREO", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2522 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2523 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2524 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2525 #ifdef AWCMP_INDEPENDENT
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2526 x = PyInt_FromLong(AWCMP_INDEPENDENT);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2527 if (x == NULL || PyDict_SetItemString(d, "AWCMP_INDEPENDENT", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2528 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2529 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2530 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2531 #ifdef AWCMP_FIXED_RATE
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2532 x = PyInt_FromLong(AWCMP_FIXED_RATE);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2533 if (x == NULL || PyDict_SetItemString(d, "AWCMP_FIXED_RATE", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2534 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2535 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2536 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2537 #ifdef AWCMP_CONST_QUAL
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2538 x = PyInt_FromLong(AWCMP_CONST_QUAL);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2539 if (x == NULL || PyDict_SetItemString(d, "AWCMP_CONST_QUAL", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2540 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2541 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2542 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2543 #ifdef AWCMP_LOSSLESS
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2544 x = PyInt_FromLong(AWCMP_LOSSLESS);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2545 if (x == NULL || PyDict_SetItemString(d, "AWCMP_LOSSLESS", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2546 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2547 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2548 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2549 #ifdef AWCMP_MPEG_LAYER_I
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2550 x = PyInt_FromLong(AWCMP_MPEG_LAYER_I);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2551 if (x == NULL || PyDict_SetItemString(d, "AWCMP_MPEG_LAYER_I", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2552 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2553 Py_DECREF(x);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2554 #endif
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2555 #ifdef AWCMP_MPEG_LAYER_II
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2556 x = PyInt_FromLong(AWCMP_MPEG_LAYER_II);
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2557 if (x == NULL || PyDict_SetItemString(d, "AWCMP_MPEG_LAYER_II", x) < 0)
6457
90eed9a5d07a lots of "goto error" replaced by "return" (Jack)
Guido van Rossum <guido@python.org>
parents: 6367
diff changeset
2558 return;
5985
03a8833b4b73 Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents: 4984
diff changeset
2559 Py_DECREF(x);
2714
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
2560 #endif
75afaac85567 Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents: 2061
diff changeset
2561
1061
a3fa229775c1 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents: 1056
diff changeset
2562 (void) clSetErrorHandler(cl_ErrorHandler);
1056
9bf75e4d9aec New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff changeset
2563 }