Mercurial > cpython-lru_cache-weakref
annotate Modules/clmodule.c @ 6719:faebc1940432 legacy-trunk
Understand -Xlinker option.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 02 Dec 1997 20:38:11 +0000 |
| parents | 90eed9a5d07a |
| children | 1c7c2dd1beb1 |
| rev | line source |
|---|---|
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
1 /*********************************************************** |
|
2061
172ba04a5191
Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
2 Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
|
172ba04a5191
Added 1995 to copyright message.
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
3 The Netherlands. |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
4 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
5 All Rights Reserved |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
6 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
7 Permission to use, copy, modify, and distribute this software and its |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
8 documentation for any purpose and without fee is hereby granted, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
9 provided that the above copyright notice appear in all copies and that |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
10 both that copyright notice and this permission notice appear in |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
11 supporting documentation, and that the names of Stichting Mathematisch |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
12 Centrum or CWI or Corporation for National Research Initiatives or |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
13 CNRI not be used in advertising or publicity pertaining to |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
14 distribution of the software without specific, written prior |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
15 permission. |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
16 |
|
4503
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
17 While CWI is the initial source for this software, a modified version |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
18 is made available by the Corporation for National Research Initiatives |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
19 (CNRI) at the Internet address ftp://ftp.python.org. |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
20 |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
21 STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
22 REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
23 MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
24 CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
25 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
26 PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
27 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
65d2d8e67da3
New permission notice, includes CNRI.
Guido van Rossum <guido@python.org>
parents:
2714
diff
changeset
|
28 PERFORMANCE OF THIS SOFTWARE. |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
29 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
30 ******************************************************************/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
31 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
32 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
33 /* Cl objects */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
34 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
35 #define CLDEBUG |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
36 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
37 #include <stdarg.h> |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
38 #include <cl.h> |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
39 #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
|
40 #include <dmedia/cl_cosmo.h> |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
41 #endif |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
42 #include "Python.h" |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
43 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
44 typedef struct { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
45 PyObject_HEAD |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
46 int ob_isCompressor; /* Compressor or Decompressor */ |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
47 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
|
48 int *ob_paramtypes; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
49 int ob_nparams; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
50 } clobject; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
51 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
52 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
|
53 |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
54 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
|
55 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
56 /* |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
57 * 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
|
58 * 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
|
59 * 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
|
60 * 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
|
61 * 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
|
62 */ |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
63 #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
|
64 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
65 /******************************************************************** |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
66 Utility routines. |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
67 ********************************************************************/ |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
68 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
|
69 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
|
70 { |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
71 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
|
72 char errbuf[BUFSIZ]; /* hopefully big enough */ |
| 1075 | 73 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
|
74 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
75 if (PyErr_Occurred()) /* don't change existing error */ |
| 1075 | 76 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
|
77 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
|
78 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
|
79 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
|
80 va_end(ap); |
| 1075 | 81 p = &errbuf[strlen(errbuf) - 1]; /* swat the line feed */ |
| 82 if (*p == '\n') | |
| 83 *p = 0; | |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
84 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
|
85 } |
|
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
86 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
87 /* |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
88 * 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
|
89 */ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
90 static int |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
91 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
|
92 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
93 int bufferlength; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
94 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
95 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
|
96 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
|
97 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
|
98 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
|
99 return -1; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
100 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
101 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
|
102 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
|
103 return -1; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
104 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
|
105 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
106 (void) clQueryParams(self->ob_compressorHdl, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
107 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
|
108 if (error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
109 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
|
110 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
|
111 return -1; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
112 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
113 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
114 |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
115 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
|
116 return -1; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
117 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
118 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
|
119 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
|
120 return 1; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
121 else |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
122 return 0; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
123 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
124 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
125 /******************************************************************** |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
126 Single image compression/decompression. |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
127 ********************************************************************/ |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
128 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
129 cl_CompressImage(PyObject *self, PyObject *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
130 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
131 int compressionScheme, width, height, originalFormat; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
132 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
|
133 int frameBufferSize, compressedBufferSize; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
134 char *frameBuffer; |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
135 PyObject *compressedBuffer; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
136 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
137 if (!PyArg_Parse(args, "(iiiifs#)", &compressionScheme, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
138 &width, &height, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
139 &originalFormat, &compressionRatio, &frameBuffer, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
140 &frameBufferSize)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
141 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
142 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
143 retry: |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
144 compressedBuffer = PyString_FromStringAndSize(NULL, frameBufferSize); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
145 if (compressedBuffer == NULL) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
146 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
147 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
148 compressedBufferSize = frameBufferSize; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
149 error_handler_called = 0; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
150 if (clCompressImage(compressionScheme, width, height, originalFormat, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
151 compressionRatio, (void *) frameBuffer, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
152 &compressedBufferSize, |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
153 (void *) PyString_AsString(compressedBuffer)) |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
154 == FAILURE || error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
155 Py_DECREF(compressedBuffer); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
156 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
157 PyErr_SetString(ClError, "clCompressImage failed"); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
158 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
159 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
160 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
161 if (compressedBufferSize > frameBufferSize) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
162 frameBufferSize = compressedBufferSize; |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
163 Py_DECREF(compressedBuffer); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
164 goto retry; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
165 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
166 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
167 if (compressedBufferSize < frameBufferSize) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
168 if (_PyString_Resize(&compressedBuffer, compressedBufferSize)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
169 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
170 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
171 return compressedBuffer; |
|
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 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
174 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
175 cl_DecompressImage(PyObject *self, PyObject *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
176 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
177 int compressionScheme, width, height, originalFormat; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
178 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
|
179 int compressedBufferSize, frameBufferSize; |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
180 PyObject *frameBuffer; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
181 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
182 if (!PyArg_Parse(args, "(iiiis#)", &compressionScheme, &width, &height, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
183 &originalFormat, &compressedBuffer, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
184 &compressedBufferSize)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
185 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
186 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
187 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
|
188 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
189 frameBuffer = PyString_FromStringAndSize(NULL, frameBufferSize); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
190 if (frameBuffer == NULL) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
191 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
192 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
193 error_handler_called = 0; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
194 if (clDecompressImage(compressionScheme, width, height, originalFormat, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
195 compressedBufferSize, compressedBuffer, |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
196 (void *) PyString_AsString(frameBuffer)) |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
197 == FAILURE || error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
198 Py_DECREF(frameBuffer); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
199 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
200 PyErr_SetString(ClError, "clDecompressImage failed"); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
201 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
202 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
203 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
204 return frameBuffer; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
205 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
206 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
207 /******************************************************************** |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
208 Sequential compression/decompression. |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
209 ********************************************************************/ |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
210 #define CheckCompressor(self) if ((self)->ob_compressorHdl == NULL) { \ |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
211 PyErr_SetString(PyExc_RuntimeError, "(de)compressor not active"); \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
212 return NULL; \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
213 } |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
214 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
215 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
216 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
|
217 { |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
218 CheckCompressor(self); |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
219 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
220 if (!PyArg_NoArgs(args)) |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
221 return NULL; |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
222 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
223 error_handler_called = 0; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
224 if ((*close_func)(self->ob_compressorHdl) == FAILURE || |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
225 error_handler_called) { |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
226 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
227 PyErr_SetString(ClError, "close failed"); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
228 return NULL; |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
229 } |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
230 |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
231 self->ob_compressorHdl = NULL; |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
232 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
233 if (self->ob_paramtypes) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
234 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
|
235 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
|
236 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
237 Py_INCREF(Py_None); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
238 return Py_None; |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
239 } |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
240 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
241 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
242 clm_CloseCompressor(PyObject *self, PyObject *args) |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
243 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
244 return doClose(SELF, args, clCloseCompressor); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
245 } |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
246 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
247 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
248 clm_CloseDecompressor(PyObject *self, PyObject *args) |
| 1075 | 249 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
250 return doClose(SELF, args, clCloseDecompressor); |
| 1075 | 251 } |
| 252 | |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
253 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
254 clm_Compress(PyObject *self, PyObject *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
255 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
256 int numberOfFrames; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
257 int frameBufferSize, compressedBufferSize, size; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
258 char *frameBuffer; |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
259 PyObject *data; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
260 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
261 CheckCompressor(SELF); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
262 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
263 if (!PyArg_Parse(args, "(is#)", &numberOfFrames, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
264 &frameBuffer, &frameBufferSize)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
265 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
266 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
267 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
|
268 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
|
269 compressedBufferSize = size; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
270 if (error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
271 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
272 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
273 data = PyString_FromStringAndSize(NULL, size); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
274 if (data == NULL) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
275 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
276 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
277 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
|
278 if (clCompress(SELF->ob_compressorHdl, numberOfFrames, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
279 (void *) frameBuffer, &compressedBufferSize, |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
280 (void *) PyString_AsString(data)) == FAILURE || |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
281 error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
282 Py_DECREF(data); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
283 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
284 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
|
285 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
|
286 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
287 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
288 if (compressedBufferSize < size) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
289 if (_PyString_Resize(&data, compressedBufferSize)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
290 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
291 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
292 if (compressedBufferSize > size) { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
293 /* we didn't get all "compressed" data */ |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
294 Py_DECREF(data); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
295 PyErr_SetString(ClError, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
296 "compressed data is more than fitted"); |
| 1075 | 297 return NULL; |
| 298 } | |
| 299 | |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
300 return data; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
301 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
302 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
303 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
304 clm_Decompress(PyObject *self, PyObject *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
305 { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
306 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
|
307 int numberOfFrames; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
308 char *compressedData; |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
309 int compressedDataSize, dataSize; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
310 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
311 CheckCompressor(SELF); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
312 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
313 if (!PyArg_Parse(args, "(is#)", &numberOfFrames, &compressedData, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
314 &compressedDataSize)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
315 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
316 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
317 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
|
318 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
|
319 if (error_handler_called) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
320 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
321 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
322 data = PyString_FromStringAndSize(NULL, dataSize); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
323 if (data == NULL) |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
324 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
325 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
326 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
|
327 if (clDecompress(SELF->ob_compressorHdl, numberOfFrames, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
328 compressedDataSize, (void *) compressedData, |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
329 (void *) PyString_AsString(data)) == FAILURE || |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
330 error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
331 Py_DECREF(data); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
332 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
333 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
|
334 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
|
335 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
336 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
337 return data; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
338 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
339 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
340 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
341 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
|
342 int modified) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
343 { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
344 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
|
345 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
|
346 int length; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
347 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
|
348 float number; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
349 |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
350 CheckCompressor(self); |
|
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
351 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
352 if (!PyArg_Parse(args, "O", &list)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
353 return NULL; |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
354 if (!PyList_Check(list)) { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
355 PyErr_BadArgument(); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
356 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
357 } |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
358 length = PyList_Size(list); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
359 PVbuffer = PyMem_NEW(int, length); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
360 if (PVbuffer == NULL) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
361 return PyErr_NoMemory(); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
362 for (i = 0; i < length; i++) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
363 v = PyList_GetItem(list, i); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
364 if (PyFloat_Check(v)) { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
365 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
|
366 PVbuffer[i] = CL_TypeIsInt(number); |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
367 } else if (PyInt_Check(v)) { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
368 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
|
369 if ((i & 1) && |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
370 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
|
371 number = PVbuffer[i]; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
372 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
|
373 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
374 } else { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
375 PyMem_DEL(PVbuffer); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
376 PyErr_BadArgument(); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
377 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
378 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
379 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
380 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
381 error_handler_called = 0; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
382 (*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
|
383 if (error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
384 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
|
385 return NULL; |
|
1334
f3848f74b282
* clmodule.c (doParams): free PVbuffer in error condition.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1252
diff
changeset
|
386 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
387 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
388 if (modified) { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
389 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
|
390 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
|
391 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
|
392 number = CL_TypeIsFloat(PVbuffer[i]); |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
393 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
|
394 } else |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
395 v = PyInt_FromLong(PVbuffer[i]); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
396 PyList_SetItem(list, i, v); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
397 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
398 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
399 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
400 PyMem_DEL(PVbuffer); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
401 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
402 Py_INCREF(Py_None); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
403 return Py_None; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
404 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
405 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
406 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
407 clm_GetParams(PyObject *self, PyObject *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
408 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
409 return doParams(SELF, args, clGetParams, 1); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
410 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
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_SetParams(PyObject *self, PyObject *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
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 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
|
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 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
|
420 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
421 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
|
422 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
|
423 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
424 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
|
425 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
426 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
|
427 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
|
428 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
429 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
|
430 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
|
431 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
|
432 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
|
433 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
434 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
|
435 fvalue = CL_TypeIsFloat(value); |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
436 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
|
437 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
438 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
439 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
|
440 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
441 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
442 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
443 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
|
444 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
445 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
|
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 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
448 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
449 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
|
450 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
451 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
|
452 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
453 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
454 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
455 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
|
456 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
457 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
|
458 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
|
459 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
460 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
|
461 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
462 if (!PyArg_Parse(args, "(ii)", ¶mID, &value)) { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
463 PyErr_Clear(); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
464 if (!PyArg_Parse(args, "(if)", ¶mID, &fvalue)) { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
465 PyErr_Clear(); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
466 PyErr_SetString(PyExc_TypeError, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
467 "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
|
468 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
|
469 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
470 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
|
471 } else { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
472 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
|
473 fvalue = value; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
474 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
|
475 } |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
476 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
477 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
478 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
|
479 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
|
480 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
|
481 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
|
482 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
483 if (param_type_is_float(SELF, paramID) > 0) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
484 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
|
485 else |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
486 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
|
487 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
488 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
489 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
490 clm_GetParamID(PyObject *self, PyObject *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
491 { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
492 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
|
493 int value; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
494 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
495 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
496 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
497 if (!PyArg_Parse(args, "s", &name)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
498 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
499 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
500 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
|
501 value = clGetParamID(SELF->ob_compressorHdl, name); |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
502 if (value == FAILURE || error_handler_called) { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
503 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
504 PyErr_SetString(ClError, "getparamid failed"); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
505 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
506 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
507 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
508 return PyInt_FromLong(value); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
509 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
510 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
511 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
512 clm_QueryParams(PyObject *self, PyObject *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
513 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
514 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
|
515 int *PVbuffer; |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
516 PyObject *list; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
517 int i; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
518 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
519 CheckCompressor(SELF); |
|
1070
1a54d320f296
Fixed the last known bugs.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1061
diff
changeset
|
520 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
521 if (!PyArg_NoArgs(args)) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
522 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
523 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
524 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
|
525 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
|
526 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
|
527 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
528 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
529 PVbuffer = PyMem_NEW(int, bufferlength); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
530 if (PVbuffer == NULL) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
531 return PyErr_NoMemory(); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
532 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
533 bufferlength = clQueryParams(SELF->ob_compressorHdl, PVbuffer, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
534 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
|
535 if (error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
536 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
|
537 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
|
538 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
539 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
540 list = PyList_New(bufferlength); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
541 if (list == NULL) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
542 PyMem_DEL(PVbuffer); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
543 return NULL; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
544 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
545 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
546 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
|
547 if (i & 1) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
548 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
|
549 else if (PVbuffer[i] == 0) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
550 Py_INCREF(Py_None); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
551 PyList_SetItem(list, i, Py_None); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
552 } else |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
553 PyList_SetItem(list, i, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
554 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
|
555 } |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
556 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
557 PyMem_DEL(PVbuffer); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
558 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
559 return list; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
560 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
561 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
562 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
563 clm_GetMinMax(PyObject *self, PyObject *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
564 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
565 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
|
566 float fmin, fmax; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
567 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
568 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
569 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
570 if (!PyArg_Parse(args, "i", ¶m)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
571 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
572 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
573 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
|
574 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
575 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
|
576 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
|
577 fmax = CL_TypeIsFloat(max); |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
578 return Py_BuildValue("(ff)", fmin, fmax); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
579 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
580 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
581 return Py_BuildValue("(ii)", min, max); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
582 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
583 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
584 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
585 clm_GetName(PyObject *self, PyObject *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
586 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
587 int param; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
588 char *name; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
589 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
590 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
591 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
592 if (!PyArg_Parse(args, "i", ¶m)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
593 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
594 |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
595 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
|
596 name = clGetName(SELF->ob_compressorHdl, param); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
597 if (name == NULL || error_handler_called) { |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
598 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
599 PyErr_SetString(ClError, "getname failed"); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
600 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
601 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
602 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
603 return PyString_FromString(name); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
604 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
605 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
606 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
607 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
|
608 { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
609 CheckCompressor(SELF); |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
610 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
611 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
|
612 return NULL; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
613 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
614 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
|
615 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
616 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
617 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
618 clm_ReadHeader(PyObject *self, PyObject *args) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
619 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
620 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
|
621 int headerSize; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
622 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
623 CheckCompressor(SELF); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
624 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
625 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
|
626 return NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
627 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
628 return PyInt_FromLong(clReadHeader(SELF->ob_compressorHdl, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
629 headerSize, header)); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
630 } |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
631 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
632 static PyMethodDef compressor_methods[] = { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
633 {"close", clm_CloseCompressor}, /* alias */ |
| 1075 | 634 {"CloseCompressor", clm_CloseCompressor}, |
| 635 {"Compress", clm_Compress}, | |
| 636 {"GetDefault", clm_GetDefault}, | |
| 637 {"GetMinMax", clm_GetMinMax}, | |
| 638 {"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
|
639 {"GetParam", clm_GetParam}, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
640 {"GetParamID", clm_GetParamID}, |
| 1075 | 641 {"GetParams", clm_GetParams}, |
| 642 {"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
|
643 {"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
|
644 {"SetParam", clm_SetParam}, |
| 1075 | 645 {"SetParams", clm_SetParams}, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
646 {NULL, NULL} /* sentinel */ |
|
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 PyMethodDef decompressor_methods[] = { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
650 {"close", clm_CloseDecompressor}, /* alias */ |
| 1075 | 651 {"CloseDecompressor", clm_CloseDecompressor}, |
| 652 {"Decompress", clm_Decompress}, | |
| 653 {"GetDefault", clm_GetDefault}, | |
| 654 {"GetMinMax", clm_GetMinMax}, | |
| 655 {"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
|
656 {"GetParam", clm_GetParam}, |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
657 {"GetParamID", clm_GetParamID}, |
| 1075 | 658 {"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
|
659 {"ReadHeader", clm_ReadHeader}, |
| 1075 | 660 {"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
|
661 {"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
|
662 {"SetParam", clm_SetParam}, |
| 1075 | 663 {"SetParams", clm_SetParams}, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
664 {NULL, NULL} /* sentinel */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
665 }; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
666 |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
667 static void |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
668 cl_dealloc(PyObject *self) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
669 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
670 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
|
671 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
|
672 clCloseCompressor(SELF->ob_compressorHdl); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
673 else |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
674 clCloseDecompressor(SELF->ob_compressorHdl); |
|
1056
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 PyMem_DEL(self); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
677 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
678 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
679 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
680 cl_getattr(PyObject *self, char *name) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
681 { |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
682 if (SELF->ob_isCompressor) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
683 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
|
684 else |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
685 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
|
686 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
687 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
688 static PyTypeObject Cltype = { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
689 PyObject_HEAD_INIT(&PyType_Type) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
690 0, /*ob_size*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
691 "cl", /*tp_name*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
692 sizeof(clobject), /*tp_size*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
693 0, /*tp_itemsize*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
694 /* methods */ |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1334
diff
changeset
|
695 (destructor)cl_dealloc, /*tp_dealloc*/ |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
696 0, /*tp_print*/ |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1334
diff
changeset
|
697 (getattrfunc)cl_getattr, /*tp_getattr*/ |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
698 0, /*tp_setattr*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
699 0, /*tp_compare*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
700 0, /*tp_repr*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
701 0, /*tp_as_number*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
702 0, /*tp_as_sequence*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
703 0, /*tp_as_mapping*/ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
704 }; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
705 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
706 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
707 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
|
708 int iscompressor) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
709 { |
|
1205
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
710 int scheme; |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
711 clobject *new; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
712 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
713 if (!PyArg_Parse(args, "i", &scheme)) |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
714 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
715 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
716 new = PyObject_NEW(clobject, &Cltype); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
717 if (new == NULL) |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
718 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
719 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
720 new->ob_compressorHdl = NULL; |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
721 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
|
722 new->ob_paramtypes = NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
723 |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
724 error_handler_called = 0; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
725 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
|
726 error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
727 Py_DECREF(new); |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
728 if (!error_handler_called) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
729 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
|
730 return NULL; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
731 } |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
732 return (PyObject *)new; |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
733 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
734 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
735 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
736 cl_OpenCompressor(PyObject *self, PyObject *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
737 { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
738 return doOpen(self, args, clOpenCompressor, 1); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
739 } |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
740 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
741 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
742 cl_OpenDecompressor(PyObject *self, PyObject *args) |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
743 { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
744 return doOpen(self, args, clOpenDecompressor, 0); |
| 1075 | 745 } |
| 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_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
|
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 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
|
751 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
|
752 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
|
753 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
754 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
|
755 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
|
756 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
757 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
|
758 if (scheme < 0) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
759 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
|
760 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
|
761 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
762 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
763 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
|
764 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
765 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
766 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
767 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
|
768 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
769 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
|
770 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
771 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
|
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 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
774 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
|
775 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
776 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
777 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
778 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
|
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 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
|
781 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
|
782 int *PVbuffer; |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
783 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
|
784 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
|
785 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
786 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
|
787 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
|
788 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
789 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
|
790 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
|
791 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
|
792 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
|
793 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
794 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
|
795 if (PVbuffer == NULL) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
796 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
|
797 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
798 bufferlength = clQueryAlgorithms(algorithmMediaType, PVbuffer, |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
799 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
|
800 if (error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
801 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
|
802 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
|
803 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
804 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
805 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
|
806 if (list == NULL) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
807 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
|
808 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
|
809 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
810 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
811 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
|
812 if (i & 1) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
813 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
|
814 else if (PVbuffer[i] == 0) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
815 Py_INCREF(Py_None); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
816 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
|
817 } else |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
818 PyList_SetItem(list, i, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
819 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
|
820 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
821 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
822 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
|
823 |
|
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 list; |
|
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 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
827 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
828 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
|
829 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
830 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
|
831 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
|
832 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
|
833 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
834 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
|
835 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
|
836 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
837 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
|
838 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
|
839 if (error_handler_called) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
840 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
|
841 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
|
842 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
843 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
844 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
|
845 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
846 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
847 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
848 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
|
849 { |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
850 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
|
851 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
|
852 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
853 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
|
854 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
|
855 |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
856 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
|
857 if (name == 0) { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
858 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
|
859 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
|
860 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
861 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
862 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
|
863 } |
|
ecfbc246eeaa
CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1116
diff
changeset
|
864 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
865 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
866 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
|
867 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
868 int scheme, paramID, value; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
869 float fvalue; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
870 int is_float = 0; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
871 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
872 if (!PyArg_Parse(args, "(iii)", &scheme, ¶mID, &value)) { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
873 PyErr_Clear(); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
874 if (!PyArg_Parse(args, "(iif)", &scheme, ¶mID, &fvalue)) { |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
875 PyErr_Clear(); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
876 PyErr_SetString(PyExc_TypeError, |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
877 "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
|
878 return NULL; |
|
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 value = CL_TypeIsInt(fvalue); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
881 is_float = 1; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
882 } else { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
883 /* 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
|
884 switch (scheme) { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
885 case CL_COMPRESSION_RATIO: |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
886 case CL_SPEED: |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
887 fvalue = value; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
888 value = CL_TypeIsInt(fvalue); |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
889 is_float = 1; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
890 break; |
|
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 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
893 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
894 error_handler_called = 0; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
895 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
|
896 if (error_handler_called) |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
897 return NULL; |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
898 |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
899 if (is_float) |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
900 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
|
901 else |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
902 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
|
903 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
904 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
905 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
906 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
|
907 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
908 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
|
909 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
910 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
911 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
912 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
|
913 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
914 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
|
915 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
916 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
917 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
918 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
|
919 { |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
920 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
|
921 } |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
922 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
923 #define func(name, handler) \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
924 static PyObject *cl_##name(PyObject *self, PyObject *args) \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
925 { \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
926 int x; \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
927 if (!PyArg_Parse(args, "i", &x)) return NULL; \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
928 return Py##handler(CL_##name(x)); \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
929 } |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
930 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
931 #define func2(name, handler) \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
932 static PyObject *cl_##name(PyObject *self, PyObject *args) \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
933 { \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
934 int a1, a2; \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
935 if (!PyArg_Parse(args, "(ii)", &a1, &a2)) return NULL; \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
936 return Py##handler(CL_##name(a1, a2)); \ |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
937 } |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
938 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
939 func(BytesPerSample, Int_FromLong) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
940 func(BytesPerPixel, Int_FromLong) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
941 func(AudioFormatName, String_FromString) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
942 func(VideoFormatName, String_FromString) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
943 func(AlgorithmNumber, Int_FromLong) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
944 func(AlgorithmType, Int_FromLong) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
945 func2(Algorithm, Int_FromLong) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
946 func(ParamNumber, Int_FromLong) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
947 func(ParamType, Int_FromLong) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
948 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
|
949 |
|
1219
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
950 #ifdef CLDEBUG |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
951 static PyObject * |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
952 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
|
953 { |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
954 int number; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
955 float fnumber; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
956 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
957 if (PyArg_Parse(args, "i", &number)) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
958 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
|
959 else { |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
960 PyErr_Clear(); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
961 if (PyArg_Parse(args, "f", &fnumber)) |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
962 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
|
963 return NULL; |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
964 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
965 } |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
966 #endif |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
967 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
968 static PyMethodDef cl_methods[] = { |
|
1116
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
969 {"CompressImage", cl_CompressImage}, |
|
c26f5bec3438
adapted to newest version of CL library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
1075
diff
changeset
|
970 {"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
|
971 {"GetAlgorithmName", cl_GetAlgorithmName}, |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
972 {"OpenCompressor", cl_OpenCompressor}, |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
973 {"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
|
974 {"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
|
975 {"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
|
976 {"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
|
977 {"QuerySchemeFromName", cl_QuerySchemeFromName}, |
|
1222
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
978 {"SetDefault", cl_SetDefault}, |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
979 {"SetMax", cl_SetMax}, |
|
ce7ae8f81b06
* clmodule.c: the documentation was wrong, so changed the interface
Sjoerd Mullender <sjoerd@acm.org>
parents:
1219
diff
changeset
|
980 {"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
|
981 {"BytesPerSample", cl_BytesPerSample}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
982 {"BytesPerPixel", cl_BytesPerPixel}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
983 {"AudioFormatName", cl_AudioFormatName}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
984 {"VideoFormatName", cl_VideoFormatName}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
985 {"AlgorithmNumber", cl_AlgorithmNumber}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
986 {"AlgorithmType", cl_AlgorithmType}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
987 {"Algorithm", cl_Algorithm}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
988 {"ParamNumber", cl_ParamNumber}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
989 {"ParamType", cl_ParamType}, |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
990 {"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
|
991 #ifdef CLDEBUG |
|
64ec7bd2e837
* clmodule.c: use function prototypes (found and fixed some bugs this
Sjoerd Mullender <sjoerd@acm.org>
parents:
1205
diff
changeset
|
992 {"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
|
993 #endif |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
994 {NULL, NULL} /* Sentinel */ |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
995 }; |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
996 |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
997 #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
|
998 #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
|
999 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1000 |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
1001 void |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
1002 initcl() |
|
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
1003 { |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1004 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
|
1005 |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
1006 m = Py_InitModule("cl", cl_methods); |
|
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
1007 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
|
1008 |
|
6367
2c29b8982643
Apply two changes, systematically:
Guido van Rossum <guido@python.org>
parents:
5985
diff
changeset
|
1009 ClError = PyErr_NewException("cl.error", NULL, NULL); |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
1010 (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
|
1011 |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1012 #ifdef CL_ADDED_ALGORITHM_ERROR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1013 x = PyInt_FromLong(CL_ADDED_ALGORITHM_ERROR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1014 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
|
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_ALAW |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1019 x = PyInt_FromLong(CL_ALAW); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1020 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
|
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_ALGORITHM_ID |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1025 x = PyInt_FromLong(CL_ALGORITHM_ID); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1026 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
|
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_ALGORITHM_TABLE_FULL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1031 x = PyInt_FromLong(CL_ALGORITHM_TABLE_FULL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1032 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
|
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_ALGORITHM_VERSION |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1037 x = PyInt_FromLong(CL_ALGORITHM_VERSION); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1038 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
|
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_ALG_AUDIO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1043 x = PyInt_FromLong(CL_ALG_AUDIO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1044 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
|
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_ALG_VIDEO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1049 x = PyInt_FromLong(CL_ALG_VIDEO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1050 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
|
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_AUDIO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1055 x = PyInt_FromLong(CL_AUDIO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1056 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
|
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_BITRATE_POLICY |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1061 x = PyInt_FromLong(CL_AWARE_BITRATE_POLICY); |
|
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_BITRATE_POLICY", 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_BITRATE_TARGET |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1067 x = PyInt_FromLong(CL_AWARE_BITRATE_TARGET); |
|
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_BITRATE_TARGET", 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_CHANNEL_POLICY |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1073 x = PyInt_FromLong(CL_AWARE_CHANNEL_POLICY); |
|
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_CHANNEL_POLICY", 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_CONST_QUAL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1079 x = PyInt_FromLong(CL_AWARE_CONST_QUAL); |
|
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_CONST_QUAL", 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_ERROR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1085 x = PyInt_FromLong(CL_AWARE_ERROR); |
|
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_ERROR", 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_FIXED_RATE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1091 x = PyInt_FromLong(CL_AWARE_FIXED_RATE); |
|
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_FIXED_RATE", 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_INDEPENDENT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1097 x = PyInt_FromLong(CL_AWARE_INDEPENDENT); |
|
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_INDEPENDENT", 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_JOINT_STEREO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1103 x = PyInt_FromLong(CL_AWARE_JOINT_STEREO); |
|
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_JOINT_STEREO", 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_LAYER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1109 x = PyInt_FromLong(CL_AWARE_LAYER); |
|
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_LAYER", 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_LOSSLESS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1115 x = PyInt_FromLong(CL_AWARE_LOSSLESS); |
|
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_LOSSLESS", 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_MPEG_AUDIO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1121 x = PyInt_FromLong(CL_AWARE_MPEG_AUDIO); |
|
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_MPEG_AUDIO", 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_AWARE_MPEG_LAYER_I |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1127 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
|
1128 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
|
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_AWARE_MPEG_LAYER_II |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1133 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
|
1134 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
|
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_AWARE_MULTIRATE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1139 x = PyInt_FromLong(CL_AWARE_MULTIRATE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1140 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
|
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_AWARE_NOISE_MARGIN |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1145 x = PyInt_FromLong(CL_AWARE_NOISE_MARGIN); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1146 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
|
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_AWARE_STEREO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1151 x = PyInt_FromLong(CL_AWARE_STEREO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1152 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
|
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_ALGORITHM_NAME |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1157 x = PyInt_FromLong(CL_BAD_ALGORITHM_NAME); |
|
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_ALGORITHM_NAME", 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_ALGORITHM_TYPE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1163 x = PyInt_FromLong(CL_BAD_ALGORITHM_TYPE); |
|
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_ALGORITHM_TYPE", 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_BLOCK_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1169 x = PyInt_FromLong(CL_BAD_BLOCK_SIZE); |
|
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_BLOCK_SIZE", 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_BOARD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1175 x = PyInt_FromLong(CL_BAD_BOARD); |
|
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_BOARD", 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_BUFFERING |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1181 x = PyInt_FromLong(CL_BAD_BUFFERING); |
|
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_BUFFERING", 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_BUFFERLENGTH_NEG |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1187 x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_NEG); |
|
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_BUFFERLENGTH_NEG", 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_BUFFERLENGTH_ODD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1193 x = PyInt_FromLong(CL_BAD_BUFFERLENGTH_ODD); |
|
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_BUFFERLENGTH_ODD", 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_EXISTS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1199 x = PyInt_FromLong(CL_BAD_BUFFER_EXISTS); |
|
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_EXISTS", 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_HANDLE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1205 x = PyInt_FromLong(CL_BAD_BUFFER_HANDLE); |
|
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_HANDLE", 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_BUFFER_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1211 x = PyInt_FromLong(CL_BAD_BUFFER_POINTER); |
|
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_BUFFER_POINTER", 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_BUFFER_QUERY_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1217 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
|
1218 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
|
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_BUFFER_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1223 x = PyInt_FromLong(CL_BAD_BUFFER_SIZE); |
|
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_BUFFER_SIZE", 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_BUFFER_SIZE_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1229 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
|
1230 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
|
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_BUFFER_TYPE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1235 x = PyInt_FromLong(CL_BAD_BUFFER_TYPE); |
|
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_BUFFER_TYPE", 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_COMPRESSION_SCHEME |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1241 x = PyInt_FromLong(CL_BAD_COMPRESSION_SCHEME); |
|
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_COMPRESSION_SCHEME", 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_COMPRESSOR_HANDLE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1247 x = PyInt_FromLong(CL_BAD_COMPRESSOR_HANDLE); |
|
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_COMPRESSOR_HANDLE", 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_COMPRESSOR_HANDLE_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1253 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
|
1254 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
|
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_FRAME_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1259 x = PyInt_FromLong(CL_BAD_FRAME_SIZE); |
|
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_FRAME_SIZE", 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_FUNCTIONALITY |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1265 x = PyInt_FromLong(CL_BAD_FUNCTIONALITY); |
|
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_FUNCTIONALITY", 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_FUNCTION_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1271 x = PyInt_FromLong(CL_BAD_FUNCTION_POINTER); |
|
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_FUNCTION_POINTER", 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_HEADER_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1277 x = PyInt_FromLong(CL_BAD_HEADER_SIZE); |
|
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_HEADER_SIZE", 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_INITIAL_VALUE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1283 x = PyInt_FromLong(CL_BAD_INITIAL_VALUE); |
|
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_INITIAL_VALUE", 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_INTERNAL_FORMAT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1289 x = PyInt_FromLong(CL_BAD_INTERNAL_FORMAT); |
|
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_INTERNAL_FORMAT", 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_LICENSE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1295 x = PyInt_FromLong(CL_BAD_LICENSE); |
|
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_LICENSE", 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_MIN_GT_MAX |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1301 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
|
1302 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
|
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_NO_BUFFERSPACE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1307 x = PyInt_FromLong(CL_BAD_NO_BUFFERSPACE); |
|
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_NO_BUFFERSPACE", 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); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1311 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1312 #ifdef CL_BAD_NUMBER_OF_BLOCKS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1313 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
|
1314 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
|
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_PARAM |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1319 x = PyInt_FromLong(CL_BAD_PARAM); |
|
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_PARAM", 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_PARAM_ID_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1325 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
|
1326 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
|
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_PARAM_TYPE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1331 x = PyInt_FromLong(CL_BAD_PARAM_TYPE); |
|
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_PARAM_TYPE", 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_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1337 x = PyInt_FromLong(CL_BAD_POINTER); |
|
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_POINTER", 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); |
|
2714
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1341 #endif |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1342 #ifdef CL_BAD_PVBUFFER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1343 x = PyInt_FromLong(CL_BAD_PVBUFFER); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1344 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
|
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_BAD_SCHEME_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1349 x = PyInt_FromLong(CL_BAD_SCHEME_POINTER); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1350 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
|
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_BAD_STREAM_HEADER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1355 x = PyInt_FromLong(CL_BAD_STREAM_HEADER); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1356 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
|
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_BAD_STRING_POINTER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1361 x = PyInt_FromLong(CL_BAD_STRING_POINTER); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1362 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
|
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_BAD_TEXT_STRING_PTR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1367 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
|
1368 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
|
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_BEST_FIT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1373 x = PyInt_FromLong(CL_BEST_FIT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1374 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
|
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_BIDIRECTIONAL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1379 x = PyInt_FromLong(CL_BIDIRECTIONAL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1380 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
|
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_BITRATE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1385 x = PyInt_FromLong(CL_BITRATE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1386 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
|
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_BITRATE_POLICY |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1391 x = PyInt_FromLong(CL_BITRATE_POLICY); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1392 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
|
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_BITRATE_TARGET |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1397 x = PyInt_FromLong(CL_BITRATE_TARGET); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1398 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
|
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_BITS_PER_COMPONENT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1403 x = PyInt_FromLong(CL_BITS_PER_COMPONENT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1404 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
|
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_BLENDING |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1409 x = PyInt_FromLong(CL_BLENDING); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1410 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
|
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_BLOCK_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1415 x = PyInt_FromLong(CL_BLOCK_SIZE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1416 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
|
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_BOTTOM_UP |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1421 x = PyInt_FromLong(CL_BOTTOM_UP); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1422 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
|
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_BUFFER_NOT_CREATED |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1427 x = PyInt_FromLong(CL_BUFFER_NOT_CREATED); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1428 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
|
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_BUF_COMPRESSED |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1433 x = PyInt_FromLong(CL_BUF_COMPRESSED); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1434 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
|
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_BUF_DATA |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1439 x = PyInt_FromLong(CL_BUF_DATA); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1440 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
|
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_BUF_FRAME |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1445 x = PyInt_FromLong(CL_BUF_FRAME); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1446 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
|
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_CHANNEL_POLICY |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1451 x = PyInt_FromLong(CL_CHANNEL_POLICY); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1452 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
|
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_CHROMA_THRESHOLD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1457 x = PyInt_FromLong(CL_CHROMA_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1458 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
|
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_CODEC |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1463 x = PyInt_FromLong(CL_CODEC); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1464 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
|
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_COMPONENTS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1469 x = PyInt_FromLong(CL_COMPONENTS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1470 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
|
1471 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1472 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1473 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1474 #ifdef CL_COMPRESSED_BUFFER_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1475 x = PyInt_FromLong(CL_COMPRESSED_BUFFER_SIZE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1476 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
|
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_COMPRESSION_RATIO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1481 x = PyInt_FromLong(CL_COMPRESSION_RATIO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1482 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
|
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_COMPRESSOR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1487 x = PyInt_FromLong(CL_COMPRESSOR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1488 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
|
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_CONTINUOUS_BLOCK |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1493 x = PyInt_FromLong(CL_CONTINUOUS_BLOCK); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1494 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
|
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_CONTINUOUS_NONBLOCK |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1499 x = PyInt_FromLong(CL_CONTINUOUS_NONBLOCK); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1500 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
|
1501 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1502 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
|
1503 #endif |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1504 #ifdef CL_COSMO_CODEC_CONTROL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1505 x = PyInt_FromLong(CL_COSMO_CODEC_CONTROL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1506 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
|
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_COSMO_NUM_PARAMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1511 x = PyInt_FromLong(CL_COSMO_NUM_PARAMS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1512 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
|
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_COSMO_VALUE_BASE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1517 x = PyInt_FromLong(CL_COSMO_VALUE_BASE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1518 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
|
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_COSMO_VIDEO_MANUAL_CONTROL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1523 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
|
1524 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
|
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_COSMO_VIDEO_TRANSFER_MODE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1529 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
|
1530 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
|
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_DATA |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1535 x = PyInt_FromLong(CL_DATA); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1536 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
|
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_DECOMPRESSOR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1541 x = PyInt_FromLong(CL_DECOMPRESSOR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1542 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
|
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_DSO_ERROR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1547 x = PyInt_FromLong(CL_DSO_ERROR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1548 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
|
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_EDGE_THRESHOLD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1553 x = PyInt_FromLong(CL_EDGE_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1554 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
|
1555 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1556 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1557 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1558 #ifdef CL_ENABLE_IMAGEINFO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1559 x = PyInt_FromLong(CL_ENABLE_IMAGEINFO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1560 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
|
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_END_OF_SEQUENCE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1565 x = PyInt_FromLong(CL_END_OF_SEQUENCE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1566 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
|
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_ENUM_VALUE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1571 x = PyInt_FromLong(CL_ENUM_VALUE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1572 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
|
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_EXACT_COMPRESSION_RATIO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1577 x = PyInt_FromLong(CL_EXACT_COMPRESSION_RATIO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1578 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
|
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_EXTERNAL_DEVICE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1583 x = PyInt_FromLong((long) CL_EXTERNAL_DEVICE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1584 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
|
1585 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1586 Py_DECREF(x); |
|
4984
77f970076831
Renamed.
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4600
diff
changeset
|
1587 #endif |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1588 #ifdef CL_FLOATING_ENUM_VALUE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1589 x = PyInt_FromLong(CL_FLOATING_ENUM_VALUE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1590 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
|
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_FLOATING_RANGE_VALUE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1595 x = PyInt_FromLong(CL_FLOATING_RANGE_VALUE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1596 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
|
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 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1601 x = PyInt_FromLong(CL_FORMAT); |
|
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", 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_ABGR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1607 x = PyInt_FromLong(CL_FORMAT_ABGR); |
|
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_ABGR", 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_BGR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1613 x = PyInt_FromLong(CL_FORMAT_BGR); |
|
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_BGR", 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_BGR233 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1619 x = PyInt_FromLong(CL_FORMAT_BGR233); |
|
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_BGR233", 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_GRAYSCALE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1625 x = PyInt_FromLong(CL_FORMAT_GRAYSCALE); |
|
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_GRAYSCALE", 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_MONO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1631 x = PyInt_FromLong(CL_FORMAT_MONO); |
|
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_MONO", 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_RBG323 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1637 x = PyInt_FromLong(CL_FORMAT_RBG323); |
|
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_RBG323", 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); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1641 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1642 #ifdef CL_FORMAT_STEREO_INTERLEAVED |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1643 x = PyInt_FromLong(CL_FORMAT_STEREO_INTERLEAVED); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1644 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
|
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_FORMAT_XBGR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1649 x = PyInt_FromLong(CL_FORMAT_XBGR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1650 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
|
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_FORMAT_YCbCr |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1655 x = PyInt_FromLong(CL_FORMAT_YCbCr); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1656 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
|
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_FORMAT_YCbCr422 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1661 x = PyInt_FromLong(CL_FORMAT_YCbCr422); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1662 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
|
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_FORMAT_YCbCr422DC |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1667 x = PyInt_FromLong(CL_FORMAT_YCbCr422DC); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1668 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
|
1669 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1670 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
|
1671 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1672 #ifdef CL_FRAME |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1673 x = PyInt_FromLong(CL_FRAME); |
|
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", 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_FRAMES_PER_CHUNK |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1679 x = PyInt_FromLong(CL_FRAMES_PER_CHUNK); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1680 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
|
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_BUFFER_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1685 x = PyInt_FromLong(CL_FRAME_BUFFER_SIZE); |
|
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_BUFFER_SIZE", 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_FRAME_BUFFER_SIZE_ZERO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1691 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
|
1692 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
|
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_FRAME_INDEX |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1697 x = PyInt_FromLong(CL_FRAME_INDEX); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1698 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
|
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_FRAME_RATE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1703 x = PyInt_FromLong(CL_FRAME_RATE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1704 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
|
1705 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1706 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1707 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1708 #ifdef CL_FRAME_SIZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1709 x = PyInt_FromLong(CL_FRAME_SIZE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1710 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
|
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_FRAME_TYPE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1715 x = PyInt_FromLong(CL_FRAME_TYPE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1716 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
|
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_G711_ALAW |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1721 x = PyInt_FromLong(CL_G711_ALAW); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1722 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
|
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_G711_ALAW_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1727 x = PyInt_FromLong(CL_G711_ALAW_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1728 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
|
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_G711_ULAW |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1733 x = PyInt_FromLong(CL_G711_ULAW); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1734 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
|
1735 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1736 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
|
1737 #endif |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1738 #ifdef CL_G711_ULAW_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1739 x = PyInt_FromLong(CL_G711_ULAW_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1740 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
|
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_GRAYSCALE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1745 x = PyInt_FromLong(CL_GRAYSCALE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1746 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
|
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_HDCC |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1751 x = PyInt_FromLong(CL_HDCC); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1752 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
|
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_HDCC_SAMPLES_PER_TILE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1757 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
|
1758 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
|
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_HDCC_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1763 x = PyInt_FromLong(CL_HDCC_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1764 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
|
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_HDCC_TILE_THRESHOLD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1769 x = PyInt_FromLong(CL_HDCC_TILE_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1770 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
|
1771 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1772 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1773 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1774 #ifdef CL_HEADER_START_CODE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1775 x = PyInt_FromLong(CL_HEADER_START_CODE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1776 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
|
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_IMAGEINFO_FIELDMASK |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1781 x = PyInt_FromLong(CL_IMAGEINFO_FIELDMASK); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1782 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
|
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_CROP_BOTTOM |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1787 x = PyInt_FromLong(CL_IMAGE_CROP_BOTTOM); |
|
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_CROP_BOTTOM", 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_IMAGE_CROP_LEFT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1793 x = PyInt_FromLong(CL_IMAGE_CROP_LEFT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1794 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
|
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_IMAGE_CROP_RIGHT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1799 x = PyInt_FromLong(CL_IMAGE_CROP_RIGHT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1800 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
|
1801 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1802 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
|
1803 #endif |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1804 #ifdef CL_IMAGE_CROP_TOP |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1805 x = PyInt_FromLong(CL_IMAGE_CROP_TOP); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1806 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
|
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_IMAGE_HEIGHT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1811 x = PyInt_FromLong(CL_IMAGE_HEIGHT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1812 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
|
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_IMAGE_WIDTH |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1817 x = PyInt_FromLong(CL_IMAGE_WIDTH); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1818 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
|
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_IMPACT_CODEC_CONTROL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1823 x = PyInt_FromLong(CL_IMPACT_CODEC_CONTROL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1824 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
|
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_IMPACT_FRAME_INTERLEAVE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1829 x = PyInt_FromLong(CL_IMPACT_FRAME_INTERLEAVE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1830 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
|
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_IMPACT_NUM_PARAMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1835 x = PyInt_FromLong(CL_IMPACT_NUM_PARAMS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1836 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
|
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_INTERNAL_FORMAT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1841 x = PyInt_FromLong(CL_INTERNAL_FORMAT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1842 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
|
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_INTERNAL_IMAGE_HEIGHT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1847 x = PyInt_FromLong(CL_INTERNAL_IMAGE_HEIGHT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1848 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
|
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_INTERNAL_IMAGE_WIDTH |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1853 x = PyInt_FromLong(CL_INTERNAL_IMAGE_WIDTH); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1854 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
|
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_INTRA |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1859 x = PyInt_FromLong(CL_INTRA); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1860 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
|
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 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1865 x = PyInt_FromLong(CL_JPEG); |
|
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", 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_COSMO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1871 x = PyInt_FromLong(CL_JPEG_COSMO); |
|
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_COSMO", 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_ERROR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1877 x = PyInt_FromLong(CL_JPEG_ERROR); |
|
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_ERROR", 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_IMPACT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1883 x = PyInt_FromLong(CL_JPEG_IMPACT); |
|
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_IMPACT", 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_JPEG_NUM_PARAMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1889 x = PyInt_FromLong(CL_JPEG_NUM_PARAMS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1890 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
|
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_JPEG_QUALITY_FACTOR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1895 x = PyInt_FromLong(CL_JPEG_QUALITY_FACTOR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1896 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
|
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_JPEG_QUANTIZATION_TABLES |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1901 x = PyInt_FromLong(CL_JPEG_QUANTIZATION_TABLES); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1902 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
|
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_JPEG_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1907 x = PyInt_FromLong(CL_JPEG_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1908 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
|
1909 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1910 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1911 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1912 #ifdef CL_JPEG_STREAM_HEADERS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1913 x = PyInt_FromLong(CL_JPEG_STREAM_HEADERS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1914 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
|
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_KEYFRAME |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1919 x = PyInt_FromLong(CL_KEYFRAME); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1920 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
|
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_KEYFRAME_DISTANCE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1925 x = PyInt_FromLong(CL_KEYFRAME_DISTANCE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1926 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
|
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_LAST_FRAME_INDEX |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1931 x = PyInt_FromLong(CL_LAST_FRAME_INDEX); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1932 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
|
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_LAYER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1937 x = PyInt_FromLong(CL_LAYER); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1938 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
|
1939 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1940 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
|
1941 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
1942 #ifdef CL_LUMA_THRESHOLD |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1943 x = PyInt_FromLong(CL_LUMA_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1944 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
|
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_MAX_NUMBER_OF_AUDIO_ALGORITHMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1949 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
|
1950 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
|
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_MAX_NUMBER_OF_FORMATS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1955 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
|
1956 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
|
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_MAX_NUMBER_OF_ORIGINAL_FORMATS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1961 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
|
1962 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
|
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_MAX_NUMBER_OF_PARAMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1967 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
|
1968 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
|
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_MAX_NUMBER_OF_VIDEO_ALGORITHMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1973 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
|
1974 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
|
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_MONO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1979 x = PyInt_FromLong(CL_MONO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1980 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
|
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_AWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1985 x = PyInt_FromLong(CL_MPEG1_AUDIO_AWARE); |
|
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_AWARE", 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_LAYER |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1991 x = PyInt_FromLong(CL_MPEG1_AUDIO_LAYER); |
|
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_LAYER", 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_LAYER_I |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
1997 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
|
1998 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
|
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_LAYER_II |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2003 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
|
2004 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
|
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_MODE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2009 x = PyInt_FromLong(CL_MPEG1_AUDIO_MODE); |
|
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_MODE", 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_AUDIO_MODE_DUAL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2015 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
|
2016 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
|
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_AUDIO_MODE_JOINT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2021 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
|
2022 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
|
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_AUDIO_MODE_SINGLE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2027 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
|
2028 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
|
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_AUDIO_MODE_STEREO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2033 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
|
2034 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
|
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_AUDIO_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2039 x = PyInt_FromLong(CL_MPEG1_AUDIO_SOFTWARE); |
|
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_AUDIO_SOFTWARE", 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_END_OF_STREAM |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2045 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
|
2046 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
|
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_ERROR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2051 x = PyInt_FromLong(CL_MPEG1_ERROR); |
|
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_ERROR", 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_NUM_PARAMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2057 x = PyInt_FromLong(CL_MPEG1_NUM_PARAMS); |
|
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_NUM_PARAMS", 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_M |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2063 x = PyInt_FromLong(CL_MPEG1_VIDEO_M); |
|
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_M", 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_MAX_MOTION_VECTOR_LENGTH_B_X |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2069 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
|
2070 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
|
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_MAX_MOTION_VECTOR_LENGTH_B_Y |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2075 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
|
2076 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
|
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_MAX_MOTION_VECTOR_LENGTH_P_X |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2081 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
|
2082 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
|
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_MAX_MOTION_VECTOR_LENGTH_P_Y |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2087 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
|
2088 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
|
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_N |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2093 x = PyInt_FromLong(CL_MPEG1_VIDEO_N); |
|
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_N", 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_MPEG1_VIDEO_SOFTNESS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2099 x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTNESS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2100 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
|
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_MPEG1_VIDEO_SOFTNESS_MAXIMUM |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2105 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
|
2106 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
|
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_MPEG1_VIDEO_SOFTNESS_MEDIUM |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2111 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
|
2112 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
|
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_MPEG1_VIDEO_SOFTNESS_NONE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2117 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
|
2118 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
|
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_MPEG1_VIDEO_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2123 x = PyInt_FromLong(CL_MPEG1_VIDEO_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2124 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
|
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_MPEG_VIDEO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2129 x = PyInt_FromLong(CL_MPEG_VIDEO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2130 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
|
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_MULTIRATE_AWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2135 x = PyInt_FromLong(CL_MULTIRATE_AWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2136 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
|
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_MVC1 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2141 x = PyInt_FromLong(CL_MVC1); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2142 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
|
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_MVC1_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2147 x = PyInt_FromLong(CL_MVC1_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2148 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
|
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 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2153 x = PyInt_FromLong(CL_MVC2); |
|
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", 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_BLENDING |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2159 x = PyInt_FromLong(CL_MVC2_BLENDING); |
|
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_BLENDING", 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_BLENDING_OFF |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2165 x = PyInt_FromLong(CL_MVC2_BLENDING_OFF); |
|
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_BLENDING_OFF", 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_BLENDING_ON |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2171 x = PyInt_FromLong(CL_MVC2_BLENDING_ON); |
|
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_BLENDING_ON", 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_MVC2_CHROMA_THRESHOLD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2177 x = PyInt_FromLong(CL_MVC2_CHROMA_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2178 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
|
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_MVC2_EDGE_THRESHOLD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2183 x = PyInt_FromLong(CL_MVC2_EDGE_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2184 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
|
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_MVC2_ERROR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2189 x = PyInt_FromLong(CL_MVC2_ERROR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2190 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
|
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_MVC2_LUMA_THRESHOLD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2195 x = PyInt_FromLong(CL_MVC2_LUMA_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2196 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
|
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_MVC2_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2201 x = PyInt_FromLong(CL_MVC2_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2202 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
|
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_MVC3_QUALITY_LEVEL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2207 x = PyInt_FromLong(CL_MVC3_QUALITY_LEVEL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2208 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
|
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_MVC3_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2213 x = PyInt_FromLong(CL_MVC3_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2214 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
|
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_NEXT_NOT_AVAILABLE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2219 x = PyInt_FromLong(CL_NEXT_NOT_AVAILABLE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2220 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
|
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_NOISE_MARGIN |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2225 x = PyInt_FromLong(CL_NOISE_MARGIN); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2226 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
|
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_NONE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2231 x = PyInt_FromLong(CL_NONE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2232 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
|
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_NUMBER_OF_FORMATS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2237 x = PyInt_FromLong(CL_NUMBER_OF_FORMATS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2238 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
|
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_NUMBER_OF_FRAMES |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2243 x = PyInt_FromLong(CL_NUMBER_OF_FRAMES); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2244 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
|
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_NUMBER_OF_PARAMS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2249 x = PyInt_FromLong(CL_NUMBER_OF_PARAMS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2250 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
|
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_NUMBER_OF_PARAMS_FREEZE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2255 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
|
2256 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
|
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_NUMBER_OF_VIDEO_FORMATS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2261 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
|
2262 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
|
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_ORIENTATION |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2267 x = PyInt_FromLong(CL_ORIENTATION); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2268 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
|
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_ORIGINAL_FORMAT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2273 x = PyInt_FromLong(CL_ORIGINAL_FORMAT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2274 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
|
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_PARAM_OUT_OF_RANGE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2279 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
|
2280 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
|
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_PIXEL_ASPECT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2285 x = PyInt_FromLong(CL_PIXEL_ASPECT); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2286 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
|
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_PREDICTED |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2291 x = PyInt_FromLong(CL_PREDICTED); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2292 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
|
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_PREROLL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2297 x = PyInt_FromLong(CL_PREROLL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2298 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
|
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_QUALITY_FACTOR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2303 x = PyInt_FromLong(CL_QUALITY_FACTOR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2304 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
|
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_QUALITY_LEVEL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2309 x = PyInt_FromLong(CL_QUALITY_LEVEL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2310 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
|
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_QUALITY_SPATIAL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2315 x = PyInt_FromLong(CL_QUALITY_SPATIAL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2316 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
|
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_QUALITY_TEMPORAL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2321 x = PyInt_FromLong(CL_QUALITY_TEMPORAL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2322 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
|
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_QUANTIZATION_TABLES |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2327 x = PyInt_FromLong(CL_QUANTIZATION_TABLES); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2328 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
|
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_RANGE_VALUE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2333 x = PyInt_FromLong(CL_RANGE_VALUE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2334 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
|
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_RGB |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2339 x = PyInt_FromLong(CL_RGB); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2340 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
|
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_RGB332 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2345 x = PyInt_FromLong(CL_RGB332); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2346 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
|
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_RGB8 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2351 x = PyInt_FromLong(CL_RGB8); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2352 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
|
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_RGBA |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2357 x = PyInt_FromLong(CL_RGBA); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2358 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
|
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_RGBX |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2363 x = PyInt_FromLong(CL_RGBX); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2364 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
|
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_RLE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2369 x = PyInt_FromLong(CL_RLE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2370 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
|
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_RLE24 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2375 x = PyInt_FromLong(CL_RLE24); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2376 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
|
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_RLE24_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2381 x = PyInt_FromLong(CL_RLE24_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2382 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
|
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_RLE_SOFTWARE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2387 x = PyInt_FromLong(CL_RLE_SOFTWARE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2388 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
|
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_RTR |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2393 x = PyInt_FromLong(CL_RTR); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2394 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
|
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_RTR1 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2399 x = PyInt_FromLong(CL_RTR1); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2400 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
|
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_RTR_QUALITY_LEVEL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2405 x = PyInt_FromLong(CL_RTR_QUALITY_LEVEL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2406 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
|
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_SAMPLES_PER_TILE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2411 x = PyInt_FromLong(CL_SAMPLES_PER_TILE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2412 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
|
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_SCHEME_BUSY |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2417 x = PyInt_FromLong(CL_SCHEME_BUSY); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2418 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
|
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_SCHEME_NOT_AVAILABLE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2423 x = PyInt_FromLong(CL_SCHEME_NOT_AVAILABLE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2424 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
|
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_SPEED |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2429 x = PyInt_FromLong(CL_SPEED); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2430 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
|
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_STEREO_INTERLEAVED |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2435 x = PyInt_FromLong(CL_STEREO_INTERLEAVED); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2436 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
|
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_STREAM_HEADERS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2441 x = PyInt_FromLong(CL_STREAM_HEADERS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2442 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
|
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_TILE_THRESHOLD |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2447 x = PyInt_FromLong(CL_TILE_THRESHOLD); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2448 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
|
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_TOP_DOWN |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2453 x = PyInt_FromLong(CL_TOP_DOWN); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2454 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
|
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_ULAW |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2459 x = PyInt_FromLong(CL_ULAW); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2460 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
|
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_UNCOMPRESSED |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2465 x = PyInt_FromLong(CL_UNCOMPRESSED); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2466 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
|
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_UNCOMPRESSED_AUDIO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2471 x = PyInt_FromLong(CL_UNCOMPRESSED_AUDIO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2472 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
|
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_UNCOMPRESSED_VIDEO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2477 x = PyInt_FromLong(CL_UNCOMPRESSED_VIDEO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2478 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
|
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_UNKNOWN_SCHEME |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2483 x = PyInt_FromLong(CL_UNKNOWN_SCHEME); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2484 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
|
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_VIDEO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2489 x = PyInt_FromLong(CL_VIDEO); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2490 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
|
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_Y |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2495 x = PyInt_FromLong(CL_Y); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2496 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
|
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_YCbCr |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2501 x = PyInt_FromLong(CL_YCbCr); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2502 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
|
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_YCbCr422 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2507 x = PyInt_FromLong(CL_YCbCr422); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2508 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
|
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_YCbCr422DC |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2513 x = PyInt_FromLong(CL_YCbCr422DC); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2514 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
|
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 CL_YCbCr422HC |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2519 x = PyInt_FromLong(CL_YCbCr422HC); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2520 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
|
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 CL_YUV |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2525 x = PyInt_FromLong(CL_YUV); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2526 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
|
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 CL_YUV422 |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2531 x = PyInt_FromLong(CL_YUV422); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2532 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
|
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 CL_YUV422DC |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2537 x = PyInt_FromLong(CL_YUV422DC); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2538 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
|
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 CL_YUV422HC |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2543 x = PyInt_FromLong(CL_YUV422HC); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2544 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
|
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_STEREO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2549 x = PyInt_FromLong(AWCMP_STEREO); |
|
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_STEREO", 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_JOINT_STEREO |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2555 x = PyInt_FromLong(AWCMP_JOINT_STEREO); |
|
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_JOINT_STEREO", 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_INDEPENDENT |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2561 x = PyInt_FromLong(AWCMP_INDEPENDENT); |
|
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_INDEPENDENT", 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); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2565 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2566 #ifdef AWCMP_FIXED_RATE |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2567 x = PyInt_FromLong(AWCMP_FIXED_RATE); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2568 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
|
2569 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2570 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2571 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2572 #ifdef AWCMP_CONST_QUAL |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2573 x = PyInt_FromLong(AWCMP_CONST_QUAL); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2574 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
|
2575 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2576 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2577 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2578 #ifdef AWCMP_LOSSLESS |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2579 x = PyInt_FromLong(AWCMP_LOSSLESS); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2580 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
|
2581 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2582 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2583 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2584 #ifdef AWCMP_MPEG_LAYER_I |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2585 x = PyInt_FromLong(AWCMP_MPEG_LAYER_I); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2586 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
|
2587 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2588 Py_DECREF(x); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2589 #endif |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2590 #ifdef AWCMP_MPEG_LAYER_II |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2591 x = PyInt_FromLong(AWCMP_MPEG_LAYER_II); |
|
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2592 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
|
2593 return; |
|
5985
03a8833b4b73
Megapatch for IRIX 6 by Sjoerd.
Guido van Rossum <guido@python.org>
parents:
4984
diff
changeset
|
2594 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
|
2595 #endif |
|
75afaac85567
Make constants from cl.h include file available as module variables.
Sjoerd Mullender <sjoerd@acm.org>
parents:
2061
diff
changeset
|
2596 |
|
1061
a3fa229775c1
New built-in module "cl" (Compression Library). Only for Irix 4.0.5
Sjoerd Mullender <sjoerd@acm.org>
parents:
1056
diff
changeset
|
2597 (void) clSetErrorHandler(cl_ErrorHandler); |
|
1056
9bf75e4d9aec
New built-in module cl, the Compression Library.
Sjoerd Mullender <sjoerd@acm.org>
parents:
diff
changeset
|
2598 } |
