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