Cython has moved to github.

pyrex

view Tests/9/Reference/altet2.c @ 86:da6e97bb7e6d

Multiple compilation fixed
author Gregory Ewing <greg.ewing@canterbury.ac.nz>
date Sat May 24 15:50:12 2008 +1200 (4 years ago)
parents fe7bb820834c
children
line source
1 /* Generated by Pyrex 0.9.5.2 on Fri Oct 5 22:38:10 2007 */
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #include "structmember.h"
6 #ifndef PY_LONG_LONG
7 #define PY_LONG_LONG LONG_LONG
8 #endif
9 #if PY_VERSION_HEX < 0x02050000
10 typedef int Py_ssize_t;
11 #define PY_SSIZE_T_MAX INT_MAX
12 #define PY_SSIZE_T_MIN INT_MIN
13 #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
14 #define PyInt_AsSsize_t(o) PyInt_AsLong(o)
15 #endif
16 #ifndef WIN32
17 #define __stdcall
18 #define __cdecl
19 #endif
20 #ifdef __cplusplus
21 #define __PYX_EXTERN_C extern "C"
22 #else
23 #define __PYX_EXTERN_C extern
24 #endif
25 #include <math.h>
28 typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
29 typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
31 static PyObject *__pyx_m;
32 static PyObject *__pyx_b;
33 static int __pyx_lineno;
34 static char *__pyx_filename;
35 static char **__pyx_f;
37 static void __Pyx_AddTraceback(char *funcname); /*proto*/
39 /* Declarations from altet2 */
41 struct __pyx_obj_6altet2_C {
42 PyObject_HEAD
43 };
46 static PyTypeObject *__pyx_ptype_6altet2_C = 0;
49 static __Pyx_StringTabEntry __pyx_string_tab[] = {
50 {0, 0, 0, 0}
51 };
53 /* Implementation of altet2 */
55 static PyObject *__pyx_f_6altet2_1C___iter__(PyObject *__pyx_v_self); /*proto*/
56 static PyObject *__pyx_f_6altet2_1C___iter__(PyObject *__pyx_v_self) {
57 PyObject *__pyx_r;
58 Py_INCREF(__pyx_v_self);
60 __pyx_r = Py_None; Py_INCREF(Py_None);
61 Py_DECREF(__pyx_v_self);
62 return __pyx_r;
63 }
65 static PyObject *__pyx_tp_new_6altet2_C(PyTypeObject *t, PyObject *a, PyObject *k) {
66 PyObject *o = (*t->tp_alloc)(t, 0);
67 if (!o) return 0;
68 return o;
69 }
71 static void __pyx_tp_dealloc_6altet2_C(PyObject *o) {
72 (*o->ob_type->tp_free)(o);
73 }
75 static int __pyx_tp_traverse_6altet2_C(PyObject *o, visitproc v, void *a) {
76 return 0;
77 }
79 static int __pyx_tp_clear_6altet2_C(PyObject *o) {
80 return 0;
81 }
83 static struct PyMethodDef __pyx_methods_6altet2_C[] = {
84 {0, 0, 0, 0}
85 };
87 static PyNumberMethods __pyx_tp_as_number_C = {
88 0, /*nb_add*/
89 0, /*nb_subtract*/
90 0, /*nb_multiply*/
91 0, /*nb_divide*/
92 0, /*nb_remainder*/
93 0, /*nb_divmod*/
94 0, /*nb_power*/
95 0, /*nb_negative*/
96 0, /*nb_positive*/
97 0, /*nb_absolute*/
98 0, /*nb_nonzero*/
99 0, /*nb_invert*/
100 0, /*nb_lshift*/
101 0, /*nb_rshift*/
102 0, /*nb_and*/
103 0, /*nb_xor*/
104 0, /*nb_or*/
105 0, /*nb_coerce*/
106 0, /*nb_int*/
107 0, /*nb_long*/
108 0, /*nb_float*/
109 0, /*nb_oct*/
110 0, /*nb_hex*/
111 0, /*nb_inplace_add*/
112 0, /*nb_inplace_subtract*/
113 0, /*nb_inplace_multiply*/
114 0, /*nb_inplace_divide*/
115 0, /*nb_inplace_remainder*/
116 0, /*nb_inplace_power*/
117 0, /*nb_inplace_lshift*/
118 0, /*nb_inplace_rshift*/
119 0, /*nb_inplace_and*/
120 0, /*nb_inplace_xor*/
121 0, /*nb_inplace_or*/
122 0, /*nb_floor_divide*/
123 0, /*nb_true_divide*/
124 0, /*nb_inplace_floor_divide*/
125 0, /*nb_inplace_true_divide*/
126 #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
127 0, /*nb_index*/
128 #endif
129 };
131 static PySequenceMethods __pyx_tp_as_sequence_C = {
132 0, /*sq_length*/
133 0, /*sq_concat*/
134 0, /*sq_repeat*/
135 0, /*sq_item*/
136 0, /*sq_slice*/
137 0, /*sq_ass_item*/
138 0, /*sq_ass_slice*/
139 0, /*sq_contains*/
140 0, /*sq_inplace_concat*/
141 0, /*sq_inplace_repeat*/
142 };
144 static PyMappingMethods __pyx_tp_as_mapping_C = {
145 0, /*mp_length*/
146 0, /*mp_subscript*/
147 0, /*mp_ass_subscript*/
148 };
150 static PyBufferProcs __pyx_tp_as_buffer_C = {
151 0, /*bf_getreadbuffer*/
152 0, /*bf_getwritebuffer*/
153 0, /*bf_getsegcount*/
154 0, /*bf_getcharbuffer*/
155 };
157 PyTypeObject __pyx_type_6altet2_C = {
158 PyObject_HEAD_INIT(0)
159 0, /*ob_size*/
160 "altet2.C", /*tp_name*/
161 sizeof(struct __pyx_obj_6altet2_C), /*tp_basicsize*/
162 0, /*tp_itemsize*/
163 __pyx_tp_dealloc_6altet2_C, /*tp_dealloc*/
164 0, /*tp_print*/
165 0, /*tp_getattr*/
166 0, /*tp_setattr*/
167 0, /*tp_compare*/
168 0, /*tp_repr*/
169 &__pyx_tp_as_number_C, /*tp_as_number*/
170 &__pyx_tp_as_sequence_C, /*tp_as_sequence*/
171 &__pyx_tp_as_mapping_C, /*tp_as_mapping*/
172 0, /*tp_hash*/
173 0, /*tp_call*/
174 0, /*tp_str*/
175 0, /*tp_getattro*/
176 0, /*tp_setattro*/
177 &__pyx_tp_as_buffer_C, /*tp_as_buffer*/
178 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
179 0, /*tp_doc*/
180 __pyx_tp_traverse_6altet2_C, /*tp_traverse*/
181 __pyx_tp_clear_6altet2_C, /*tp_clear*/
182 0, /*tp_richcompare*/
183 0, /*tp_weaklistoffset*/
184 __pyx_f_6altet2_1C___iter__, /*tp_iter*/
185 0, /*tp_iternext*/
186 __pyx_methods_6altet2_C, /*tp_methods*/
187 0, /*tp_members*/
188 0, /*tp_getset*/
189 0, /*tp_base*/
190 0, /*tp_dict*/
191 0, /*tp_descr_get*/
192 0, /*tp_descr_set*/
193 0, /*tp_dictoffset*/
194 0, /*tp_init*/
195 0, /*tp_alloc*/
196 __pyx_tp_new_6altet2_C, /*tp_new*/
197 0, /*tp_free*/
198 0, /*tp_is_gc*/
199 0, /*tp_bases*/
200 0, /*tp_mro*/
201 0, /*tp_cache*/
202 0, /*tp_subclasses*/
203 0, /*tp_weaklist*/
204 };
206 static struct PyMethodDef __pyx_methods[] = {
207 {0, 0, 0, 0}
208 };
210 static void __pyx_init_filenames(void); /*proto*/
212 PyMODINIT_FUNC initaltet2(void); /*proto*/
213 PyMODINIT_FUNC initaltet2(void) {
214 __pyx_init_filenames();
215 __pyx_m = Py_InitModule4("altet2", __pyx_methods, 0, 0, PYTHON_API_VERSION);
216 if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
217 __pyx_b = PyImport_AddModule("__builtin__");
218 if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
219 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
220 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
221 if (PyType_Ready(&__pyx_type_6altet2_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
222 if (PyObject_SetAttrString(__pyx_m, "C", (PyObject *)&__pyx_type_6altet2_C) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
223 __pyx_ptype_6altet2_C = &__pyx_type_6altet2_C;
224 return;
225 __pyx_L1:;
226 __Pyx_AddTraceback("altet2");
227 }
229 static char *__pyx_filenames[] = {
230 "altet2.pyx",
231 };
233 /* Runtime support code */
235 static void __pyx_init_filenames(void) {
236 __pyx_f = __pyx_filenames;
237 }
239 #include "compile.h"
240 #include "frameobject.h"
241 #include "traceback.h"
243 static void __Pyx_AddTraceback(char *funcname) {
244 PyObject *py_srcfile = 0;
245 PyObject *py_funcname = 0;
246 PyObject *py_globals = 0;
247 PyObject *empty_tuple = 0;
248 PyObject *empty_string = 0;
249 PyCodeObject *py_code = 0;
250 PyFrameObject *py_frame = 0;
252 py_srcfile = PyString_FromString(__pyx_filename);
253 if (!py_srcfile) goto bad;
254 py_funcname = PyString_FromString(funcname);
255 if (!py_funcname) goto bad;
256 py_globals = PyModule_GetDict(__pyx_m);
257 if (!py_globals) goto bad;
258 empty_tuple = PyTuple_New(0);
259 if (!empty_tuple) goto bad;
260 empty_string = PyString_FromString("");
261 if (!empty_string) goto bad;
262 py_code = PyCode_New(
263 0, /*int argcount,*/
264 0, /*int nlocals,*/
265 0, /*int stacksize,*/
266 0, /*int flags,*/
267 empty_string, /*PyObject *code,*/
268 empty_tuple, /*PyObject *consts,*/
269 empty_tuple, /*PyObject *names,*/
270 empty_tuple, /*PyObject *varnames,*/
271 empty_tuple, /*PyObject *freevars,*/
272 empty_tuple, /*PyObject *cellvars,*/
273 py_srcfile, /*PyObject *filename,*/
274 py_funcname, /*PyObject *name,*/
275 __pyx_lineno, /*int firstlineno,*/
276 empty_string /*PyObject *lnotab*/
277 );
278 if (!py_code) goto bad;
279 py_frame = PyFrame_New(
280 PyThreadState_Get(), /*PyThreadState *tstate,*/
281 py_code, /*PyCodeObject *code,*/
282 py_globals, /*PyObject *globals,*/
283 0 /*PyObject *locals*/
284 );
285 if (!py_frame) goto bad;
286 py_frame->f_lineno = __pyx_lineno;
287 PyTraceBack_Here(py_frame);
288 bad:
289 Py_XDECREF(py_srcfile);
290 Py_XDECREF(py_funcname);
291 Py_XDECREF(empty_tuple);
292 Py_XDECREF(empty_string);
293 Py_XDECREF(py_code);
294 Py_XDECREF(py_frame);
295 }