Cython has moved to github.

pyrex

view Tests/Bugs/behnel/behnel5/Reference/ia_etree.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 12072e0e4fd5
children 3b20cb4923eb
line source
1 /* Generated by Pyrex */
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 #ifndef __stdcall
18 #define __stdcall
19 #endif
20 #ifndef __cdecl
21 #define __cdecl
22 #endif
23 #endif
24 #ifdef __cplusplus
25 #define __PYX_EXTERN_C extern "C"
26 #else
27 #define __PYX_EXTERN_C extern
28 #endif
29 #include <math.h>
32 typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/
33 typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/
35 static PyObject *__pyx_m;
36 static PyObject *__pyx_b;
37 static int __pyx_lineno;
38 static char *__pyx_filename;
39 static char **__pyx_f;
41 static int __Pyx_ExportFunction(char *n, void *f, char *s); /*proto*/
43 static void __Pyx_AddTraceback(char *funcname); /*proto*/
45 /* Declarations from tree */
48 /* Declarations from ia_etree */
50 struct LxmlDocument {
51 PyObject_HEAD
52 struct __pyx_t_4tree_xmlDoc *_c_doc;
53 struct __pyx_obj_8ia_etree__BaseParser *_parser;
54 };
56 struct LxmlElement {
57 PyObject_HEAD
58 struct LxmlDocument *_doc;
59 struct __pyx_t_4tree_xmlNode *_c_node;
60 };
63 __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlDocumentType;
65 __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementType;
68 static PyTypeObject *__pyx_ptype_8ia_etree__BaseParser = 0;
69 static PyTypeObject *__pyx_ptype_8ia_etree__Document = 0;
70 static PyTypeObject *__pyx_ptype_8ia_etree__Element = 0;
71 static PyObject *__pyx_f_8ia_etree_getAttributeValue(struct LxmlElement *,PyObject *,PyObject *); /*proto*/
73 struct __pyx_t_8ia_etree_Foo {
74 int spam;
75 };
77 struct __pyx_obj_8ia_etree_Vorpal {
78 PyObject_HEAD
79 };
81 struct __pyx_obj_8ia_etree__BaseParser {
82 PyObject_HEAD
83 struct __pyx_t_8ia_etree_Foo *foo;
84 struct __pyx_obj_8ia_etree_Vorpal *bunny;
85 };
88 static PyTypeObject *__pyx_ptype_8ia_etree_Vorpal = 0;
91 static __Pyx_StringTabEntry __pyx_string_tab[] = {
92 {0, 0, 0, 0}
93 };
95 /* Implementation of ia_etree */
97 static PyObject *__pyx_f_8ia_etree_getAttributeValue(struct LxmlElement *__pyx_v_element,PyObject *__pyx_v_key,PyObject *__pyx_v_default) {
98 PyObject *__pyx_r;
99 Py_INCREF(__pyx_v_element);
100 Py_INCREF(__pyx_v_key);
101 Py_INCREF(__pyx_v_default);
103 __pyx_r = Py_None; Py_INCREF(Py_None);
104 Py_DECREF(__pyx_v_element);
105 Py_DECREF(__pyx_v_key);
106 Py_DECREF(__pyx_v_default);
107 return __pyx_r;
108 }
110 static PyObject *__pyx_tp_new_8ia_etree__BaseParser(PyTypeObject *t, PyObject *a, PyObject *k) {
111 struct __pyx_obj_8ia_etree__BaseParser *p;
112 PyObject *o = (*t->tp_alloc)(t, 0);
113 if (!o) return 0;
114 p = ((struct __pyx_obj_8ia_etree__BaseParser *)o);
115 p->bunny = ((struct __pyx_obj_8ia_etree_Vorpal *)Py_None); Py_INCREF(Py_None);
116 return o;
117 }
119 static void __pyx_tp_dealloc_8ia_etree__BaseParser(PyObject *o) {
120 struct __pyx_obj_8ia_etree__BaseParser *p = (struct __pyx_obj_8ia_etree__BaseParser *)o;
121 Py_XDECREF(((PyObject *)p->bunny));
122 (*o->ob_type->tp_free)(o);
123 }
125 static int __pyx_tp_traverse_8ia_etree__BaseParser(PyObject *o, visitproc v, void *a) {
126 int e;
127 struct __pyx_obj_8ia_etree__BaseParser *p = (struct __pyx_obj_8ia_etree__BaseParser *)o;
128 if (p->bunny) {
129 e = (*v)(((PyObject*)p->bunny), a); if (e) return e;
130 }
131 return 0;
132 }
134 static int __pyx_tp_clear_8ia_etree__BaseParser(PyObject *o) {
135 struct __pyx_obj_8ia_etree__BaseParser *p = (struct __pyx_obj_8ia_etree__BaseParser *)o;
136 PyObject *t;
137 t = ((PyObject *)p->bunny);
138 p->bunny = ((struct __pyx_obj_8ia_etree_Vorpal *)Py_None); Py_INCREF(Py_None);
139 Py_XDECREF(t);
140 return 0;
141 }
143 static struct PyMethodDef __pyx_methods_8ia_etree__BaseParser[] = {
144 {0, 0, 0, 0}
145 };
147 static PyNumberMethods __pyx_tp_as_number__BaseParser = {
148 0, /*nb_add*/
149 0, /*nb_subtract*/
150 0, /*nb_multiply*/
151 0, /*nb_divide*/
152 0, /*nb_remainder*/
153 0, /*nb_divmod*/
154 0, /*nb_power*/
155 0, /*nb_negative*/
156 0, /*nb_positive*/
157 0, /*nb_absolute*/
158 0, /*nb_nonzero*/
159 0, /*nb_invert*/
160 0, /*nb_lshift*/
161 0, /*nb_rshift*/
162 0, /*nb_and*/
163 0, /*nb_xor*/
164 0, /*nb_or*/
165 0, /*nb_coerce*/
166 0, /*nb_int*/
167 0, /*nb_long*/
168 0, /*nb_float*/
169 0, /*nb_oct*/
170 0, /*nb_hex*/
171 0, /*nb_inplace_add*/
172 0, /*nb_inplace_subtract*/
173 0, /*nb_inplace_multiply*/
174 0, /*nb_inplace_divide*/
175 0, /*nb_inplace_remainder*/
176 0, /*nb_inplace_power*/
177 0, /*nb_inplace_lshift*/
178 0, /*nb_inplace_rshift*/
179 0, /*nb_inplace_and*/
180 0, /*nb_inplace_xor*/
181 0, /*nb_inplace_or*/
182 0, /*nb_floor_divide*/
183 0, /*nb_true_divide*/
184 0, /*nb_inplace_floor_divide*/
185 0, /*nb_inplace_true_divide*/
186 #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
187 0, /*nb_index*/
188 #endif
189 };
191 static PySequenceMethods __pyx_tp_as_sequence__BaseParser = {
192 0, /*sq_length*/
193 0, /*sq_concat*/
194 0, /*sq_repeat*/
195 0, /*sq_item*/
196 0, /*sq_slice*/
197 0, /*sq_ass_item*/
198 0, /*sq_ass_slice*/
199 0, /*sq_contains*/
200 0, /*sq_inplace_concat*/
201 0, /*sq_inplace_repeat*/
202 };
204 static PyMappingMethods __pyx_tp_as_mapping__BaseParser = {
205 0, /*mp_length*/
206 0, /*mp_subscript*/
207 0, /*mp_ass_subscript*/
208 };
210 static PyBufferProcs __pyx_tp_as_buffer__BaseParser = {
211 0, /*bf_getreadbuffer*/
212 0, /*bf_getwritebuffer*/
213 0, /*bf_getsegcount*/
214 0, /*bf_getcharbuffer*/
215 };
217 PyTypeObject __pyx_type_8ia_etree__BaseParser = {
218 PyObject_HEAD_INIT(0)
219 0, /*ob_size*/
220 "ia_etree._BaseParser", /*tp_name*/
221 sizeof(struct __pyx_obj_8ia_etree__BaseParser), /*tp_basicsize*/
222 0, /*tp_itemsize*/
223 __pyx_tp_dealloc_8ia_etree__BaseParser, /*tp_dealloc*/
224 0, /*tp_print*/
225 0, /*tp_getattr*/
226 0, /*tp_setattr*/
227 0, /*tp_compare*/
228 0, /*tp_repr*/
229 &__pyx_tp_as_number__BaseParser, /*tp_as_number*/
230 &__pyx_tp_as_sequence__BaseParser, /*tp_as_sequence*/
231 &__pyx_tp_as_mapping__BaseParser, /*tp_as_mapping*/
232 0, /*tp_hash*/
233 0, /*tp_call*/
234 0, /*tp_str*/
235 0, /*tp_getattro*/
236 0, /*tp_setattro*/
237 &__pyx_tp_as_buffer__BaseParser, /*tp_as_buffer*/
238 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
239 0, /*tp_doc*/
240 __pyx_tp_traverse_8ia_etree__BaseParser, /*tp_traverse*/
241 __pyx_tp_clear_8ia_etree__BaseParser, /*tp_clear*/
242 0, /*tp_richcompare*/
243 0, /*tp_weaklistoffset*/
244 0, /*tp_iter*/
245 0, /*tp_iternext*/
246 __pyx_methods_8ia_etree__BaseParser, /*tp_methods*/
247 0, /*tp_members*/
248 0, /*tp_getset*/
249 0, /*tp_base*/
250 0, /*tp_dict*/
251 0, /*tp_descr_get*/
252 0, /*tp_descr_set*/
253 0, /*tp_dictoffset*/
254 0, /*tp_init*/
255 0, /*tp_alloc*/
256 __pyx_tp_new_8ia_etree__BaseParser, /*tp_new*/
257 0, /*tp_free*/
258 0, /*tp_is_gc*/
259 0, /*tp_bases*/
260 0, /*tp_mro*/
261 0, /*tp_cache*/
262 0, /*tp_subclasses*/
263 0, /*tp_weaklist*/
264 };
266 static PyObject *__pyx_tp_new_8ia_etree__Document(PyTypeObject *t, PyObject *a, PyObject *k) {
267 struct LxmlDocument *p;
268 PyObject *o = (*t->tp_alloc)(t, 0);
269 if (!o) return 0;
270 p = ((struct LxmlDocument *)o);
271 p->_parser = ((struct __pyx_obj_8ia_etree__BaseParser *)Py_None); Py_INCREF(Py_None);
272 return o;
273 }
275 static void __pyx_tp_dealloc_8ia_etree__Document(PyObject *o) {
276 struct LxmlDocument *p = (struct LxmlDocument *)o;
277 Py_XDECREF(((PyObject *)p->_parser));
278 (*o->ob_type->tp_free)(o);
279 }
281 static int __pyx_tp_traverse_8ia_etree__Document(PyObject *o, visitproc v, void *a) {
282 int e;
283 struct LxmlDocument *p = (struct LxmlDocument *)o;
284 if (p->_parser) {
285 e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
286 }
287 return 0;
288 }
290 static int __pyx_tp_clear_8ia_etree__Document(PyObject *o) {
291 struct LxmlDocument *p = (struct LxmlDocument *)o;
292 PyObject *t;
293 t = ((PyObject *)p->_parser);
294 p->_parser = ((struct __pyx_obj_8ia_etree__BaseParser *)Py_None); Py_INCREF(Py_None);
295 Py_XDECREF(t);
296 return 0;
297 }
299 static struct PyMethodDef __pyx_methods_8ia_etree__Document[] = {
300 {0, 0, 0, 0}
301 };
303 static PyNumberMethods __pyx_tp_as_number__Document = {
304 0, /*nb_add*/
305 0, /*nb_subtract*/
306 0, /*nb_multiply*/
307 0, /*nb_divide*/
308 0, /*nb_remainder*/
309 0, /*nb_divmod*/
310 0, /*nb_power*/
311 0, /*nb_negative*/
312 0, /*nb_positive*/
313 0, /*nb_absolute*/
314 0, /*nb_nonzero*/
315 0, /*nb_invert*/
316 0, /*nb_lshift*/
317 0, /*nb_rshift*/
318 0, /*nb_and*/
319 0, /*nb_xor*/
320 0, /*nb_or*/
321 0, /*nb_coerce*/
322 0, /*nb_int*/
323 0, /*nb_long*/
324 0, /*nb_float*/
325 0, /*nb_oct*/
326 0, /*nb_hex*/
327 0, /*nb_inplace_add*/
328 0, /*nb_inplace_subtract*/
329 0, /*nb_inplace_multiply*/
330 0, /*nb_inplace_divide*/
331 0, /*nb_inplace_remainder*/
332 0, /*nb_inplace_power*/
333 0, /*nb_inplace_lshift*/
334 0, /*nb_inplace_rshift*/
335 0, /*nb_inplace_and*/
336 0, /*nb_inplace_xor*/
337 0, /*nb_inplace_or*/
338 0, /*nb_floor_divide*/
339 0, /*nb_true_divide*/
340 0, /*nb_inplace_floor_divide*/
341 0, /*nb_inplace_true_divide*/
342 #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
343 0, /*nb_index*/
344 #endif
345 };
347 static PySequenceMethods __pyx_tp_as_sequence__Document = {
348 0, /*sq_length*/
349 0, /*sq_concat*/
350 0, /*sq_repeat*/
351 0, /*sq_item*/
352 0, /*sq_slice*/
353 0, /*sq_ass_item*/
354 0, /*sq_ass_slice*/
355 0, /*sq_contains*/
356 0, /*sq_inplace_concat*/
357 0, /*sq_inplace_repeat*/
358 };
360 static PyMappingMethods __pyx_tp_as_mapping__Document = {
361 0, /*mp_length*/
362 0, /*mp_subscript*/
363 0, /*mp_ass_subscript*/
364 };
366 static PyBufferProcs __pyx_tp_as_buffer__Document = {
367 0, /*bf_getreadbuffer*/
368 0, /*bf_getwritebuffer*/
369 0, /*bf_getsegcount*/
370 0, /*bf_getcharbuffer*/
371 };
373 DL_EXPORT(PyTypeObject) LxmlDocumentType = {
374 PyObject_HEAD_INIT(0)
375 0, /*ob_size*/
376 "ia_etree._Document", /*tp_name*/
377 sizeof(struct LxmlDocument), /*tp_basicsize*/
378 0, /*tp_itemsize*/
379 __pyx_tp_dealloc_8ia_etree__Document, /*tp_dealloc*/
380 0, /*tp_print*/
381 0, /*tp_getattr*/
382 0, /*tp_setattr*/
383 0, /*tp_compare*/
384 0, /*tp_repr*/
385 &__pyx_tp_as_number__Document, /*tp_as_number*/
386 &__pyx_tp_as_sequence__Document, /*tp_as_sequence*/
387 &__pyx_tp_as_mapping__Document, /*tp_as_mapping*/
388 0, /*tp_hash*/
389 0, /*tp_call*/
390 0, /*tp_str*/
391 0, /*tp_getattro*/
392 0, /*tp_setattro*/
393 &__pyx_tp_as_buffer__Document, /*tp_as_buffer*/
394 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
395 0, /*tp_doc*/
396 __pyx_tp_traverse_8ia_etree__Document, /*tp_traverse*/
397 __pyx_tp_clear_8ia_etree__Document, /*tp_clear*/
398 0, /*tp_richcompare*/
399 0, /*tp_weaklistoffset*/
400 0, /*tp_iter*/
401 0, /*tp_iternext*/
402 __pyx_methods_8ia_etree__Document, /*tp_methods*/
403 0, /*tp_members*/
404 0, /*tp_getset*/
405 0, /*tp_base*/
406 0, /*tp_dict*/
407 0, /*tp_descr_get*/
408 0, /*tp_descr_set*/
409 0, /*tp_dictoffset*/
410 0, /*tp_init*/
411 0, /*tp_alloc*/
412 __pyx_tp_new_8ia_etree__Document, /*tp_new*/
413 0, /*tp_free*/
414 0, /*tp_is_gc*/
415 0, /*tp_bases*/
416 0, /*tp_mro*/
417 0, /*tp_cache*/
418 0, /*tp_subclasses*/
419 0, /*tp_weaklist*/
420 };
422 static PyObject *__pyx_tp_new_8ia_etree__Element(PyTypeObject *t, PyObject *a, PyObject *k) {
423 struct LxmlElement *p;
424 PyObject *o = (*t->tp_alloc)(t, 0);
425 if (!o) return 0;
426 p = ((struct LxmlElement *)o);
427 p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
428 return o;
429 }
431 static void __pyx_tp_dealloc_8ia_etree__Element(PyObject *o) {
432 struct LxmlElement *p = (struct LxmlElement *)o;
433 Py_XDECREF(((PyObject *)p->_doc));
434 (*o->ob_type->tp_free)(o);
435 }
437 static int __pyx_tp_traverse_8ia_etree__Element(PyObject *o, visitproc v, void *a) {
438 int e;
439 struct LxmlElement *p = (struct LxmlElement *)o;
440 if (p->_doc) {
441 e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
442 }
443 return 0;
444 }
446 static int __pyx_tp_clear_8ia_etree__Element(PyObject *o) {
447 struct LxmlElement *p = (struct LxmlElement *)o;
448 PyObject *t;
449 t = ((PyObject *)p->_doc);
450 p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
451 Py_XDECREF(t);
452 return 0;
453 }
455 static struct PyMethodDef __pyx_methods_8ia_etree__Element[] = {
456 {0, 0, 0, 0}
457 };
459 static PyNumberMethods __pyx_tp_as_number__Element = {
460 0, /*nb_add*/
461 0, /*nb_subtract*/
462 0, /*nb_multiply*/
463 0, /*nb_divide*/
464 0, /*nb_remainder*/
465 0, /*nb_divmod*/
466 0, /*nb_power*/
467 0, /*nb_negative*/
468 0, /*nb_positive*/
469 0, /*nb_absolute*/
470 0, /*nb_nonzero*/
471 0, /*nb_invert*/
472 0, /*nb_lshift*/
473 0, /*nb_rshift*/
474 0, /*nb_and*/
475 0, /*nb_xor*/
476 0, /*nb_or*/
477 0, /*nb_coerce*/
478 0, /*nb_int*/
479 0, /*nb_long*/
480 0, /*nb_float*/
481 0, /*nb_oct*/
482 0, /*nb_hex*/
483 0, /*nb_inplace_add*/
484 0, /*nb_inplace_subtract*/
485 0, /*nb_inplace_multiply*/
486 0, /*nb_inplace_divide*/
487 0, /*nb_inplace_remainder*/
488 0, /*nb_inplace_power*/
489 0, /*nb_inplace_lshift*/
490 0, /*nb_inplace_rshift*/
491 0, /*nb_inplace_and*/
492 0, /*nb_inplace_xor*/
493 0, /*nb_inplace_or*/
494 0, /*nb_floor_divide*/
495 0, /*nb_true_divide*/
496 0, /*nb_inplace_floor_divide*/
497 0, /*nb_inplace_true_divide*/
498 #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
499 0, /*nb_index*/
500 #endif
501 };
503 static PySequenceMethods __pyx_tp_as_sequence__Element = {
504 0, /*sq_length*/
505 0, /*sq_concat*/
506 0, /*sq_repeat*/
507 0, /*sq_item*/
508 0, /*sq_slice*/
509 0, /*sq_ass_item*/
510 0, /*sq_ass_slice*/
511 0, /*sq_contains*/
512 0, /*sq_inplace_concat*/
513 0, /*sq_inplace_repeat*/
514 };
516 static PyMappingMethods __pyx_tp_as_mapping__Element = {
517 0, /*mp_length*/
518 0, /*mp_subscript*/
519 0, /*mp_ass_subscript*/
520 };
522 static PyBufferProcs __pyx_tp_as_buffer__Element = {
523 0, /*bf_getreadbuffer*/
524 0, /*bf_getwritebuffer*/
525 0, /*bf_getsegcount*/
526 0, /*bf_getcharbuffer*/
527 };
529 DL_EXPORT(PyTypeObject) LxmlElementType = {
530 PyObject_HEAD_INIT(0)
531 0, /*ob_size*/
532 "ia_etree._Element", /*tp_name*/
533 sizeof(struct LxmlElement), /*tp_basicsize*/
534 0, /*tp_itemsize*/
535 __pyx_tp_dealloc_8ia_etree__Element, /*tp_dealloc*/
536 0, /*tp_print*/
537 0, /*tp_getattr*/
538 0, /*tp_setattr*/
539 0, /*tp_compare*/
540 0, /*tp_repr*/
541 &__pyx_tp_as_number__Element, /*tp_as_number*/
542 &__pyx_tp_as_sequence__Element, /*tp_as_sequence*/
543 &__pyx_tp_as_mapping__Element, /*tp_as_mapping*/
544 0, /*tp_hash*/
545 0, /*tp_call*/
546 0, /*tp_str*/
547 0, /*tp_getattro*/
548 0, /*tp_setattro*/
549 &__pyx_tp_as_buffer__Element, /*tp_as_buffer*/
550 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
551 0, /*tp_doc*/
552 __pyx_tp_traverse_8ia_etree__Element, /*tp_traverse*/
553 __pyx_tp_clear_8ia_etree__Element, /*tp_clear*/
554 0, /*tp_richcompare*/
555 0, /*tp_weaklistoffset*/
556 0, /*tp_iter*/
557 0, /*tp_iternext*/
558 __pyx_methods_8ia_etree__Element, /*tp_methods*/
559 0, /*tp_members*/
560 0, /*tp_getset*/
561 0, /*tp_base*/
562 0, /*tp_dict*/
563 0, /*tp_descr_get*/
564 0, /*tp_descr_set*/
565 0, /*tp_dictoffset*/
566 0, /*tp_init*/
567 0, /*tp_alloc*/
568 __pyx_tp_new_8ia_etree__Element, /*tp_new*/
569 0, /*tp_free*/
570 0, /*tp_is_gc*/
571 0, /*tp_bases*/
572 0, /*tp_mro*/
573 0, /*tp_cache*/
574 0, /*tp_subclasses*/
575 0, /*tp_weaklist*/
576 };
578 static PyObject *__pyx_tp_new_8ia_etree_Vorpal(PyTypeObject *t, PyObject *a, PyObject *k) {
579 PyObject *o = (*t->tp_alloc)(t, 0);
580 if (!o) return 0;
581 return o;
582 }
584 static void __pyx_tp_dealloc_8ia_etree_Vorpal(PyObject *o) {
585 (*o->ob_type->tp_free)(o);
586 }
588 static struct PyMethodDef __pyx_methods_8ia_etree_Vorpal[] = {
589 {0, 0, 0, 0}
590 };
592 static PyNumberMethods __pyx_tp_as_number_Vorpal = {
593 0, /*nb_add*/
594 0, /*nb_subtract*/
595 0, /*nb_multiply*/
596 0, /*nb_divide*/
597 0, /*nb_remainder*/
598 0, /*nb_divmod*/
599 0, /*nb_power*/
600 0, /*nb_negative*/
601 0, /*nb_positive*/
602 0, /*nb_absolute*/
603 0, /*nb_nonzero*/
604 0, /*nb_invert*/
605 0, /*nb_lshift*/
606 0, /*nb_rshift*/
607 0, /*nb_and*/
608 0, /*nb_xor*/
609 0, /*nb_or*/
610 0, /*nb_coerce*/
611 0, /*nb_int*/
612 0, /*nb_long*/
613 0, /*nb_float*/
614 0, /*nb_oct*/
615 0, /*nb_hex*/
616 0, /*nb_inplace_add*/
617 0, /*nb_inplace_subtract*/
618 0, /*nb_inplace_multiply*/
619 0, /*nb_inplace_divide*/
620 0, /*nb_inplace_remainder*/
621 0, /*nb_inplace_power*/
622 0, /*nb_inplace_lshift*/
623 0, /*nb_inplace_rshift*/
624 0, /*nb_inplace_and*/
625 0, /*nb_inplace_xor*/
626 0, /*nb_inplace_or*/
627 0, /*nb_floor_divide*/
628 0, /*nb_true_divide*/
629 0, /*nb_inplace_floor_divide*/
630 0, /*nb_inplace_true_divide*/
631 #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
632 0, /*nb_index*/
633 #endif
634 };
636 static PySequenceMethods __pyx_tp_as_sequence_Vorpal = {
637 0, /*sq_length*/
638 0, /*sq_concat*/
639 0, /*sq_repeat*/
640 0, /*sq_item*/
641 0, /*sq_slice*/
642 0, /*sq_ass_item*/
643 0, /*sq_ass_slice*/
644 0, /*sq_contains*/
645 0, /*sq_inplace_concat*/
646 0, /*sq_inplace_repeat*/
647 };
649 static PyMappingMethods __pyx_tp_as_mapping_Vorpal = {
650 0, /*mp_length*/
651 0, /*mp_subscript*/
652 0, /*mp_ass_subscript*/
653 };
655 static PyBufferProcs __pyx_tp_as_buffer_Vorpal = {
656 0, /*bf_getreadbuffer*/
657 0, /*bf_getwritebuffer*/
658 0, /*bf_getsegcount*/
659 0, /*bf_getcharbuffer*/
660 };
662 PyTypeObject __pyx_type_8ia_etree_Vorpal = {
663 PyObject_HEAD_INIT(0)
664 0, /*ob_size*/
665 "ia_etree.Vorpal", /*tp_name*/
666 sizeof(struct __pyx_obj_8ia_etree_Vorpal), /*tp_basicsize*/
667 0, /*tp_itemsize*/
668 __pyx_tp_dealloc_8ia_etree_Vorpal, /*tp_dealloc*/
669 0, /*tp_print*/
670 0, /*tp_getattr*/
671 0, /*tp_setattr*/
672 0, /*tp_compare*/
673 0, /*tp_repr*/
674 &__pyx_tp_as_number_Vorpal, /*tp_as_number*/
675 &__pyx_tp_as_sequence_Vorpal, /*tp_as_sequence*/
676 &__pyx_tp_as_mapping_Vorpal, /*tp_as_mapping*/
677 0, /*tp_hash*/
678 0, /*tp_call*/
679 0, /*tp_str*/
680 0, /*tp_getattro*/
681 0, /*tp_setattro*/
682 &__pyx_tp_as_buffer_Vorpal, /*tp_as_buffer*/
683 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
684 0, /*tp_doc*/
685 0, /*tp_traverse*/
686 0, /*tp_clear*/
687 0, /*tp_richcompare*/
688 0, /*tp_weaklistoffset*/
689 0, /*tp_iter*/
690 0, /*tp_iternext*/
691 __pyx_methods_8ia_etree_Vorpal, /*tp_methods*/
692 0, /*tp_members*/
693 0, /*tp_getset*/
694 0, /*tp_base*/
695 0, /*tp_dict*/
696 0, /*tp_descr_get*/
697 0, /*tp_descr_set*/
698 0, /*tp_dictoffset*/
699 0, /*tp_init*/
700 0, /*tp_alloc*/
701 __pyx_tp_new_8ia_etree_Vorpal, /*tp_new*/
702 0, /*tp_free*/
703 0, /*tp_is_gc*/
704 0, /*tp_bases*/
705 0, /*tp_mro*/
706 0, /*tp_cache*/
707 0, /*tp_subclasses*/
708 0, /*tp_weaklist*/
709 };
711 static struct PyMethodDef __pyx_methods[] = {
712 {0, 0, 0, 0}
713 };
715 static void __pyx_init_filenames(void); /*proto*/
717 PyMODINIT_FUNC initia_etree(void); /*proto*/
718 PyMODINIT_FUNC initia_etree(void) {
719 PyObject *__pyx_1 = 0;
720 __pyx_init_filenames();
721 __pyx_m = Py_InitModule4("ia_etree", __pyx_methods, 0, 0, PYTHON_API_VERSION);
722 if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
723 Py_INCREF(__pyx_m);
724 __pyx_b = PyImport_AddModule("__builtin__");
725 if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
726 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
727 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
728 if (__Pyx_ExportFunction("getAttributeValue", (void*)__pyx_f_8ia_etree_getAttributeValue, "PyObject *(struct LxmlElement *,PyObject *,PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
729 __pyx_type_8ia_etree__BaseParser.tp_free = _PyObject_GC_Del;
730 if (PyType_Ready(&__pyx_type_8ia_etree__BaseParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
731 if (PyObject_SetAttrString(__pyx_m, "_BaseParser", (PyObject *)&__pyx_type_8ia_etree__BaseParser) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
732 __pyx_ptype_8ia_etree__BaseParser = &__pyx_type_8ia_etree__BaseParser;
733 LxmlDocumentType.tp_free = _PyObject_GC_Del;
734 if (PyType_Ready(&LxmlDocumentType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; goto __pyx_L1;}
735 if (PyObject_SetAttrString(__pyx_m, "_Document", (PyObject *)&LxmlDocumentType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; goto __pyx_L1;}
736 __pyx_ptype_8ia_etree__Document = &LxmlDocumentType;
737 LxmlElementType.tp_free = _PyObject_GC_Del;
738 if (PyType_Ready(&LxmlElementType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
739 if (PyObject_SetAttrString(__pyx_m, "_Element", (PyObject *)&LxmlElementType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
740 __pyx_ptype_8ia_etree__Element = &LxmlElementType;
741 if (PyType_Ready(&__pyx_type_8ia_etree_Vorpal) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
742 if (PyObject_SetAttrString(__pyx_m, "Vorpal", (PyObject *)&__pyx_type_8ia_etree_Vorpal) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; goto __pyx_L1;}
743 __pyx_ptype_8ia_etree_Vorpal = &__pyx_type_8ia_etree_Vorpal;
745 /* "/Local/Projects/D/Pyrex/Source/Tests/Bugs/behnel/behnel5/ia_etree.pyx":17 */
746 return;
747 __pyx_L1:;
748 Py_XDECREF(__pyx_1);
749 __Pyx_AddTraceback("ia_etree");
750 }
752 static char *__pyx_filenames[] = {
753 "ia_etree.pyx",
754 };
756 /* Runtime support code */
758 static void __pyx_init_filenames(void) {
759 __pyx_f = __pyx_filenames;
760 }
762 static int __Pyx_ExportFunction(char *n, void *f, char *s) {
763 PyObject *d = 0;
764 PyObject *p = 0;
765 d = PyObject_GetAttrString(__pyx_m, "__pyx_capi__");
766 if (!d) {
767 PyErr_Clear();
768 d = PyDict_New();
769 if (!d)
770 goto bad;
771 Py_INCREF(d);
772 if (PyModule_AddObject(__pyx_m, "__pyx_capi__", d) < 0)
773 goto bad;
774 }
775 p = PyCObject_FromVoidPtrAndDesc(f, s, 0);
776 if (!p)
777 goto bad;
778 if (PyDict_SetItemString(d, n, p) < 0)
779 goto bad;
780 Py_DECREF(d);
781 return 0;
782 bad:
783 Py_XDECREF(p);
784 Py_XDECREF(d);
785 return -1;
786 }
788 #include "compile.h"
789 #include "frameobject.h"
790 #include "traceback.h"
792 static void __Pyx_AddTraceback(char *funcname) {
793 PyObject *py_srcfile = 0;
794 PyObject *py_funcname = 0;
795 PyObject *py_globals = 0;
796 PyObject *empty_tuple = 0;
797 PyObject *empty_string = 0;
798 PyCodeObject *py_code = 0;
799 PyFrameObject *py_frame = 0;
801 py_srcfile = PyString_FromString(__pyx_filename);
802 if (!py_srcfile) goto bad;
803 py_funcname = PyString_FromString(funcname);
804 if (!py_funcname) goto bad;
805 py_globals = PyModule_GetDict(__pyx_m);
806 if (!py_globals) goto bad;
807 empty_tuple = PyTuple_New(0);
808 if (!empty_tuple) goto bad;
809 empty_string = PyString_FromString("");
810 if (!empty_string) goto bad;
811 py_code = PyCode_New(
812 0, /*int argcount,*/
813 0, /*int nlocals,*/
814 0, /*int stacksize,*/
815 0, /*int flags,*/
816 empty_string, /*PyObject *code,*/
817 empty_tuple, /*PyObject *consts,*/
818 empty_tuple, /*PyObject *names,*/
819 empty_tuple, /*PyObject *varnames,*/
820 empty_tuple, /*PyObject *freevars,*/
821 empty_tuple, /*PyObject *cellvars,*/
822 py_srcfile, /*PyObject *filename,*/
823 py_funcname, /*PyObject *name,*/
824 __pyx_lineno, /*int firstlineno,*/
825 empty_string /*PyObject *lnotab*/
826 );
827 if (!py_code) goto bad;
828 py_frame = PyFrame_New(
829 PyThreadState_Get(), /*PyThreadState *tstate,*/
830 py_code, /*PyCodeObject *code,*/
831 py_globals, /*PyObject *globals,*/
832 0 /*PyObject *locals*/
833 );
834 if (!py_frame) goto bad;
835 py_frame->f_lineno = __pyx_lineno;
836 PyTraceBack_Here(py_frame);
837 bad:
838 Py_XDECREF(py_srcfile);
839 Py_XDECREF(py_funcname);
840 Py_XDECREF(empty_tuple);
841 Py_XDECREF(empty_string);
842 Py_XDECREF(py_code);
843 Py_XDECREF(py_frame);
844 }