1 /* Generated by Cython 0.11.3 on Tue Sep 29 22:46:05 2009 */
3 #define PY_SSIZE_T_CLEAN
5 #include "structmember.h"
7 #error Python headers needed to compile C extensions, please install development version of Python.
10 #define PY_LONG_LONG LONG_LONG
13 #define DL_EXPORT(t) t
15 #if PY_VERSION_HEX < 0x02040000
16 #define METH_COEXIST 0
17 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
19 #if PY_VERSION_HEX < 0x02050000
20 typedef int Py_ssize_t;
21 #define PY_SSIZE_T_MAX INT_MAX
22 #define PY_SSIZE_T_MIN INT_MIN
23 #define PY_FORMAT_SIZE_T ""
24 #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
25 #define PyInt_AsSsize_t(o) PyInt_AsLong(o)
26 #define PyNumber_Index(o) PyNumber_Int(o)
27 #define PyIndex_Check(o) PyNumber_Check(o)
29 #if PY_VERSION_HEX < 0x02060000
30 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
31 #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
32 #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
33 #define PyVarObject_HEAD_INIT(type, size) \
34 PyObject_HEAD_INIT(type) size,
35 #define PyType_Modified(t)
47 Py_ssize_t *suboffsets;
51 #define PyBUF_SIMPLE 0
52 #define PyBUF_WRITABLE 0x0001
53 #define PyBUF_FORMAT 0x0004
54 #define PyBUF_ND 0x0008
55 #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
56 #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
57 #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
58 #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
59 #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
62 #if PY_MAJOR_VERSION < 3
63 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
65 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
67 #if PY_MAJOR_VERSION >= 3
68 #define Py_TPFLAGS_CHECKTYPES 0
69 #define Py_TPFLAGS_HAVE_INDEX 0
71 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
72 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
74 #if PY_MAJOR_VERSION >= 3
75 #define PyBaseString_Type PyUnicode_Type
76 #define PyString_Type PyBytes_Type
77 #define PyString_CheckExact PyBytes_CheckExact
78 #define PyInt_Type PyLong_Type
79 #define PyInt_Check(op) PyLong_Check(op)
80 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
81 #define PyInt_FromString PyLong_FromString
82 #define PyInt_FromUnicode PyLong_FromUnicode
83 #define PyInt_FromLong PyLong_FromLong
84 #define PyInt_FromSize_t PyLong_FromSize_t
85 #define PyInt_FromSsize_t PyLong_FromSsize_t
86 #define PyInt_AsLong PyLong_AsLong
87 #define PyInt_AS_LONG PyLong_AS_LONG
88 #define PyInt_AsSsize_t PyLong_AsSsize_t
89 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
90 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
91 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
93 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
94 #define PyBytes_Type PyString_Type
96 #if PY_MAJOR_VERSION >= 3
97 #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
99 #if !defined(WIN32) && !defined(MS_WINDOWS)
110 #define _USE_MATH_DEFINES
112 #if PY_VERSION_HEX < 0x02050000
113 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
114 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
115 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
117 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
118 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
119 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
121 #if PY_VERSION_HEX < 0x02050000
122 #define __Pyx_NAMESTR(n) ((char *)(n))
123 #define __Pyx_DOCSTR(n) ((char *)(n))
125 #define __Pyx_NAMESTR(n) (n)
126 #define __Pyx_DOCSTR(n) (n)
129 #define __PYX_EXTERN_C extern "C"
131 #define __PYX_EXTERN_C extern
134 #define __PYX_HAVE_API__lxml__objectify
139 #include "etree_defs.h"
140 #include "lxml-version.h"
141 #include "libxml/xmlversion.h"
142 #include "libxml/encoding.h"
143 #include "libxml/chvalid.h"
144 #include "libxml/hash.h"
145 #include "libxml/tree.h"
146 #include "libxml/uri.h"
147 #include "libxml/HTMLtree.h"
148 #include "libxml/valid.h"
149 #include "libxml/xmlIO.h"
150 #include "libxml/xmlsave.h"
151 #include "libxml/globals.h"
152 #include "libxml/xmlstring.h"
153 #include "libxml/xmlmemory.h"
154 #include "pythread.h"
155 #include "lxml.etree_api.h"
156 #define __PYX_USE_C99_COMPLEX defined(_Complex_I)
160 #define INLINE __inline__
162 #define INLINE __inline
167 typedef struct {PyObject **p; char *s; long n; char is_unicode; char intern; char is_identifier;} __Pyx_StringTabEntry; /*proto*/
171 static int __pyx_skip_dispatch = 0;
174 /* Type Conversion Predeclarations */
176 #if PY_MAJOR_VERSION < 3
177 #define __Pyx_PyBytes_FromString PyString_FromString
178 #define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
179 #define __Pyx_PyBytes_AsString PyString_AsString
181 #define __Pyx_PyBytes_FromString PyBytes_FromString
182 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
183 #define __Pyx_PyBytes_AsString PyBytes_AsString
186 #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)
187 #define __Pyx_PyBytes_AsUString(s) ((unsigned char*) __Pyx_PyBytes_AsString(s))
189 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
190 static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
191 static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
193 #if !defined(T_PYSSIZET)
194 #if PY_VERSION_HEX < 0x02050000
195 #define T_PYSSIZET T_INT
196 #elif !defined(T_LONGLONG)
198 ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
199 ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
202 ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
203 ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
204 ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
209 #if !defined(T_ULONGLONG)
210 #define __Pyx_T_UNSIGNED_INT(x) \
211 ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
212 ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
213 ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
214 ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : -1))))
216 #define __Pyx_T_UNSIGNED_INT(x) \
217 ((sizeof(x) == sizeof(unsigned char)) ? T_UBYTE : \
218 ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
219 ((sizeof(x) == sizeof(unsigned int)) ? T_UINT : \
220 ((sizeof(x) == sizeof(unsigned long)) ? T_ULONG : \
221 ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
223 #if !defined(T_LONGLONG)
224 #define __Pyx_T_SIGNED_INT(x) \
225 ((sizeof(x) == sizeof(char)) ? T_BYTE : \
226 ((sizeof(x) == sizeof(short)) ? T_SHORT : \
227 ((sizeof(x) == sizeof(int)) ? T_INT : \
228 ((sizeof(x) == sizeof(long)) ? T_LONG : -1))))
230 #define __Pyx_T_SIGNED_INT(x) \
231 ((sizeof(x) == sizeof(char)) ? T_BYTE : \
232 ((sizeof(x) == sizeof(short)) ? T_SHORT : \
233 ((sizeof(x) == sizeof(int)) ? T_INT : \
234 ((sizeof(x) == sizeof(long)) ? T_LONG : \
235 ((sizeof(x) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))))
238 #define __Pyx_T_FLOATING(x) \
239 ((sizeof(x) == sizeof(float)) ? T_FLOAT : \
240 ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
242 #if !defined(T_SIZET)
243 #if !defined(T_ULONGLONG)
245 ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
246 ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
249 ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
250 ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
251 ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
255 static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
256 static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
257 static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
259 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
263 /* Test for GCC > 2.95 */
264 #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
265 #define likely(x) __builtin_expect(!!(x), 1)
266 #define unlikely(x) __builtin_expect(!!(x), 0)
267 #else /* __GNUC__ > 2 ... */
268 #define likely(x) (x)
269 #define unlikely(x) (x)
270 #endif /* __GNUC__ > 2 ... */
272 #define likely(x) (x)
273 #define unlikely(x) (x)
274 #endif /* __GNUC__ */
276 static PyObject *__pyx_m;
277 static PyObject *__pyx_b;
278 static PyObject *__pyx_empty_tuple;
279 static PyObject *__pyx_empty_bytes;
280 static int __pyx_lineno;
281 static int __pyx_clineno = 0;
282 static const char * __pyx_cfilenm= __FILE__;
283 static const char *__pyx_filename;
284 static const char **__pyx_f;
287 #ifdef CYTHON_REFNANNY
289 void (*INCREF)(void*, PyObject*, int);
290 void (*DECREF)(void*, PyObject*, int);
291 void (*GOTREF)(void*, PyObject*, int);
292 void (*GIVEREF)(void*, PyObject*, int);
293 void* (*NewContext)(const char*, int, const char*);
294 void (*FinishContext)(void**);
295 } __Pyx_RefnannyAPIStruct;
296 static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
297 #define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
298 #define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
299 #define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
300 #define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
301 #define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
302 #define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
303 #define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
304 #define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk)
306 #define __Pyx_INCREF(r) Py_INCREF(r)
307 #define __Pyx_DECREF(r) Py_DECREF(r)
308 #define __Pyx_GOTREF(r)
309 #define __Pyx_GIVEREF(r)
310 #define __Pyx_XDECREF(r) Py_XDECREF(r)
311 #define __Pyx_SetupRefcountContext(name)
312 #define __Pyx_FinishRefcountContext()
313 #endif /* CYTHON_REFNANNY */
314 #define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
315 #define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
317 static void __Pyx_RaiseDoubleKeywordsError(
318 const char* func_name, PyObject* kw_name); /*proto*/
320 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
321 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
323 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
325 static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
327 static INLINE void __Pyx_RaiseTooManyValuesError(void);
329 static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
330 static int __Pyx_EndUnpack(PyObject *); /*proto*/
332 static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/
335 static INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
338 r = PyObject_GetItem(o, j);
344 #define __Pyx_GetItemInt_List(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
345 __Pyx_GetItemInt_List_Fast(o, i, size <= sizeof(long)) : \
346 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
348 static INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
349 if (likely(o != Py_None)) {
350 if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
351 PyObject *r = PyList_GET_ITEM(o, i);
355 else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
356 PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
361 return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
364 #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
365 __Pyx_GetItemInt_Tuple_Fast(o, i, size <= sizeof(long)) : \
366 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
368 static INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
369 if (likely(o != Py_None)) {
370 if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
371 PyObject *r = PyTuple_GET_ITEM(o, i);
375 else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
376 PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
381 return __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
385 #define __Pyx_GetItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
386 __Pyx_GetItemInt_Fast(o, i, size <= sizeof(long)) : \
387 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
389 static INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
391 if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
392 r = PyList_GET_ITEM(o, i);
395 else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
396 r = PyTuple_GET_ITEM(o, i);
399 else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
400 r = PySequence_GetItem(o, i);
403 r = __Pyx_GetItemInt_Generic(o, fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i));
408 #if PY_VERSION_HEX < 0x02050000
409 #ifndef PyAnySet_CheckExact
411 #define PyAnySet_CheckExact(ob) \
412 ((ob)->ob_type == &PySet_Type || \
413 (ob)->ob_type == &PyFrozenSet_Type)
415 #define PySet_New(iterable) \
416 PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
418 #define Pyx_PyFrozenSet_New(iterable) \
419 PyObject_CallFunctionObjArgs((PyObject *)&PyFrozenSet_Type, (iterable), NULL)
421 #define PySet_Size(anyset) \
422 PyObject_Size((anyset))
424 #define PySet_Contains(anyset, key) \
425 PySequence_Contains((anyset), (key))
427 #define PySet_Pop(set) \
428 PyObject_CallMethod(set, (char *)"pop", NULL)
430 static INLINE int PySet_Clear(PyObject *set) {
431 PyObject *ret = PyObject_CallMethod(set, (char *)"clear", NULL);
433 Py_DECREF(ret); return 0;
436 static INLINE int PySet_Discard(PyObject *set, PyObject *key) {
437 PyObject *ret = PyObject_CallMethod(set, (char *)"discard", (char *)"O", key);
439 Py_DECREF(ret); return 0;
442 static INLINE int PySet_Add(PyObject *set, PyObject *key) {
443 PyObject *ret = PyObject_CallMethod(set, (char *)"add", (char *)"O", key);
445 Py_DECREF(ret); return 0;
448 #endif /* PyAnySet_CheckExact (<= Py2.4) */
450 #if PY_VERSION_HEX < 0x02040000
451 #ifndef Py_SETOBJECT_H
452 #define Py_SETOBJECT_H
454 static PyTypeObject *__Pyx_PySet_Type = NULL;
455 static PyTypeObject *__Pyx_PyFrozenSet_Type = NULL;
457 #define PySet_Type (*__Pyx_PySet_Type)
458 #define PyFrozenSet_Type (*__Pyx_PyFrozenSet_Type)
460 #define PyAnySet_Check(ob) \
461 (PyAnySet_CheckExact(ob) || \
462 PyType_IsSubtype((ob)->ob_type, &PySet_Type) || \
463 PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type))
465 #define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type)
467 static int __Pyx_Py23SetsImport(void) {
468 PyObject *sets=0, *Set=0, *ImmutableSet=0;
470 sets = PyImport_ImportModule((char *)"sets");
472 Set = PyObject_GetAttrString(sets, (char *)"Set");
474 ImmutableSet = PyObject_GetAttrString(sets, (char *)"ImmutableSet");
475 if (!ImmutableSet) goto bad;
478 __Pyx_PySet_Type = (PyTypeObject*) Set;
479 __Pyx_PyFrozenSet_Type = (PyTypeObject*) ImmutableSet;
486 Py_XDECREF(ImmutableSet);
491 static int __Pyx_Py23SetsImport(void) { return 0; }
492 #endif /* !Py_SETOBJECT_H */
496 static INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
497 const char* function_name, int kw_allowed); /*proto*/
499 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
501 #define __Pyx_DelItemInt(o, i, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
502 __Pyx_DelItemInt_Fast(o, i, size <= sizeof(long)) : \
503 __Pyx_DelItem_Generic(o, to_py_func(i)))
505 static INLINE int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) {
508 r = PyObject_DelItem(o, j);
513 static INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, int fits_long) {
514 if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && likely(i >= 0))
515 return PySequence_DelItem(o, i);
517 PyObject *j = fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i);
518 return __Pyx_DelItem_Generic(o, j);
522 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
523 const char *name, int exact); /*proto*/
525 static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
526 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
528 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
530 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
532 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
534 static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
535 static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
537 static PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/
539 static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
541 static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
543 static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
545 static INLINE char __Pyx_PyInt_AsChar(PyObject *);
547 static INLINE short __Pyx_PyInt_AsShort(PyObject *);
549 static INLINE int __Pyx_PyInt_AsInt(PyObject *);
551 static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
553 static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
555 static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
557 static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
559 static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
561 static INLINE long __Pyx_PyInt_AsLong(PyObject *);
563 static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
565 static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
567 static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
569 static void __Pyx_WriteUnraisable(const char *name); /*proto*/
571 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size); /*proto*/
573 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
575 static void __Pyx_AddTraceback(const char *funcname); /*proto*/
577 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
579 /* Type declarations */
581 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":4
584 * ctypedef struct _ObjectPath: # <<<<<<<<<<<<<<
593 } __pyx_t_4lxml_9objectify__ObjectPath;
595 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":121
597 * # Forward declaration
598 * cdef class PyType # <<<<<<<<<<<<<<
600 * ################################################################################
603 struct __pyx_obj_4lxml_9objectify_PyType {
606 PyObject *type_check;
609 PyObject *_schema_types;
612 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1169
613 * # adapted ElementMaker supports registered PyTypes
615 * cdef class _ObjectifyElementMakerCaller: # <<<<<<<<<<<<<<
620 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller {
624 PyObject *_element_factory;
628 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":126
629 * # Element class for the main API
631 * cdef class ObjectifiedElement(ElementBase): # <<<<<<<<<<<<<<
632 * u"""Main XML Element class.
636 struct __pyx_obj_4lxml_9objectify_ObjectifiedElement {
637 struct LxmlElementBase __pyx_base;
640 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":638
641 * # Data type support in subclasses
643 * cdef class ObjectifiedDataElement(ObjectifiedElement): # <<<<<<<<<<<<<<
644 * u"""This is the base class for all data type Elements. Subclasses should
645 * override the 'pyval' property and possibly the __str__ method.
648 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement {
649 struct __pyx_obj_4lxml_9objectify_ObjectifiedElement __pyx_base;
652 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":658
653 * cetree.setNodeText(self._c_node, s)
655 * cdef class NumberElement(ObjectifiedDataElement): # <<<<<<<<<<<<<<
656 * cdef object _parse_value
657 * def _setValueParser(self, function):
660 struct __pyx_obj_4lxml_9objectify_NumberElement {
661 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
662 PyObject *_parse_value;
665 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":760
666 * self._parse_value = long
668 * cdef class FloatElement(NumberElement): # <<<<<<<<<<<<<<
670 * self._parse_value = float
673 struct __pyx_obj_4lxml_9objectify_FloatElement {
674 struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
677 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":752
678 * return _numericValueOf(self) ^ _numericValueOf(other)
680 * cdef class IntElement(NumberElement): # <<<<<<<<<<<<<<
682 * self._parse_value = int
685 struct __pyx_obj_4lxml_9objectify_IntElement {
686 struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
689 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":848
692 * cdef class BoolElement(IntElement): # <<<<<<<<<<<<<<
693 * u"""Boolean type base on string values: 'true' or 'false'.
697 struct __pyx_obj_4lxml_9objectify_BoolElement {
698 struct __pyx_obj_4lxml_9objectify_IntElement __pyx_base;
701 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":756
702 * self._parse_value = int
704 * cdef class LongElement(NumberElement): # <<<<<<<<<<<<<<
706 * self._parse_value = long
709 struct __pyx_obj_4lxml_9objectify_LongElement {
710 struct __pyx_obj_4lxml_9objectify_NumberElement __pyx_base;
713 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1253
714 * cdef _ObjectifyElementMakerCaller NEW_ELEMENT_MAKER "PY_NEW" (object t)
716 * cdef class ElementMaker: # <<<<<<<<<<<<<<
717 * u"""ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)
721 struct __pyx_obj_4lxml_9objectify_ElementMaker {
723 PyObject *_makeelement;
724 PyObject *_namespace;
729 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1391
730 * # Element class lookup
732 * cdef class ObjectifyElementClassLookup(ElementClassLookup): # <<<<<<<<<<<<<<
733 * u"""ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)
734 * Element class lookup method that uses the objectify classes.
737 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup {
738 struct LxmlElementClassLookup __pyx_base;
739 PyObject *empty_data_class;
740 PyObject *tree_class;
743 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":826
744 * return complex(textOf(self._c_node))
746 * cdef class NoneElement(ObjectifiedDataElement): # <<<<<<<<<<<<<<
751 struct __pyx_obj_4lxml_9objectify_NoneElement {
752 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
755 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":10
758 * cdef class ObjectPath: # <<<<<<<<<<<<<<
759 * u"""ObjectPath(path)
760 * Immutable object that represents a compiled object path.
763 struct __pyx_obj_4lxml_9objectify_ObjectPath {
768 __pyx_t_4lxml_9objectify__ObjectPath *_c_path;
769 Py_ssize_t _path_len;
772 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":764
773 * self._parse_value = float
775 * cdef class StringElement(ObjectifiedDataElement): # <<<<<<<<<<<<<<
776 * u"""String data class.
780 struct __pyx_obj_4lxml_9objectify_StringElement {
781 struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement __pyx_base;
783 /* Module declarations from lxml.cstd */
785 /* Module declarations from lxml.tree */
787 /* Module declarations from __builtin__ */
789 /* Module declarations from lxml.python */
791 static PyTypeObject *__pyx_ptype_4lxml_6python_slice = 0;
792 static PyTypeObject *__pyx_ptype_4lxml_6python_unicode = 0;
793 /* Module declarations from lxml.etree */
795 /* Module declarations from lxml.etreepublic */
797 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__Document = 0;
798 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__Element = 0;
799 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_ElementBase = 0;
800 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementTree = 0;
801 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_ElementClassLookup = 0;
802 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup = 0;
803 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementTagMatcher = 0;
804 static PyTypeObject *__pyx_ptype_4lxml_11etreepublic__ElementIterator = 0;
805 /* Module declarations from lxml.objectify */
807 static PyTypeObject *__pyx_ptype_4lxml_9objectify_PyType = 0;
808 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedElement = 0;
809 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = 0;
810 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NumberElement = 0;
811 static PyTypeObject *__pyx_ptype_4lxml_9objectify_IntElement = 0;
812 static PyTypeObject *__pyx_ptype_4lxml_9objectify_LongElement = 0;
813 static PyTypeObject *__pyx_ptype_4lxml_9objectify_FloatElement = 0;
814 static PyTypeObject *__pyx_ptype_4lxml_9objectify_StringElement = 0;
815 static PyTypeObject *__pyx_ptype_4lxml_9objectify_NoneElement = 0;
816 static PyTypeObject *__pyx_ptype_4lxml_9objectify_BoolElement = 0;
817 static PyTypeObject *__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = 0;
818 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ElementMaker = 0;
819 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = 0;
820 static PyTypeObject *__pyx_ptype_4lxml_9objectify_ObjectPath = 0;
821 static PyObject *__pyx_v_4lxml_9objectify_etree = 0;
822 static PyObject *__pyx_v_4lxml_9objectify_re = 0;
823 static PyObject *__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = 0;
824 static PyObject *__pyx_v_4lxml_9objectify_is_special_method = 0;
825 static PyObject *__pyx_v_4lxml_9objectify_islice = 0;
826 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = 0;
827 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = 0;
828 static char *__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE;
829 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = 0;
830 static PyObject *__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = 0;
831 static char *__pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME;
832 static PyObject *__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = 0;
833 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS = 0;
834 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = 0;
835 static char *__pyx_v_4lxml_9objectify__XML_SCHEMA_NS;
836 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = 0;
837 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = 0;
838 static char *__pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS;
839 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = 0;
840 static PyObject *__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = 0;
841 static PyObject *__pyx_v_4lxml_9objectify__PYTYPE_DICT = 0;
842 static PyObject *__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = 0;
843 static PyObject *__pyx_v_4lxml_9objectify__TYPE_CHECKS = 0;
844 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_4lxml_9objectify_TREE_PYTYPE = 0;
845 static int __pyx_v_4lxml_9objectify___RECURSIVE_STR;
846 static PyObject *__pyx_v_4lxml_9objectify__strip_attributes = 0;
847 static PyObject *__pyx_v_4lxml_9objectify___DEFAULT_PARSER = 0;
848 static PyObject *__pyx_v_4lxml_9objectify_objectify_parser = 0;
849 static PyObject *__pyx_v_4lxml_9objectify__fromstring = 0;
850 static PyObject *__pyx_v_4lxml_9objectify__parse = 0;
851 static PyObject *__pyx_v_4lxml_9objectify__DEFAULT_NSMAP = 0;
852 static PyObject *__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = 0;
853 static PyObject *__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = 0;
854 static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *); /*proto*/
855 static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *); /*proto*/
856 static INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *, char *, char *); /*proto*/
857 static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *); /*proto*/
858 static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *, char *, char *, Py_ssize_t); /*proto*/
859 static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *, PyObject *); /*proto*/
860 static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *, PyObject *); /*proto*/
861 static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *, PyObject *); /*proto*/
862 static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *, PyObject *); /*proto*/
863 static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *, PyObject *, PyObject *); /*proto*/
864 static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *, PyObject *); /*proto*/
865 static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *, struct LxmlElement *, PyObject *); /*proto*/
866 static PyObject *__pyx_f_4lxml_9objectify___parseBool(PyObject *, int __pyx_skip_dispatch); /*proto*/
867 static INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *); /*proto*/
868 static INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *); /*proto*/
869 static INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *); /*proto*/
870 static INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *); /*proto*/
871 static INLINE PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *, PyObject *, int); /*proto*/
872 static PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *); /*proto*/
873 static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *); /*proto*/
874 static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void); /*proto*/
875 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
876 static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *); /*proto*/
877 static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *, PyObject *); /*proto*/
878 static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *, int); /*proto*/
879 static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *, PyObject *); /*proto*/
880 static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *, struct LxmlDocument *, xmlNode *); /*proto*/
881 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *, struct __pyx_obj_4lxml_9objectify_PyType *); /*proto*/
882 static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *, int, int, int, int, PyObject *, PyObject *); /*proto*/
883 static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
884 static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *); /*proto*/
885 static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *); /*proto*/
886 static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *); /*proto*/
887 static PyObject *__pyx_f_4lxml_9objectify__findObjectPath(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, PyObject *, int); /*proto*/
888 static PyObject *__pyx_f_4lxml_9objectify__createObjectPath(struct LxmlElement *, __pyx_t_4lxml_9objectify__ObjectPath *, Py_ssize_t, int, PyObject *); /*proto*/
889 static PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *, PyObject *); /*proto*/
890 static int __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *, PyObject *, PyObject *); /*proto*/
891 #define __Pyx_MODULE_NAME "lxml.objectify"
892 int __pyx_module_is_main_lxml__objectify = 0;
894 /* Implementation of lxml.objectify */
895 static PyObject *__pyx_builtin_ValueError;
896 static PyObject *__pyx_builtin_TypeError;
897 static PyObject *__pyx_builtin_object;
898 static PyObject *__pyx_builtin_IndexError;
899 static PyObject *__pyx_builtin_AttributeError;
900 static PyObject *__pyx_builtin_oct;
901 static PyObject *__pyx_builtin_hex;
902 static PyObject *__pyx_builtin_enumerate;
903 static PyObject *__pyx_builtin_map;
904 static char __pyx_k_0[] = "0";
905 static char __pyx_k_1[] = "http://codespeak.net/lxml/objectify/pytype";
906 static char __pyx_k_2[] = "UTF-8";
907 static char __pyx_k_3[] = "ElementChildIterator";
908 static char __pyx_k_4[] = "";
909 static char __pyx_k_5[] = "{%s}*";
910 static char __pyx_k_6[] = "attribute '%s' of '%s' objects is not writable";
911 static char __pyx_k_7[] = "assignment to root element is invalid";
912 static char __pyx_k_8[] = "deleting items not supported by root element";
913 static char __pyx_k_9[] = ".";
914 static char __pyx_k_E[] = "E";
915 static char __pyx_k_U[] = "U";
916 static char __pyx_k_f[] = "f";
917 static char __pyx_k_10[] = "no such child: ";
918 static char __pyx_k_11[] = "Invalid slice";
919 static char __pyx_k_12[] = "attempt to assign sequence of size %d to extended slice of size %d";
920 static char __pyx_k_13[] = "invalid types for * operator";
921 static char __pyx_k_14[] = "Invalid boolean value: '%s'";
922 static char __pyx_k_15[] = "1";
923 static char __pyx_k_16[] = "Type name must be a string";
924 static char __pyx_k_17[] = "Type check function must be callable (or None)";
925 static char __pyx_k_18[] = "Data classes must inherit from ObjectifiedDataElement";
926 static char __pyx_k_19[] = "PyType(%s, %s)";
927 static char __pyx_k_20[] = "Cannot register tree type";
928 static char __pyx_k_21[] = "inconsistent before/after dependencies";
929 static char __pyx_k_23[] = "{%s}";
930 static char __pyx_k_24[] = "{";
931 static char __pyx_k_26[] = " ";
932 static char __pyx_k_27[] = "%s%s = %s [%s]\n";
933 static char __pyx_k_28[] = "py:";
934 static char __pyx_k_29[] = "xsi:";
935 static char __pyx_k_30[] = "%s * %s = %r\n";
936 static char __pyx_k_31[] = "__unpickleElementTree";
937 static char __pyx_k_32[] = ":";
938 static char __pyx_k_42[] = "parser must inherit from lxml.etree.XMLParser";
939 static char __pyx_k_43[] = "set_element_class_lookup";
940 static char __pyx_k_44[] = "XSD types require the XSD namespace";
941 static char __pyx_k_45[] = "xsd:";
942 static char __pyx_k_46[] = "invalid number of arguments: needs one or two";
943 static char __pyx_k_47[] = "index not allowed on root node";
944 static char __pyx_k_48[] = "invalid path";
945 static char __pyx_k_49[] = "index must be enclosed in []";
946 static char __pyx_k_50[] = "root element does not match: need %s, got %s";
947 static char __pyx_k_51[] = "cannot update root node";
948 static char __pyx_k_52[] = "creating indexed path attributes is not supported";
949 static char __pyx_k_53[] = "{}";
950 static char __pyx_k_54[] = "[%d]";
951 static char __pyx_k_55[] = "The list of XML Schema datatypes this Python type maps to.\n\n Note that this must be set before registering the type!\n ";
952 static char __pyx_k_56[] = "A fake implementation for __dict__ to support dir() etc.\n\n Note that this only considers the first child with a given name.\n ";
953 static char __pyx_k_57[] = "The ``lxml.objectify`` module implements a Python object API for\nXML. It is based on `lxml.etree`.\n";
954 static char __pyx_k_58[] = "ObjectifiedDataElement";
955 static char __pyx_k_59[] = "ObjectifyElementClassLookup";
956 static char __pyx_k_60[] = "enable_recursive_str";
957 static char __pyx_k_61[] = "set_pytype_attribute_tag";
958 static char __pyx_k_62[] = "__.*__$";
959 static char __pyx_k_63[] = "http://www.w3.org/2001/XMLSchema";
960 static char __pyx_k_64[] = "http://www.w3.org/2001/XMLSchema-instance";
961 static char __pyx_k_65[] = "{%s}nil";
962 static char __pyx_k_66[] = "{%s}type";
963 static char __pyx_k_67[] = "pickleReduceElementTree";
964 static char __pyx_k_68[] = "(\\.?)\\s*(?:\\{([^}]*)\\})?\\s*([^.{}\\[\\]\\s]+)\\s*(?:\\[\\s*([-0-9]+)\\s*\\])?";
965 static char __pyx_k_ID[] = "ID";
966 static char __pyx_k_on[] = "on";
967 static char __pyx_k_py[] = "py";
968 static char __pyx_k_re[] = "re";
969 static char __pyx_k_XML[] = "XML";
970 static char __pyx_k_add[] = "add";
971 static char __pyx_k_doc[] = "doc";
972 static char __pyx_k_end[] = "end";
973 static char __pyx_k_get[] = "get";
974 static char __pyx_k_hex[] = "hex";
975 static char __pyx_k_int[] = "int";
976 static char __pyx_k_map[] = "map";
977 static char __pyx_k_nil[] = "nil";
978 static char __pyx_k_oct[] = "oct";
979 static char __pyx_k_str[] = "str";
980 static char __pyx_k_tag[] = "tag";
981 static char __pyx_k_xml[] = "xml";
982 static char __pyx_k_xsd[] = "xsd";
983 static char __pyx_k_xsi[] = "xsi";
984 static char __pyx_k_Name[] = "Name";
985 static char __pyx_k_None[] = "None";
986 static char __pyx_k_TREE[] = "TREE";
987 static char __pyx_k__doc[] = "_doc";
988 static char __pyx_k__tag[] = "_tag";
989 static char __pyx_k__xsi[] = "_xsi";
990 static char __pyx_k_base[] = "base";
991 static char __pyx_k_bool[] = "bool";
992 static char __pyx_k_byte[] = "byte";
993 static char __pyx_k_dict[] = "dict";
994 static char __pyx_k_dump[] = "dump";
995 static char __pyx_k_find[] = "find";
996 static char __pyx_k_href[] = "href";
997 static char __pyx_k_join[] = "join";
998 static char __pyx_k_last[] = "last";
999 static char __pyx_k_long[] = "long";
1000 static char __pyx_k_lxml[] = "lxml";
1001 static char __pyx_k_name[] = "name";
1002 static char __pyx_k_next[] = "next";
1003 static char __pyx_k_none[] = "none";
1004 static char __pyx_k_path[] = "path";
1005 static char __pyx_k_prev[] = "prev";
1006 static char __pyx_k_root[] = "root";
1007 static char __pyx_k_step[] = "step";
1008 static char __pyx_k_tail[] = "tail";
1009 static char __pyx_k_text[] = "text";
1010 static char __pyx_k_true[] = "true";
1011 static char __pyx_k_type[] = "type";
1012 static char __pyx_k_ASCII[] = "ASCII";
1013 static char __pyx_k_IDREF[] = "IDREF";
1014 static char __pyx_k__path[] = "_path";
1015 static char __pyx_k__type[] = "_type";
1016 static char __pyx_k_after[] = "after";
1017 static char __pyx_k_etree[] = "etree";
1018 static char __pyx_k_false[] = "false";
1019 static char __pyx_k_float[] = "float";
1020 static char __pyx_k_index[] = "index";
1021 static char __pyx_k_items[] = "items";
1022 static char __pyx_k_match[] = "match";
1023 static char __pyx_k_nsmap[] = "nsmap";
1024 static char __pyx_k_parse[] = "parse";
1025 static char __pyx_k_pyval[] = "pyval";
1026 static char __pyx_k_short[] = "short";
1027 static char __pyx_k_split[] = "split";
1028 static char __pyx_k_start[] = "start";
1029 static char __pyx_k_strip[] = "strip";
1030 static char __pyx_k_token[] = "token";
1031 static char __pyx_k_value[] = "value";
1032 static char __pyx_k_ENTITY[] = "ENTITY";
1033 static char __pyx_k_NCName[] = "NCName";
1034 static char __pyx_k_PyType[] = "PyType";
1035 static char __pyx_k__nsmap[] = "_nsmap";
1036 static char __pyx_k__value[] = "_value";
1037 static char __pyx_k_attrib[] = "attrib";
1038 static char __pyx_k_before[] = "before";
1039 static char __pyx_k_double[] = "double";
1040 static char __pyx_k_groups[] = "groups";
1041 static char __pyx_k_insert[] = "insert";
1042 static char __pyx_k_islice[] = "islice";
1043 static char __pyx_k_object[] = "object";
1044 static char __pyx_k_parent[] = "parent";
1045 static char __pyx_k_parser[] = "parser";
1046 static char __pyx_k_pickle[] = "pickle";
1047 static char __pyx_k_prefix[] = "prefix";
1048 static char __pyx_k_pytype[] = "pytype";
1049 static char __pyx_k_remove[] = "remove";
1050 static char __pyx_k_string[] = "string";
1051 static char __pyx_k_update[] = "update";
1052 static char __pyx_k_values[] = "values";
1053 static char __pyx_k_ETXPath[] = "ETXPath";
1054 static char __pyx_k_Element[] = "Element";
1055 static char __pyx_k_NMTOKEN[] = "NMTOKEN";
1056 static char __pyx_k___all__[] = "__all__";
1057 static char __pyx_k___set__[] = "__set__";
1058 static char __pyx_k__c_node[] = "_c_node";
1059 static char __pyx_k__c_path[] = "_c_path";
1060 static char __pyx_k__pytype[] = "_pytype";
1061 static char __pyx_k_addnext[] = "addnext";
1062 static char __pyx_k_boolean[] = "boolean";
1063 static char __pyx_k_compile[] = "compile";
1064 static char __pyx_k_copyreg[] = "copyreg";
1065 static char __pyx_k_default[] = "default";
1066 static char __pyx_k_findall[] = "findall";
1067 static char __pyx_k_integer[] = "integer";
1068 static char __pyx_k_replace[] = "replace";
1069 static char __pyx_k_xsi_nil[] = "xsi_nil";
1070 static char __pyx_k_NoneType[] = "NoneType";
1071 static char __pyx_k___call__[] = "__call__";
1072 static char __pyx_k___copy__[] = "__copy__";
1073 static char __pyx_k___main__[] = "__main__";
1074 static char __pyx_k___name__[] = "__name__";
1075 static char __pyx_k_annotate[] = "annotate";
1076 static char __pyx_k_base_url[] = "base_url";
1077 static char __pyx_k_children[] = "children";
1078 static char __pyx_k_copy_reg[] = "copy_reg";
1079 static char __pyx_k_language[] = "language";
1080 static char __pyx_k_register[] = "register";
1081 static char __pyx_k_tostring[] = "tostring";
1082 static char __pyx_k_TypeError[] = "TypeError";
1083 static char __pyx_k_XMLParser[] = "XMLParser";
1084 static char __pyx_k__annotate[] = "_annotate";
1085 static char __pyx_k__path_len[] = "_path_len";
1086 static char __pyx_k__path_str[] = "_path_str";
1087 static char __pyx_k_enumerate[] = "enumerate";
1088 static char __pyx_k_getparent[] = "getparent";
1089 static char __pyx_k_itertools[] = "itertools";
1090 static char __pyx_k_namespace[] = "namespace";
1091 static char __pyx_k_stringify[] = "stringify";
1092 static char __pyx_k_IndexError[] = "IndexError";
1093 static char __pyx_k_IntElement[] = "IntElement";
1094 static char __pyx_k_ObjectPath[] = "ObjectPath";
1095 static char __pyx_k_ValueError[] = "ValueError";
1096 static char __pyx_k__namespace[] = "_namespace";
1097 static char __pyx_k_deannotate[] = "deannotate";
1098 static char __pyx_k_empty_type[] = "empty_type";
1099 static char __pyx_k_fromstring[] = "fromstring";
1100 static char __pyx_k_ignore_old[] = "ignore_old";
1101 static char __pyx_k_ignore_xsi[] = "ignore_xsi";
1102 static char __pyx_k_makeparser[] = "makeparser";
1103 static char __pyx_k_new_parser[] = "new_parser";
1104 static char __pyx_k_pyannotate[] = "pyannotate";
1105 static char __pyx_k_pytypename[] = "pytypename";
1106 static char __pyx_k_tree_class[] = "tree_class";
1107 static char __pyx_k_type_check[] = "type_check";
1108 static char __pyx_k_type_class[] = "type_class";
1109 static char __pyx_k_BoolElement[] = "BoolElement";
1110 static char __pyx_k_DataElement[] = "DataElement";
1111 static char __pyx_k_ElementTree[] = "ElementTree";
1112 static char __pyx_k_LongElement[] = "LongElement";
1113 static char __pyx_k_NoneElement[] = "NoneElement";
1114 static char __pyx_k___checkBool[] = "__checkBool";
1115 static char __pyx_k___getattr__[] = "__getattr__";
1116 static char __pyx_k___getitem__[] = "__getitem__";
1117 static char __pyx_k___parseBool[] = "__parseBool";
1118 static char __pyx_k___version__[] = "__version__";
1119 static char __pyx_k_constructor[] = "constructor";
1120 static char __pyx_k_makeelement[] = "makeelement";
1121 static char __pyx_k_unsignedInt[] = "unsignedInt";
1122 static char __pyx_k_xsiannotate[] = "xsiannotate";
1123 static char __pyx_k_ElementMaker[] = "ElementMaker";
1124 static char __pyx_k_FloatElement[] = "FloatElement";
1125 static char __pyx_k__ElementTree[] = "_ElementTree";
1126 static char __pyx_k___lower_bool[] = "__lower_bool";
1127 static char __pyx_k__makeelement[] = "_makeelement";
1128 static char __pyx_k__parse_value[] = "_parse_value";
1129 static char __pyx_k_annotate_xsi[] = "annotate_xsi";
1130 static char __pyx_k_empty_pytype[] = "empty_pytype";
1131 static char __pyx_k_iterchildren[] = "iterchildren";
1132 static char __pyx_k_unsignedByte[] = "unsignedByte";
1133 static char __pyx_k_unsignedLong[] = "unsignedLong";
1134 static char __pyx_k_NumberElement[] = "NumberElement";
1135 static char __pyx_k_StringElement[] = "StringElement";
1136 static char __pyx_k__schema_types[] = "_schema_types";
1137 static char __pyx_k_attribute_tag[] = "attribute_tag";
1138 static char __pyx_k_ignore_pytype[] = "ignore_pytype";
1139 static char __pyx_k_unsignedShort[] = "unsignedShort";
1140 static char __pyx_k_AttributeError[] = "AttributeError";
1141 static char __pyx_k_xmlSchemaTypes[] = "xmlSchemaTypes";
1142 static char __pyx_k_annotate_pytype[] = "annotate_pytype";
1143 static char __pyx_k_element_or_tree[] = "element_or_tree";
1144 static char __pyx_k_negativeInteger[] = "negativeInteger";
1145 static char __pyx_k_positiveInteger[] = "positiveInteger";
1146 static char __pyx_k_PYTYPE_ATTRIBUTE[] = "PYTYPE_ATTRIBUTE";
1147 static char __pyx_k__element_factory[] = "_element_factory";
1148 static char __pyx_k__lookup_function[] = "_lookup_function";
1149 static char __pyx_k_empty_data_class[] = "empty_data_class";
1150 static char __pyx_k_normalizedString[] = "normalizedString";
1151 static char __pyx_k_strip_attributes[] = "strip_attributes";
1152 static char __pyx_k_remove_blank_text[] = "remove_blank_text";
1153 static char __pyx_k_ObjectifiedElement[] = "ObjectifiedElement";
1154 static char __pyx_k_getRegisteredTypes[] = "getRegisteredTypes";
1155 static char __pyx_k_nonNegativeInteger[] = "nonNegativeInteger";
1156 static char __pyx_k_nonPositiveInteger[] = "nonPositiveInteger";
1157 static char __pyx_k_set_default_parser[] = "set_default_parser";
1158 static char __pyx_k_pickleReduceElement[] = "pickleReduceElement";
1159 static PyObject *__pyx_kp_u_0;
1160 static PyObject *__pyx_kp_u_1;
1161 static PyObject *__pyx_kp_u_10;
1162 static PyObject *__pyx_kp_u_11;
1163 static PyObject *__pyx_kp_u_12;
1164 static PyObject *__pyx_kp_u_13;
1165 static PyObject *__pyx_kp_u_14;
1166 static PyObject *__pyx_kp_u_15;
1167 static PyObject *__pyx_kp_u_16;
1168 static PyObject *__pyx_kp_u_17;
1169 static PyObject *__pyx_kp_u_18;
1170 static PyObject *__pyx_kp_u_19;
1171 static PyObject *__pyx_kp_u_20;
1172 static PyObject *__pyx_kp_u_21;
1173 static PyObject *__pyx_kp_u_23;
1174 static PyObject *__pyx_kp_u_24;
1175 static PyObject *__pyx_kp_u_26;
1176 static PyObject *__pyx_kp_u_27;
1177 static PyObject *__pyx_kp_u_28;
1178 static PyObject *__pyx_kp_u_29;
1179 static PyObject *__pyx_n_ui_3;
1180 static PyObject *__pyx_kp_u_30;
1181 static PyObject *__pyx_n_ui_31;
1182 static PyObject *__pyx_kp_b_32;
1183 static PyObject *__pyx_kp_u_32;
1184 static PyObject *__pyx_kp_u_4;
1185 static PyObject *__pyx_kp_u_42;
1186 static PyObject *__pyx_n_ui_43;
1187 static PyObject *__pyx_kp_u_44;
1188 static PyObject *__pyx_kp_u_45;
1189 static PyObject *__pyx_kp_u_46;
1190 static PyObject *__pyx_kp_u_47;
1191 static PyObject *__pyx_kp_u_48;
1192 static PyObject *__pyx_kp_u_49;
1193 static PyObject *__pyx_kp_u_5;
1194 static PyObject *__pyx_kp_u_50;
1195 static PyObject *__pyx_kp_u_51;
1196 static PyObject *__pyx_kp_u_52;
1197 static PyObject *__pyx_kp_u_53;
1198 static PyObject *__pyx_kp_u_54;
1199 static PyObject *__pyx_n_u_58;
1200 static PyObject *__pyx_n_u_59;
1201 static PyObject *__pyx_kp_u_6;
1202 static PyObject *__pyx_n_u_60;
1203 static PyObject *__pyx_n_u_61;
1204 static PyObject *__pyx_n_ui_61;
1205 static PyObject *__pyx_kp_u_62;
1206 static PyObject *__pyx_kp_u_63;
1207 static PyObject *__pyx_kp_u_64;
1208 static PyObject *__pyx_kp_u_65;
1209 static PyObject *__pyx_kp_u_66;
1210 static PyObject *__pyx_n_ui_67;
1211 static PyObject *__pyx_kp_u_68;
1212 static PyObject *__pyx_kp_u_7;
1213 static PyObject *__pyx_kp_u_8;
1214 static PyObject *__pyx_kp_u_9;
1215 static PyObject *__pyx_n_ui_AttributeError;
1216 static PyObject *__pyx_n_u_BoolElement;
1217 static PyObject *__pyx_n_u_DataElement;
1218 static PyObject *__pyx_n_u_E;
1219 static PyObject *__pyx_n_ui_E;
1220 static PyObject *__pyx_n_u_ENTITY;
1221 static PyObject *__pyx_n_ui_ETXPath;
1222 static PyObject *__pyx_n_u_Element;
1223 static PyObject *__pyx_n_u_ElementMaker;
1224 static PyObject *__pyx_n_ui_ElementTree;
1225 static PyObject *__pyx_n_u_FloatElement;
1226 static PyObject *__pyx_n_u_ID;
1227 static PyObject *__pyx_n_u_IDREF;
1228 static PyObject *__pyx_n_ui_IndexError;
1229 static PyObject *__pyx_n_u_IntElement;
1230 static PyObject *__pyx_n_u_LongElement;
1231 static PyObject *__pyx_n_u_NCName;
1232 static PyObject *__pyx_n_u_NMTOKEN;
1233 static PyObject *__pyx_n_u_Name;
1234 static PyObject *__pyx_n_u_None;
1235 static PyObject *__pyx_n_u_NoneElement;
1236 static PyObject *__pyx_n_u_NoneType;
1237 static PyObject *__pyx_n_u_NumberElement;
1238 static PyObject *__pyx_n_u_ObjectPath;
1239 static PyObject *__pyx_n_u_ObjectifiedElement;
1240 static PyObject *__pyx_n_u_PYTYPE_ATTRIBUTE;
1241 static PyObject *__pyx_n_ui_PYTYPE_ATTRIBUTE;
1242 static PyObject *__pyx_n_u_PyType;
1243 static PyObject *__pyx_n_u_StringElement;
1244 static PyObject *__pyx_n_u_TREE;
1245 static PyObject *__pyx_n_ui_TypeError;
1246 static PyObject *__pyx_n_ui_U;
1247 static PyObject *__pyx_n_ui_ValueError;
1248 static PyObject *__pyx_n_u_XML;
1249 static PyObject *__pyx_n_ui_XMLParser;
1250 static PyObject *__pyx_n_ui__ElementTree;
1251 static PyObject *__pyx_n_ui___all__;
1252 static PyObject *__pyx_n_ui___call__;
1253 static PyObject *__pyx_n_ui___checkBool;
1254 static PyObject *__pyx_n_ui___copy__;
1255 static PyObject *__pyx_n_ui___getattr__;
1256 static PyObject *__pyx_n_ui___getitem__;
1257 static PyObject *__pyx_n_ui___lower_bool;
1258 static PyObject *__pyx_n_ui___main__;
1259 static PyObject *__pyx_n_ui___name__;
1260 static PyObject *__pyx_n_ui___parseBool;
1261 static PyObject *__pyx_n_ui___set__;
1262 static PyObject *__pyx_n_ui___version__;
1263 static PyObject *__pyx_n_ui__annotate;
1264 static PyObject *__pyx_n_ui__c_node;
1265 static PyObject *__pyx_n_ui__c_path;
1266 static PyObject *__pyx_n_ui__doc;
1267 static PyObject *__pyx_n_ui__element_factory;
1268 static PyObject *__pyx_n_ui__lookup_function;
1269 static PyObject *__pyx_n_ui__makeelement;
1270 static PyObject *__pyx_n_ui__namespace;
1271 static PyObject *__pyx_n_ui__nsmap;
1272 static PyObject *__pyx_n_ui__parse_value;
1273 static PyObject *__pyx_n_ui__path;
1274 static PyObject *__pyx_n_ui__path_len;
1275 static PyObject *__pyx_n_ui__path_str;
1276 static PyObject *__pyx_n_ui__pytype;
1277 static PyObject *__pyx_n_ui__schema_types;
1278 static PyObject *__pyx_n_ui__tag;
1279 static PyObject *__pyx_n_ui__type;
1280 static PyObject *__pyx_n_ui__value;
1281 static PyObject *__pyx_n_ui__xsi;
1282 static PyObject *__pyx_n_ui_add;
1283 static PyObject *__pyx_n_ui_addnext;
1284 static PyObject *__pyx_n_ui_after;
1285 static PyObject *__pyx_n_u_annotate;
1286 static PyObject *__pyx_n_ui_annotate;
1287 static PyObject *__pyx_n_ui_annotate_pytype;
1288 static PyObject *__pyx_n_ui_annotate_xsi;
1289 static PyObject *__pyx_n_ui_attrib;
1290 static PyObject *__pyx_n_ui_attribute_tag;
1291 static PyObject *__pyx_n_u_base;
1292 static PyObject *__pyx_n_ui_base;
1293 static PyObject *__pyx_n_ui_base_url;
1294 static PyObject *__pyx_n_ui_before;
1295 static PyObject *__pyx_n_u_bool;
1296 static PyObject *__pyx_n_u_boolean;
1297 static PyObject *__pyx_n_u_byte;
1298 static PyObject *__pyx_n_ui_children;
1299 static PyObject *__pyx_n_ui_compile;
1300 static PyObject *__pyx_n_ui_constructor;
1301 static PyObject *__pyx_n_ui_copy_reg;
1302 static PyObject *__pyx_n_ui_copyreg;
1303 static PyObject *__pyx_n_u_deannotate;
1304 static PyObject *__pyx_n_ui_default;
1305 static PyObject *__pyx_n_ui_dict;
1306 static PyObject *__pyx_n_ui_doc;
1307 static PyObject *__pyx_n_u_double;
1308 static PyObject *__pyx_n_u_dump;
1309 static PyObject *__pyx_n_ui_element_or_tree;
1310 static PyObject *__pyx_n_ui_empty_data_class;
1311 static PyObject *__pyx_n_ui_empty_pytype;
1312 static PyObject *__pyx_n_ui_empty_type;
1313 static PyObject *__pyx_n_ui_end;
1314 static PyObject *__pyx_n_ui_enumerate;
1315 static PyObject *__pyx_n_bi_etree;
1316 static PyObject *__pyx_n_ui_etree;
1317 static PyObject *__pyx_n_ui_f;
1318 static PyObject *__pyx_n_u_false;
1319 static PyObject *__pyx_n_ui_find;
1320 static PyObject *__pyx_n_ui_findall;
1321 static PyObject *__pyx_n_u_float;
1322 static PyObject *__pyx_n_u_fromstring;
1323 static PyObject *__pyx_n_ui_fromstring;
1324 static PyObject *__pyx_n_ui_get;
1325 static PyObject *__pyx_n_u_getRegisteredTypes;
1326 static PyObject *__pyx_n_ui_getparent;
1327 static PyObject *__pyx_n_ui_groups;
1328 static PyObject *__pyx_n_ui_hex;
1329 static PyObject *__pyx_n_ui_href;
1330 static PyObject *__pyx_n_ui_ignore_old;
1331 static PyObject *__pyx_n_ui_ignore_pytype;
1332 static PyObject *__pyx_n_ui_ignore_xsi;
1333 static PyObject *__pyx_n_ui_index;
1334 static PyObject *__pyx_n_ui_insert;
1335 static PyObject *__pyx_n_u_int;
1336 static PyObject *__pyx_n_u_integer;
1337 static PyObject *__pyx_n_bi_islice;
1338 static PyObject *__pyx_n_ui_islice;
1339 static PyObject *__pyx_n_ui_items;
1340 static PyObject *__pyx_n_ui_iterchildren;
1341 static PyObject *__pyx_n_ui_itertools;
1342 static PyObject *__pyx_n_ui_join;
1343 static PyObject *__pyx_n_u_language;
1344 static PyObject *__pyx_n_ui_last;
1345 static PyObject *__pyx_n_u_long;
1346 static PyObject *__pyx_n_ui_lxml;
1347 static PyObject *__pyx_n_ui_makeelement;
1348 static PyObject *__pyx_n_u_makeparser;
1349 static PyObject *__pyx_n_ui_map;
1350 static PyObject *__pyx_n_ui_match;
1351 static PyObject *__pyx_n_ui_name;
1352 static PyObject *__pyx_n_ui_namespace;
1353 static PyObject *__pyx_n_u_negativeInteger;
1354 static PyObject *__pyx_n_ui_new_parser;
1355 static PyObject *__pyx_n_ui_next;
1356 static PyObject *__pyx_n_u_nonNegativeInteger;
1357 static PyObject *__pyx_n_u_nonPositiveInteger;
1358 static PyObject *__pyx_n_u_none;
1359 static PyObject *__pyx_n_u_normalizedString;
1360 static PyObject *__pyx_n_ui_nsmap;
1361 static PyObject *__pyx_n_ui_object;
1362 static PyObject *__pyx_n_ui_oct;
1363 static PyObject *__pyx_n_ui_on;
1364 static PyObject *__pyx_n_ui_parent;
1365 static PyObject *__pyx_n_u_parse;
1366 static PyObject *__pyx_n_ui_parse;
1367 static PyObject *__pyx_n_ui_parser;
1368 static PyObject *__pyx_n_ui_path;
1369 static PyObject *__pyx_n_ui_pickle;
1370 static PyObject *__pyx_n_ui_pickleReduceElement;
1371 static PyObject *__pyx_n_u_positiveInteger;
1372 static PyObject *__pyx_n_ui_prefix;
1373 static PyObject *__pyx_n_ui_prev;
1374 static PyObject *__pyx_n_u_py;
1375 static PyObject *__pyx_n_u_pyannotate;
1376 static PyObject *__pyx_n_u_pytype;
1377 static PyObject *__pyx_n_ui_pytype;
1378 static PyObject *__pyx_n_u_pytypename;
1379 static PyObject *__pyx_n_u_pyval;
1380 static PyObject *__pyx_n_ui_pyval;
1381 static PyObject *__pyx_n_ui_re;
1382 static PyObject *__pyx_n_ui_register;
1383 static PyObject *__pyx_n_ui_remove;
1384 static PyObject *__pyx_n_b_remove_blank_text;
1385 static PyObject *__pyx_n_u_remove_blank_text;
1386 static PyObject *__pyx_n_ui_remove_blank_text;
1387 static PyObject *__pyx_n_ui_replace;
1388 static PyObject *__pyx_n_ui_root;
1389 static PyObject *__pyx_n_u_set_default_parser;
1390 static PyObject *__pyx_n_u_short;
1391 static PyObject *__pyx_n_ui_split;
1392 static PyObject *__pyx_n_ui_start;
1393 static PyObject *__pyx_n_ui_step;
1394 static PyObject *__pyx_n_u_str;
1395 static PyObject *__pyx_n_u_string;
1396 static PyObject *__pyx_n_ui_stringify;
1397 static PyObject *__pyx_n_ui_strip;
1398 static PyObject *__pyx_n_ui_strip_attributes;
1399 static PyObject *__pyx_n_u_tag;
1400 static PyObject *__pyx_n_ui_tag;
1401 static PyObject *__pyx_n_u_tail;
1402 static PyObject *__pyx_n_u_text;
1403 static PyObject *__pyx_n_ui_text;
1404 static PyObject *__pyx_n_u_token;
1405 static PyObject *__pyx_n_ui_tostring;
1406 static PyObject *__pyx_n_ui_tree_class;
1407 static PyObject *__pyx_n_u_true;
1408 static PyObject *__pyx_n_ui_type;
1409 static PyObject *__pyx_n_ui_type_check;
1410 static PyObject *__pyx_n_ui_type_class;
1411 static PyObject *__pyx_n_u_unsignedByte;
1412 static PyObject *__pyx_n_u_unsignedInt;
1413 static PyObject *__pyx_n_u_unsignedLong;
1414 static PyObject *__pyx_n_u_unsignedShort;
1415 static PyObject *__pyx_n_ui_update;
1416 static PyObject *__pyx_n_u_value;
1417 static PyObject *__pyx_n_ui_value;
1418 static PyObject *__pyx_n_ui_values;
1419 static PyObject *__pyx_n_ui_xml;
1420 static PyObject *__pyx_n_ui_xmlSchemaTypes;
1421 static PyObject *__pyx_n_u_xsd;
1422 static PyObject *__pyx_n_u_xsi;
1423 static PyObject *__pyx_n_ui_xsi;
1424 static PyObject *__pyx_n_ui_xsi_nil;
1425 static PyObject *__pyx_n_u_xsiannotate;
1426 static PyObject *__pyx_int_0;
1427 static PyObject *__pyx_int_1;
1428 static PyObject *__pyx_int_neg_1;
1429 static PyObject *__pyx_k_22;
1430 static PyObject *__pyx_k_25;
1431 static PyObject *__pyx_k_33;
1432 static PyObject *__pyx_k_34;
1433 static PyObject *__pyx_k_35;
1434 static PyObject *__pyx_k_36;
1435 static PyObject *__pyx_k_37;
1436 static PyObject *__pyx_k_38;
1437 static PyObject *__pyx_k_39;
1438 static PyObject *__pyx_k_40;
1439 static PyObject *__pyx_k_41;
1441 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":40
1442 * from itertools import islice
1444 * cdef object _typename(object t): # <<<<<<<<<<<<<<
1449 static PyObject *__pyx_f_4lxml_9objectify__typename(PyObject *__pyx_v_t) {
1450 char *__pyx_v_c_name;
1452 PyObject *__pyx_r = NULL;
1454 PyObject *__pyx_t_2 = NULL;
1455 __Pyx_SetupRefcountContext("_typename");
1456 __Pyx_INCREF(__pyx_v_t);
1458 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":43
1461 * c_name = python._fqtypename(t) # <<<<<<<<<<<<<<
1462 * s = cstd.strrchr(c_name, c'.')
1465 __pyx_v_c_name = _fqtypename(__pyx_v_t);
1467 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":44
1469 * c_name = python._fqtypename(t)
1470 * s = cstd.strrchr(c_name, c'.') # <<<<<<<<<<<<<<
1474 __pyx_v_s = strrchr(__pyx_v_c_name, '.');
1476 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":45
1477 * c_name = python._fqtypename(t)
1478 * s = cstd.strrchr(c_name, c'.')
1479 * if s is not NULL: # <<<<<<<<<<<<<<
1481 * return pyunicode(c_name)
1483 __pyx_t_1 = (__pyx_v_s != NULL);
1486 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":46
1487 * s = cstd.strrchr(c_name, c'.')
1489 * c_name = s + 1 # <<<<<<<<<<<<<<
1490 * return pyunicode(c_name)
1493 __pyx_v_c_name = (__pyx_v_s + 1);
1498 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":47
1501 * return pyunicode(c_name) # <<<<<<<<<<<<<<
1503 * # namespace/name for "pytype" hint attribute
1505 __Pyx_XDECREF(__pyx_r);
1506 __pyx_t_2 = pyunicode(__pyx_v_c_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1507 __Pyx_GOTREF(__pyx_t_2);
1508 __pyx_r = __pyx_t_2;
1512 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1515 __Pyx_XDECREF(__pyx_t_2);
1516 __Pyx_AddTraceback("lxml.objectify._typename");
1519 __Pyx_DECREF(__pyx_v_t);
1520 __Pyx_XGIVEREF(__pyx_r);
1521 __Pyx_FinishRefcountContext();
1525 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":63
1526 * TREE_PYTYPE_NAME = u"TREE"
1528 * cdef _unicodeAndUtf8(s): # <<<<<<<<<<<<<<
1529 * return (s, python.PyUnicode_AsUTF8String(s))
1533 static PyObject *__pyx_f_4lxml_9objectify__unicodeAndUtf8(PyObject *__pyx_v_s) {
1534 PyObject *__pyx_r = NULL;
1535 PyObject *__pyx_t_1 = NULL;
1536 PyObject *__pyx_t_2 = NULL;
1537 __Pyx_SetupRefcountContext("_unicodeAndUtf8");
1539 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":64
1541 * cdef _unicodeAndUtf8(s):
1542 * return (s, python.PyUnicode_AsUTF8String(s)) # <<<<<<<<<<<<<<
1544 * def set_pytype_attribute_tag(attribute_tag=None):
1546 __Pyx_XDECREF(__pyx_r);
1547 __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1548 __Pyx_GOTREF(__pyx_t_1);
1549 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1550 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1551 __Pyx_INCREF(__pyx_v_s);
1552 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s);
1553 __Pyx_GIVEREF(__pyx_v_s);
1554 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
1555 __Pyx_GIVEREF(__pyx_t_1);
1557 __pyx_r = ((PyObject *)__pyx_t_2);
1561 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1564 __Pyx_XDECREF(__pyx_t_1);
1565 __Pyx_XDECREF(__pyx_t_2);
1566 __Pyx_AddTraceback("lxml.objectify._unicodeAndUtf8");
1569 __Pyx_XGIVEREF(__pyx_r);
1570 __Pyx_FinishRefcountContext();
1574 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":66
1575 * return (s, python.PyUnicode_AsUTF8String(s))
1577 * def set_pytype_attribute_tag(attribute_tag=None): # <<<<<<<<<<<<<<
1578 * u"""set_pytype_attribute_tag(attribute_tag=None)
1579 * Change name and namespace of the XML attribute that holds Python type
1582 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1583 static char __pyx_doc_4lxml_9objectify_set_pytype_attribute_tag[] = "set_pytype_attribute_tag(attribute_tag=None)\n Change name and namespace of the XML attribute that holds Python type\n information.\n\n Do not use this unless you know what you are doing.\n\n Reset by calling without argument.\n\n Default: \"{http://codespeak.net/lxml/objectify/pytype}pytype\"\n ";
1584 static PyObject *__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1585 PyObject *__pyx_v_attribute_tag = 0;
1586 PyObject *__pyx_r = NULL;
1588 PyObject *__pyx_t_2 = NULL;
1589 PyObject *__pyx_t_3 = NULL;
1590 PyObject *__pyx_t_4 = NULL;
1591 PyObject *__pyx_t_5 = NULL;
1592 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_attribute_tag,0};
1593 __Pyx_SetupRefcountContext("set_pytype_attribute_tag");
1594 __pyx_self = __pyx_self;
1595 if (unlikely(__pyx_kwds)) {
1596 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
1597 PyObject* values[1] = {0};
1598 values[0] = ((PyObject *)Py_None);
1599 switch (PyTuple_GET_SIZE(__pyx_args)) {
1600 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
1602 default: goto __pyx_L5_argtuple_error;
1604 switch (PyTuple_GET_SIZE(__pyx_args)) {
1607 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_attribute_tag);
1608 if (unlikely(value)) { values[0] = value; kw_args--; }
1611 if (unlikely(kw_args > 0)) {
1612 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_pytype_attribute_tag") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1614 __pyx_v_attribute_tag = values[0];
1616 __pyx_v_attribute_tag = ((PyObject *)Py_None);
1617 switch (PyTuple_GET_SIZE(__pyx_args)) {
1618 case 1: __pyx_v_attribute_tag = PyTuple_GET_ITEM(__pyx_args, 0);
1620 default: goto __pyx_L5_argtuple_error;
1623 goto __pyx_L4_argument_unpacking_done;
1624 __pyx_L5_argtuple_error:;
1625 __Pyx_RaiseArgtupleInvalid("set_pytype_attribute_tag", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1627 __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag");
1629 __pyx_L4_argument_unpacking_done:;
1630 __Pyx_INCREF(__pyx_v_attribute_tag);
1632 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":80
1633 * global PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8
1634 * global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
1635 * if attribute_tag is None: # <<<<<<<<<<<<<<
1636 * PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
1637 * _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1639 __pyx_t_1 = (__pyx_v_attribute_tag == Py_None);
1642 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":82
1643 * if attribute_tag is None:
1644 * PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
1645 * _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype") # <<<<<<<<<<<<<<
1646 * PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1647 * _unicodeAndUtf8(u"pytype")
1649 __pyx_t_2 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_u_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1650 __Pyx_GOTREF(__pyx_t_2);
1651 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
1652 PyObject* tuple = __pyx_t_2;
1653 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
1654 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
1656 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":81
1657 * global PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8
1658 * if attribute_tag is None:
1659 * PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \ # <<<<<<<<<<<<<<
1660 * _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1661 * PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1663 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1664 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1665 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1666 __Pyx_GIVEREF(__pyx_t_3);
1667 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_3;
1669 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1670 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1671 __Pyx_GIVEREF(__pyx_t_4);
1672 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_4;
1675 __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1676 __Pyx_GOTREF(__pyx_t_5);
1677 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1678 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1679 __Pyx_GOTREF(__pyx_t_3);
1680 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1681 __Pyx_GOTREF(__pyx_t_4);
1682 if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1683 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1684 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1685 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1686 __Pyx_GIVEREF(__pyx_t_3);
1687 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_3;
1689 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1690 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1691 __Pyx_GIVEREF(__pyx_t_4);
1692 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_4;
1696 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":84
1697 * _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1698 * PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1699 * _unicodeAndUtf8(u"pytype") # <<<<<<<<<<<<<<
1701 * PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1703 __pyx_t_2 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_n_u_pytype)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1704 __Pyx_GOTREF(__pyx_t_2);
1705 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
1706 PyObject* tuple = __pyx_t_2;
1707 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
1708 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
1710 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":83
1711 * PYTYPE_NAMESPACE, PYTYPE_NAMESPACE_UTF8 = \
1712 * _unicodeAndUtf8(u"http://codespeak.net/lxml/objectify/pytype")
1713 * PYTYPE_ATTRIBUTE_NAME, PYTYPE_ATTRIBUTE_NAME_UTF8 = \ # <<<<<<<<<<<<<<
1714 * _unicodeAndUtf8(u"pytype")
1717 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1718 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1719 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1720 __Pyx_GIVEREF(__pyx_t_4);
1721 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_4;
1723 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1724 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1725 __Pyx_GIVEREF(__pyx_t_3);
1726 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_3;
1729 __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1730 __Pyx_GOTREF(__pyx_t_5);
1731 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1732 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1733 __Pyx_GOTREF(__pyx_t_4);
1734 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1735 __Pyx_GOTREF(__pyx_t_3);
1736 if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1737 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1738 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1739 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1740 __Pyx_GIVEREF(__pyx_t_4);
1741 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_4;
1743 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1744 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1745 __Pyx_GIVEREF(__pyx_t_3);
1746 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_3;
1753 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":87
1755 * PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \
1756 * cetree.getNsTag(attribute_tag) # <<<<<<<<<<<<<<
1757 * PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
1758 * PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)
1760 __pyx_t_2 = getNsTag(__pyx_v_attribute_tag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1761 __Pyx_GOTREF(__pyx_t_2);
1762 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
1763 PyObject* tuple = __pyx_t_2;
1764 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
1765 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
1767 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":86
1768 * _unicodeAndUtf8(u"pytype")
1770 * PYTYPE_NAMESPACE_UTF8, PYTYPE_ATTRIBUTE_NAME_UTF8 = \ # <<<<<<<<<<<<<<
1771 * cetree.getNsTag(attribute_tag)
1772 * PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
1774 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1775 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1776 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1777 __Pyx_GIVEREF(__pyx_t_3);
1778 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_3;
1780 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1781 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1782 __Pyx_GIVEREF(__pyx_t_4);
1783 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_4;
1786 __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1787 __Pyx_GOTREF(__pyx_t_5);
1788 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1789 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1790 __Pyx_GOTREF(__pyx_t_3);
1791 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1792 __Pyx_GOTREF(__pyx_t_4);
1793 if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1794 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1795 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1796 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1797 __Pyx_GIVEREF(__pyx_t_3);
1798 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = __pyx_t_3;
1800 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1801 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1802 __Pyx_GIVEREF(__pyx_t_4);
1803 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = __pyx_t_4;
1807 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":89
1808 * cetree.getNsTag(attribute_tag)
1809 * PYTYPE_NAMESPACE = python.PyUnicode_FromEncodedObject(
1810 * PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL) # <<<<<<<<<<<<<<
1811 * PYTYPE_ATTRIBUTE_NAME = python.PyUnicode_FromEncodedObject(
1812 * PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)
1814 __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8, __pyx_k_2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1815 __Pyx_GOTREF(__pyx_t_2);
1816 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1817 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE);
1818 __Pyx_GIVEREF(__pyx_t_2);
1819 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = __pyx_t_2;
1822 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":91
1823 * PYTYPE_NAMESPACE_UTF8, 'UTF-8', NULL)
1824 * PYTYPE_ATTRIBUTE_NAME = python.PyUnicode_FromEncodedObject(
1825 * PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL) # <<<<<<<<<<<<<<
1827 * _PYTYPE_NAMESPACE = _cstr(PYTYPE_NAMESPACE_UTF8)
1829 __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8, __pyx_k_2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1830 __Pyx_GOTREF(__pyx_t_2);
1831 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1832 __Pyx_DECREF(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME);
1833 __Pyx_GIVEREF(__pyx_t_2);
1834 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = __pyx_t_2;
1839 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":93
1840 * PYTYPE_ATTRIBUTE_NAME_UTF8, 'UTF-8', NULL)
1842 * _PYTYPE_NAMESPACE = _cstr(PYTYPE_NAMESPACE_UTF8) # <<<<<<<<<<<<<<
1843 * _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
1844 * PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
1846 __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE = PyString_AS_STRING(__pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8);
1848 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":94
1850 * _PYTYPE_NAMESPACE = _cstr(PYTYPE_NAMESPACE_UTF8)
1851 * _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8) # <<<<<<<<<<<<<<
1852 * PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
1853 * _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
1855 __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME = PyString_AS_STRING(__pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8);
1857 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":96
1858 * _PYTYPE_ATTRIBUTE_NAME = _cstr(PYTYPE_ATTRIBUTE_NAME_UTF8)
1859 * PYTYPE_ATTRIBUTE = cetree.namespacedNameFromNsName(
1860 * _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) # <<<<<<<<<<<<<<
1862 * set_pytype_attribute_tag()
1864 __pyx_t_2 = namespacedNameFromNsName(__pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1865 __Pyx_GOTREF(__pyx_t_2);
1866 if (PyObject_SetAttr(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1867 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1869 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1872 __Pyx_XDECREF(__pyx_t_2);
1873 __Pyx_XDECREF(__pyx_t_3);
1874 __Pyx_XDECREF(__pyx_t_4);
1875 __Pyx_XDECREF(__pyx_t_5);
1876 __Pyx_AddTraceback("lxml.objectify.set_pytype_attribute_tag");
1879 __Pyx_DECREF(__pyx_v_attribute_tag);
1880 __Pyx_XGIVEREF(__pyx_r);
1881 __Pyx_FinishRefcountContext();
1885 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":140
1888 * def __iter__(self): # <<<<<<<<<<<<<<
1889 * u"""Iterate over self and all siblings with the same tag.
1893 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(PyObject *__pyx_v_self); /*proto*/
1894 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__[] = "Iterate over self and all siblings with the same tag.\n ";
1895 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__(PyObject *__pyx_v_self) {
1896 PyObject *__pyx_v_parent;
1897 PyObject *__pyx_r = NULL;
1898 PyObject *__pyx_t_1 = NULL;
1899 PyObject *__pyx_t_2 = NULL;
1901 PyObject *__pyx_t_4 = NULL;
1902 PyObject *__pyx_t_5 = NULL;
1903 __Pyx_SetupRefcountContext("__iter__");
1904 __Pyx_INCREF((PyObject *)__pyx_v_self);
1905 __pyx_v_parent = Py_None; __Pyx_INCREF(Py_None);
1907 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":143
1908 * u"""Iterate over self and all siblings with the same tag.
1910 * parent = self.getparent() # <<<<<<<<<<<<<<
1911 * if parent is None:
1912 * return iter([self])
1914 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1915 __Pyx_GOTREF(__pyx_t_1);
1916 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1917 __Pyx_GOTREF(__pyx_t_2);
1918 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1919 __Pyx_DECREF(__pyx_v_parent);
1920 __pyx_v_parent = __pyx_t_2;
1923 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":144
1925 * parent = self.getparent()
1926 * if parent is None: # <<<<<<<<<<<<<<
1927 * return iter([self])
1928 * return etree.ElementChildIterator(parent, tag=self.tag)
1930 __pyx_t_3 = (__pyx_v_parent == Py_None);
1933 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":145
1934 * parent = self.getparent()
1935 * if parent is None:
1936 * return iter([self]) # <<<<<<<<<<<<<<
1937 * return etree.ElementChildIterator(parent, tag=self.tag)
1940 __Pyx_XDECREF(__pyx_r);
1941 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1942 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1943 __Pyx_INCREF(__pyx_v_self);
1944 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
1945 __Pyx_GIVEREF(__pyx_v_self);
1946 __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1947 __Pyx_GOTREF(__pyx_t_1);
1948 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1949 __pyx_r = __pyx_t_1;
1956 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":146
1957 * if parent is None:
1958 * return iter([self])
1959 * return etree.ElementChildIterator(parent, tag=self.tag) # <<<<<<<<<<<<<<
1961 * def __str__(self):
1963 __Pyx_XDECREF(__pyx_r);
1964 __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1965 __Pyx_GOTREF(__pyx_t_1);
1966 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1967 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1968 __Pyx_INCREF(__pyx_v_parent);
1969 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_parent);
1970 __Pyx_GIVEREF(__pyx_v_parent);
1971 __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1972 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
1973 __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1974 __Pyx_GOTREF(__pyx_t_5);
1975 if (PyDict_SetItem(__pyx_t_4, __pyx_n_ui_tag, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1976 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
1977 __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_1, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1978 __Pyx_GOTREF(__pyx_t_5);
1979 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1980 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1981 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
1982 __pyx_r = __pyx_t_5;
1986 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1989 __Pyx_XDECREF(__pyx_t_1);
1990 __Pyx_XDECREF(__pyx_t_2);
1991 __Pyx_XDECREF(__pyx_t_4);
1992 __Pyx_XDECREF(__pyx_t_5);
1993 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__iter__");
1996 __Pyx_DECREF(__pyx_v_parent);
1997 __Pyx_DECREF((PyObject *)__pyx_v_self);
1998 __Pyx_XGIVEREF(__pyx_r);
1999 __Pyx_FinishRefcountContext();
2003 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":148
2004 * return etree.ElementChildIterator(parent, tag=self.tag)
2006 * def __str__(self): # <<<<<<<<<<<<<<
2007 * if __RECURSIVE_STR:
2008 * return _dump(self, 0)
2011 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self); /*proto*/
2012 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__(PyObject *__pyx_v_self) {
2013 PyObject *__pyx_r = NULL;
2015 PyObject *__pyx_t_2 = NULL;
2016 PyObject *__pyx_t_3 = NULL;
2017 __Pyx_SetupRefcountContext("__str__");
2018 __Pyx_INCREF((PyObject *)__pyx_v_self);
2020 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":149
2022 * def __str__(self):
2023 * if __RECURSIVE_STR: # <<<<<<<<<<<<<<
2024 * return _dump(self, 0)
2027 __pyx_t_1 = __pyx_v_4lxml_9objectify___RECURSIVE_STR;
2030 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":150
2031 * def __str__(self):
2032 * if __RECURSIVE_STR:
2033 * return _dump(self, 0) # <<<<<<<<<<<<<<
2035 * return textOf(self._c_node) or u''
2037 __Pyx_XDECREF(__pyx_r);
2038 __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_self), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2039 __Pyx_GOTREF(__pyx_t_2);
2040 __pyx_r = __pyx_t_2;
2047 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":152
2048 * return _dump(self, 0)
2050 * return textOf(self._c_node) or u'' # <<<<<<<<<<<<<<
2054 __Pyx_XDECREF(__pyx_r);
2055 __pyx_t_2 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2056 __Pyx_GOTREF(__pyx_t_2);
2057 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2059 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2060 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
2061 __pyx_t_3 = __pyx_kp_u_4;
2063 __pyx_t_3 = __pyx_t_2;
2066 __pyx_r = __pyx_t_3;
2072 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2075 __Pyx_XDECREF(__pyx_t_2);
2076 __Pyx_XDECREF(__pyx_t_3);
2077 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__str__");
2080 __Pyx_DECREF((PyObject *)__pyx_v_self);
2081 __Pyx_XGIVEREF(__pyx_r);
2082 __Pyx_FinishRefcountContext();
2086 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":155
2089 * def __get__(self): # <<<<<<<<<<<<<<
2090 * return textOf(self._c_node)
2094 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(PyObject *__pyx_v_self); /*proto*/
2095 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(PyObject *__pyx_v_self) {
2096 PyObject *__pyx_r = NULL;
2097 PyObject *__pyx_t_1 = NULL;
2098 __Pyx_SetupRefcountContext("__get__");
2100 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":156
2102 * def __get__(self):
2103 * return textOf(self._c_node) # <<<<<<<<<<<<<<
2105 * property __dict__:
2107 __Pyx_XDECREF(__pyx_r);
2108 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2109 __Pyx_GOTREF(__pyx_t_1);
2110 __pyx_r = __pyx_t_1;
2114 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2117 __Pyx_XDECREF(__pyx_t_1);
2118 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.text.__get__");
2121 __Pyx_XGIVEREF(__pyx_r);
2122 __Pyx_FinishRefcountContext();
2126 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":163
2127 * Note that this only considers the first child with a given name.
2129 * def __get__(self): # <<<<<<<<<<<<<<
2131 * cdef char* c_child_ns
2134 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self); /*proto*/
2135 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(PyObject *__pyx_v_self) {
2137 struct LxmlElement *__pyx_v_child;
2138 PyObject *__pyx_v_children;
2139 PyObject *__pyx_v_tag;
2140 PyObject *__pyx_v_name;
2141 PyObject *__pyx_r = NULL;
2143 PyObject *__pyx_t_2 = NULL;
2144 PyObject *__pyx_t_3 = NULL;
2145 Py_ssize_t __pyx_t_4;
2146 PyObject *__pyx_t_5 = NULL;
2147 PyObject *__pyx_t_6 = NULL;
2148 __Pyx_SetupRefcountContext("__get__");
2149 __Pyx_INCREF((PyObject *)__pyx_v_self);
2150 __pyx_v_child = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
2151 __pyx_v_children = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
2152 __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
2153 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
2155 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":168
2156 * cdef _Element child
2157 * cdef dict children
2158 * c_ns = tree._getNs(self._c_node) # <<<<<<<<<<<<<<
2162 __pyx_v_c_ns = _getNs(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node);
2164 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":169
2165 * cdef dict children
2166 * c_ns = tree._getNs(self._c_node)
2167 * if c_ns is NULL: # <<<<<<<<<<<<<<
2171 __pyx_t_1 = (__pyx_v_c_ns == NULL);
2174 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":170
2175 * c_ns = tree._getNs(self._c_node)
2177 * tag = None # <<<<<<<<<<<<<<
2179 * tag = u"{%s}*" % pyunicode(c_ns)
2181 __Pyx_INCREF(Py_None);
2182 __Pyx_DECREF(__pyx_v_tag);
2183 __pyx_v_tag = Py_None;
2188 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":172
2191 * tag = u"{%s}*" % pyunicode(c_ns) # <<<<<<<<<<<<<<
2193 * for child in etree.ElementChildIterator(self, tag=tag):
2195 __pyx_t_2 = pyunicode(__pyx_v_c_ns); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2196 __Pyx_GOTREF(__pyx_t_2);
2197 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_5), __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2198 __Pyx_GOTREF(__pyx_t_3);
2199 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2200 __Pyx_DECREF(__pyx_v_tag);
2201 __pyx_v_tag = __pyx_t_3;
2206 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":173
2208 * tag = u"{%s}*" % pyunicode(c_ns)
2209 * children = {} # <<<<<<<<<<<<<<
2210 * for child in etree.ElementChildIterator(self, tag=tag):
2211 * if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2213 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2214 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2215 __Pyx_DECREF(((PyObject *)__pyx_v_children));
2216 __pyx_v_children = __pyx_t_3;
2219 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":174
2220 * tag = u"{%s}*" % pyunicode(c_ns)
2222 * for child in etree.ElementChildIterator(self, tag=tag): # <<<<<<<<<<<<<<
2223 * if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2226 __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2227 __Pyx_GOTREF(__pyx_t_3);
2228 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2229 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2230 __Pyx_INCREF(__pyx_v_self);
2231 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
2232 __Pyx_GIVEREF(__pyx_v_self);
2233 __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2234 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2235 if (PyDict_SetItem(__pyx_t_5, __pyx_n_ui_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2236 __pyx_t_6 = PyEval_CallObjectWithKeywords(__pyx_t_3, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2237 __Pyx_GOTREF(__pyx_t_6);
2238 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2239 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2240 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2241 if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
2242 __pyx_t_4 = 0; __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5);
2244 __pyx_t_4 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2245 __Pyx_GOTREF(__pyx_t_5);
2247 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2249 if (likely(PyList_CheckExact(__pyx_t_5))) {
2250 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break;
2251 __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
2252 } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
2253 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
2254 __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++;
2256 __pyx_t_6 = PyIter_Next(__pyx_t_5);
2258 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2261 __Pyx_GOTREF(__pyx_t_6);
2263 if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2264 __Pyx_DECREF(((PyObject *)__pyx_v_child));
2265 __pyx_v_child = ((struct LxmlElement *)__pyx_t_6);
2268 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":175
2270 * for child in etree.ElementChildIterator(self, tag=tag):
2271 * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: # <<<<<<<<<<<<<<
2273 * name = pyunicode(child._c_node.name)
2275 if ((__pyx_v_c_ns == NULL)) {
2276 __pyx_t_1 = (_getNs(__pyx_v_child->_c_node) != NULL);
2278 __pyx_t_1 = (__pyx_v_c_ns == NULL);
2282 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":176
2283 * for child in etree.ElementChildIterator(self, tag=tag):
2284 * if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2285 * continue # <<<<<<<<<<<<<<
2286 * name = pyunicode(child._c_node.name)
2287 * if python.PyDict_GetItem(children, name) is NULL:
2289 goto __pyx_L6_continue;
2294 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":177
2295 * if c_ns is NULL and tree._getNs(child._c_node) is not NULL:
2297 * name = pyunicode(child._c_node.name) # <<<<<<<<<<<<<<
2298 * if python.PyDict_GetItem(children, name) is NULL:
2299 * children[name] = child
2301 __pyx_t_6 = pyunicode(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2302 __Pyx_GOTREF(__pyx_t_6);
2303 __Pyx_DECREF(__pyx_v_name);
2304 __pyx_v_name = __pyx_t_6;
2307 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":178
2309 * name = pyunicode(child._c_node.name)
2310 * if python.PyDict_GetItem(children, name) is NULL: # <<<<<<<<<<<<<<
2311 * children[name] = child
2314 __pyx_t_1 = (PyDict_GetItem(((PyObject *)__pyx_v_children), __pyx_v_name) == NULL);
2317 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":179
2318 * name = pyunicode(child._c_node.name)
2319 * if python.PyDict_GetItem(children, name) is NULL:
2320 * children[name] = child # <<<<<<<<<<<<<<
2324 if (PyDict_SetItem(((PyObject *)__pyx_v_children), __pyx_v_name, ((PyObject *)__pyx_v_child)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2330 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2332 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":180
2333 * if python.PyDict_GetItem(children, name) is NULL:
2334 * children[name] = child
2335 * return children # <<<<<<<<<<<<<<
2337 * def __len__(self):
2339 __Pyx_XDECREF(__pyx_r);
2340 __Pyx_INCREF(((PyObject *)__pyx_v_children));
2341 __pyx_r = ((PyObject *)__pyx_v_children);
2344 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2347 __Pyx_XDECREF(__pyx_t_2);
2348 __Pyx_XDECREF(__pyx_t_3);
2349 __Pyx_XDECREF(__pyx_t_5);
2350 __Pyx_XDECREF(__pyx_t_6);
2351 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__dict__.__get__");
2354 __Pyx_DECREF((PyObject *)__pyx_v_child);
2355 __Pyx_DECREF(__pyx_v_children);
2356 __Pyx_DECREF(__pyx_v_tag);
2357 __Pyx_DECREF(__pyx_v_name);
2358 __Pyx_DECREF((PyObject *)__pyx_v_self);
2359 __Pyx_XGIVEREF(__pyx_r);
2360 __Pyx_FinishRefcountContext();
2364 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":182
2367 * def __len__(self): # <<<<<<<<<<<<<<
2368 * u"""Count self and siblings with the same tag.
2372 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self); /*proto*/
2373 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___len__[] = "Count self and siblings with the same tag.\n ";
2374 static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__(PyObject *__pyx_v_self) {
2376 __Pyx_SetupRefcountContext("__len__");
2378 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":185
2379 * u"""Count self and siblings with the same tag.
2381 * return _countSiblings(self._c_node) # <<<<<<<<<<<<<<
2383 * def countchildren(self):
2385 __pyx_r = __pyx_f_4lxml_9objectify__countSiblings(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node);
2390 __Pyx_FinishRefcountContext();
2394 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":187
2395 * return _countSiblings(self._c_node)
2397 * def countchildren(self): # <<<<<<<<<<<<<<
2398 * u"""countchildren(self)
2402 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2403 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren[] = "countchildren(self)\n\n Return the number of children of this element, regardless of their\n name.\n ";
2404 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren(PyObject *__pyx_v_self, PyObject *unused) {
2405 Py_ssize_t __pyx_v_c;
2406 xmlNode *__pyx_v_c_node;
2407 PyObject *__pyx_r = NULL;
2409 PyObject *__pyx_t_2 = NULL;
2410 __Pyx_SetupRefcountContext("countchildren");
2411 __Pyx_INCREF((PyObject *)__pyx_v_self);
2413 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":196
2415 * cdef tree.xmlNode* c_node
2416 * c = 0 # <<<<<<<<<<<<<<
2417 * c_node = self._c_node.children
2418 * while c_node is not NULL:
2422 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":197
2423 * cdef tree.xmlNode* c_node
2425 * c_node = self._c_node.children # <<<<<<<<<<<<<<
2426 * while c_node is not NULL:
2427 * if tree._isElement(c_node):
2429 __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;
2431 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":198
2433 * c_node = self._c_node.children
2434 * while c_node is not NULL: # <<<<<<<<<<<<<<
2435 * if tree._isElement(c_node):
2439 __pyx_t_1 = (__pyx_v_c_node != NULL);
2440 if (!__pyx_t_1) break;
2442 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":199
2443 * c_node = self._c_node.children
2444 * while c_node is not NULL:
2445 * if tree._isElement(c_node): # <<<<<<<<<<<<<<
2447 * c_node = c_node.next
2449 __pyx_t_1 = _isElement(__pyx_v_c_node);
2452 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":200
2453 * while c_node is not NULL:
2454 * if tree._isElement(c_node):
2455 * c = c + 1 # <<<<<<<<<<<<<<
2456 * c_node = c_node.next
2459 __pyx_v_c = (__pyx_v_c + 1);
2464 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":201
2465 * if tree._isElement(c_node):
2467 * c_node = c_node.next # <<<<<<<<<<<<<<
2471 __pyx_v_c_node = __pyx_v_c_node->next;
2474 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":202
2476 * c_node = c_node.next
2477 * return c # <<<<<<<<<<<<<<
2479 * def getchildren(self):
2481 __Pyx_XDECREF(__pyx_r);
2482 __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_c); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2483 __Pyx_GOTREF(__pyx_t_2);
2484 __pyx_r = __pyx_t_2;
2488 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2491 __Pyx_XDECREF(__pyx_t_2);
2492 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.countchildren");
2495 __Pyx_DECREF((PyObject *)__pyx_v_self);
2496 __Pyx_XGIVEREF(__pyx_r);
2497 __Pyx_FinishRefcountContext();
2501 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":204
2504 * def getchildren(self): # <<<<<<<<<<<<<<
2505 * u"""getchildren(self)
2509 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
2510 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren[] = "getchildren(self)\n\n Returns a sequence of all direct children. The elements are\n returned in document order.\n ";
2511 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren(PyObject *__pyx_v_self, PyObject *unused) {
2512 xmlNode *__pyx_v_c_node;
2513 PyObject *__pyx_v_result = 0;
2514 PyObject *__pyx_r = NULL;
2515 PyObject *__pyx_t_1 = NULL;
2518 __Pyx_SetupRefcountContext("getchildren");
2519 __Pyx_INCREF((PyObject *)__pyx_v_self);
2521 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":211
2523 * cdef tree.xmlNode* c_node
2524 * cdef list result = [] # <<<<<<<<<<<<<<
2525 * c_node = self._c_node.children
2526 * while c_node is not NULL:
2528 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2529 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2530 __pyx_v_result = __pyx_t_1;
2533 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":212
2534 * cdef tree.xmlNode* c_node
2535 * cdef list result = []
2536 * c_node = self._c_node.children # <<<<<<<<<<<<<<
2537 * while c_node is not NULL:
2538 * if tree._isElement(c_node):
2540 __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->children;
2542 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":213
2543 * cdef list result = []
2544 * c_node = self._c_node.children
2545 * while c_node is not NULL: # <<<<<<<<<<<<<<
2546 * if tree._isElement(c_node):
2547 * result.append(cetree.elementFactory(self._doc, c_node))
2550 __pyx_t_2 = (__pyx_v_c_node != NULL);
2551 if (!__pyx_t_2) break;
2553 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":214
2554 * c_node = self._c_node.children
2555 * while c_node is not NULL:
2556 * if tree._isElement(c_node): # <<<<<<<<<<<<<<
2557 * result.append(cetree.elementFactory(self._doc, c_node))
2558 * c_node = c_node.next
2560 __pyx_t_2 = _isElement(__pyx_v_c_node);
2563 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":215
2564 * while c_node is not NULL:
2565 * if tree._isElement(c_node):
2566 * result.append(cetree.elementFactory(self._doc, c_node)) # <<<<<<<<<<<<<<
2567 * c_node = c_node.next
2570 if (unlikely(__pyx_v_result == Py_None)) {
2571 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2573 __pyx_t_1 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2574 __Pyx_GOTREF(__pyx_t_1);
2575 __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_result), __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2576 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2581 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":216
2582 * if tree._isElement(c_node):
2583 * result.append(cetree.elementFactory(self._doc, c_node))
2584 * c_node = c_node.next # <<<<<<<<<<<<<<
2588 __pyx_v_c_node = __pyx_v_c_node->next;
2591 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":217
2592 * result.append(cetree.elementFactory(self._doc, c_node))
2593 * c_node = c_node.next
2594 * return result # <<<<<<<<<<<<<<
2596 * def __getattr__(self, tag):
2598 __Pyx_XDECREF(__pyx_r);
2599 __Pyx_INCREF(((PyObject *)__pyx_v_result));
2600 __pyx_r = ((PyObject *)__pyx_v_result);
2603 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2606 __Pyx_XDECREF(__pyx_t_1);
2607 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.getchildren");
2610 __Pyx_XDECREF(__pyx_v_result);
2611 __Pyx_DECREF((PyObject *)__pyx_v_self);
2612 __Pyx_XGIVEREF(__pyx_r);
2613 __Pyx_FinishRefcountContext();
2617 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":219
2620 * def __getattr__(self, tag): # <<<<<<<<<<<<<<
2621 * u"""Return the (first) child with the given tag name. If no namespace
2622 * is provided, the child will be looked up in the same one as self.
2625 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
2626 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___getattr__[] = "Return the (first) child with the given tag name. If no namespace\n is provided, the child will be looked up in the same one as self.\n ";
2627 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
2628 PyObject *__pyx_r = NULL;
2629 PyObject *__pyx_t_1 = NULL;
2630 PyObject *__pyx_t_2 = NULL;
2632 PyObject *__pyx_t_4 = NULL;
2633 __Pyx_SetupRefcountContext("__getattr__");
2634 __Pyx_INCREF((PyObject *)__pyx_v_self);
2635 __Pyx_INCREF(__pyx_v_tag);
2637 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":223
2638 * is provided, the child will be looked up in the same one as self.
2640 * if is_special_method(tag): # <<<<<<<<<<<<<<
2641 * return object.__getattr__(self, tag)
2642 * return _lookupChildOrRaise(self, tag)
2644 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2645 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2646 __Pyx_INCREF(__pyx_v_tag);
2647 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
2648 __Pyx_GIVEREF(__pyx_v_tag);
2649 __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_9objectify_is_special_method, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2650 __Pyx_GOTREF(__pyx_t_2);
2651 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2652 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2653 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2656 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":224
2658 * if is_special_method(tag):
2659 * return object.__getattr__(self, tag) # <<<<<<<<<<<<<<
2660 * return _lookupChildOrRaise(self, tag)
2663 __Pyx_XDECREF(__pyx_r);
2664 __pyx_t_2 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_ui___getattr__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2665 __Pyx_GOTREF(__pyx_t_2);
2666 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2667 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2668 __Pyx_INCREF(__pyx_v_self);
2669 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
2670 __Pyx_GIVEREF(__pyx_v_self);
2671 __Pyx_INCREF(__pyx_v_tag);
2672 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tag);
2673 __Pyx_GIVEREF(__pyx_v_tag);
2674 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2675 __Pyx_GOTREF(__pyx_t_4);
2676 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2677 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2678 __pyx_r = __pyx_t_4;
2685 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":225
2686 * if is_special_method(tag):
2687 * return object.__getattr__(self, tag)
2688 * return _lookupChildOrRaise(self, tag) # <<<<<<<<<<<<<<
2690 * def __setattr__(self, tag, value):
2692 __Pyx_XDECREF(__pyx_r);
2693 __pyx_t_4 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2694 __Pyx_GOTREF(__pyx_t_4);
2695 __pyx_r = __pyx_t_4;
2699 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2702 __Pyx_XDECREF(__pyx_t_1);
2703 __Pyx_XDECREF(__pyx_t_2);
2704 __Pyx_XDECREF(__pyx_t_4);
2705 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getattr__");
2708 __Pyx_DECREF((PyObject *)__pyx_v_self);
2709 __Pyx_DECREF(__pyx_v_tag);
2710 __Pyx_XGIVEREF(__pyx_r);
2711 __Pyx_FinishRefcountContext();
2715 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":227
2716 * return _lookupChildOrRaise(self, tag)
2718 * def __setattr__(self, tag, value): # <<<<<<<<<<<<<<
2719 * u"""Set the value of the (first) child with the given tag name. If no
2720 * namespace is provided, the child will be looked up in the same one as
2723 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value); /*proto*/
2724 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___setattr__[] = "Set the value of the (first) child with the given tag name. If no\n namespace is provided, the child will be looked up in the same one as\n self.\n ";
2725 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
2726 struct LxmlElement *__pyx_v_element;
2728 PyObject *__pyx_t_1 = NULL;
2732 PyObject *__pyx_t_5 = NULL;
2734 PyObject *__pyx_t_7 = NULL;
2735 __Pyx_SetupRefcountContext("__setattr__");
2736 __Pyx_INCREF((PyObject *)__pyx_v_self);
2737 __Pyx_INCREF(__pyx_v_tag);
2738 __Pyx_INCREF(__pyx_v_value);
2739 __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
2741 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":234
2742 * cdef _Element element
2743 * # properties are looked up /after/ __setattr__, so we must emulate them
2744 * if tag == u'text' or tag == u'pyval': # <<<<<<<<<<<<<<
2746 * raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
2748 __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_text), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2749 __Pyx_GOTREF(__pyx_t_1);
2750 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2751 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2753 __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_pyval), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2754 __Pyx_GOTREF(__pyx_t_1);
2755 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2756 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2757 __pyx_t_4 = __pyx_t_3;
2759 __pyx_t_4 = __pyx_t_2;
2763 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":237
2765 * raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
2766 * (tag, _typename(self)) # <<<<<<<<<<<<<<
2767 * elif tag == u'tail':
2768 * cetree.setTailText(self._c_node, value)
2770 __pyx_t_1 = __pyx_f_4lxml_9objectify__typename(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2771 __Pyx_GOTREF(__pyx_t_1);
2772 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2773 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2774 __Pyx_INCREF(__pyx_v_tag);
2775 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_tag);
2776 __Pyx_GIVEREF(__pyx_v_tag);
2777 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
2778 __Pyx_GIVEREF(__pyx_t_1);
2780 __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_6), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2781 __Pyx_GOTREF(__pyx_t_1);
2782 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2783 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_1, 0);
2784 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2785 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2789 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":238
2790 * raise TypeError, u"attribute '%s' of '%s' objects is not writable" % \
2791 * (tag, _typename(self))
2792 * elif tag == u'tail': # <<<<<<<<<<<<<<
2793 * cetree.setTailText(self._c_node, value)
2796 __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_tail), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2797 __Pyx_GOTREF(__pyx_t_1);
2798 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2799 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2802 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":239
2803 * (tag, _typename(self))
2804 * elif tag == u'tail':
2805 * cetree.setTailText(self._c_node, value) # <<<<<<<<<<<<<<
2807 * elif tag == u'tag':
2809 __pyx_t_6 = setTailText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node, __pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2811 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":240
2812 * elif tag == u'tail':
2813 * cetree.setTailText(self._c_node, value)
2814 * return # <<<<<<<<<<<<<<
2815 * elif tag == u'tag':
2816 * ElementBase.tag.__set__(self, value)
2823 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":241
2824 * cetree.setTailText(self._c_node, value)
2826 * elif tag == u'tag': # <<<<<<<<<<<<<<
2827 * ElementBase.tag.__set__(self, value)
2830 __pyx_t_1 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_tag), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2831 __Pyx_GOTREF(__pyx_t_1);
2832 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2833 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2836 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":242
2838 * elif tag == u'tag':
2839 * ElementBase.tag.__set__(self, value) # <<<<<<<<<<<<<<
2841 * elif tag == u'base':
2843 __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic_ElementBase)), __pyx_n_ui_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2844 __Pyx_GOTREF(__pyx_t_1);
2845 __pyx_t_5 = PyObject_GetAttr(__pyx_t_1, __pyx_n_ui___set__); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2846 __Pyx_GOTREF(__pyx_t_5);
2847 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2848 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2849 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2850 __Pyx_INCREF(__pyx_v_self);
2851 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
2852 __Pyx_GIVEREF(__pyx_v_self);
2853 __Pyx_INCREF(__pyx_v_value);
2854 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value);
2855 __Pyx_GIVEREF(__pyx_v_value);
2856 __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2857 __Pyx_GOTREF(__pyx_t_7);
2858 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2859 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2860 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2862 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":243
2863 * elif tag == u'tag':
2864 * ElementBase.tag.__set__(self, value)
2865 * return # <<<<<<<<<<<<<<
2866 * elif tag == u'base':
2867 * ElementBase.base.__set__(self, value)
2874 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":244
2875 * ElementBase.tag.__set__(self, value)
2877 * elif tag == u'base': # <<<<<<<<<<<<<<
2878 * ElementBase.base.__set__(self, value)
2881 __pyx_t_7 = PyObject_RichCompare(__pyx_v_tag, ((PyObject *)__pyx_n_u_base), Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2882 __Pyx_GOTREF(__pyx_t_7);
2883 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2884 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2887 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":245
2889 * elif tag == u'base':
2890 * ElementBase.base.__set__(self, value) # <<<<<<<<<<<<<<
2892 * tag = _buildChildTag(self, tag)
2894 __pyx_t_7 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic_ElementBase)), __pyx_n_ui_base); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2895 __Pyx_GOTREF(__pyx_t_7);
2896 __pyx_t_1 = PyObject_GetAttr(__pyx_t_7, __pyx_n_ui___set__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2897 __Pyx_GOTREF(__pyx_t_1);
2898 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2899 __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2900 __Pyx_GOTREF(((PyObject *)__pyx_t_7));
2901 __Pyx_INCREF(__pyx_v_self);
2902 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_self);
2903 __Pyx_GIVEREF(__pyx_v_self);
2904 __Pyx_INCREF(__pyx_v_value);
2905 PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_value);
2906 __Pyx_GIVEREF(__pyx_v_value);
2907 __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2908 __Pyx_GOTREF(__pyx_t_5);
2909 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2910 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
2911 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2913 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":246
2914 * elif tag == u'base':
2915 * ElementBase.base.__set__(self, value)
2916 * return # <<<<<<<<<<<<<<
2917 * tag = _buildChildTag(self, tag)
2918 * element = _lookupChild(self, tag)
2926 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":247
2927 * ElementBase.base.__set__(self, value)
2929 * tag = _buildChildTag(self, tag) # <<<<<<<<<<<<<<
2930 * element = _lookupChild(self, tag)
2931 * if element is None:
2933 __pyx_t_5 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2934 __Pyx_GOTREF(__pyx_t_5);
2935 __Pyx_DECREF(__pyx_v_tag);
2936 __pyx_v_tag = __pyx_t_5;
2939 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":248
2941 * tag = _buildChildTag(self, tag)
2942 * element = _lookupChild(self, tag) # <<<<<<<<<<<<<<
2943 * if element is None:
2944 * _appendValue(self, tag, value)
2946 __pyx_t_5 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2947 __Pyx_GOTREF(__pyx_t_5);
2948 if (!(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2949 __Pyx_DECREF(((PyObject *)__pyx_v_element));
2950 __pyx_v_element = ((struct LxmlElement *)__pyx_t_5);
2953 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":249
2954 * tag = _buildChildTag(self, tag)
2955 * element = _lookupChild(self, tag)
2956 * if element is None: # <<<<<<<<<<<<<<
2957 * _appendValue(self, tag, value)
2960 __pyx_t_4 = (((PyObject *)__pyx_v_element) == Py_None);
2963 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":250
2964 * element = _lookupChild(self, tag)
2965 * if element is None:
2966 * _appendValue(self, tag, value) # <<<<<<<<<<<<<<
2968 * _replaceElement(element, value)
2970 __pyx_t_5 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag, __pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2971 __Pyx_GOTREF(__pyx_t_5);
2972 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2977 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":252
2978 * _appendValue(self, tag, value)
2980 * _replaceElement(element, value) # <<<<<<<<<<<<<<
2982 * def __delattr__(self, tag):
2984 __pyx_t_5 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2985 __Pyx_GOTREF(__pyx_t_5);
2986 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2993 __Pyx_XDECREF(__pyx_t_1);
2994 __Pyx_XDECREF(__pyx_t_5);
2995 __Pyx_XDECREF(__pyx_t_7);
2996 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setattr__");
2999 __Pyx_DECREF((PyObject *)__pyx_v_element);
3000 __Pyx_DECREF((PyObject *)__pyx_v_self);
3001 __Pyx_DECREF(__pyx_v_tag);
3002 __Pyx_DECREF(__pyx_v_value);
3003 __Pyx_FinishRefcountContext();
3007 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":254
3008 * _replaceElement(element, value)
3010 * def __delattr__(self, tag): # <<<<<<<<<<<<<<
3011 * child = _lookupChildOrRaise(self, tag)
3012 * self.remove(child)
3015 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
3016 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
3017 PyObject *__pyx_v_child;
3019 PyObject *__pyx_t_1 = NULL;
3020 PyObject *__pyx_t_2 = NULL;
3021 PyObject *__pyx_t_3 = NULL;
3022 __Pyx_SetupRefcountContext("__delattr__");
3023 __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);
3025 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":255
3027 * def __delattr__(self, tag):
3028 * child = _lookupChildOrRaise(self, tag) # <<<<<<<<<<<<<<
3029 * self.remove(child)
3032 __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3033 __Pyx_GOTREF(__pyx_t_1);
3034 __Pyx_DECREF(__pyx_v_child);
3035 __pyx_v_child = __pyx_t_1;
3038 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":256
3039 * def __delattr__(self, tag):
3040 * child = _lookupChildOrRaise(self, tag)
3041 * self.remove(child) # <<<<<<<<<<<<<<
3043 * def addattr(self, tag, value):
3045 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3046 __Pyx_GOTREF(__pyx_t_1);
3047 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3048 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3049 __Pyx_INCREF(__pyx_v_child);
3050 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_child);
3051 __Pyx_GIVEREF(__pyx_v_child);
3052 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3053 __Pyx_GOTREF(__pyx_t_3);
3054 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3055 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3056 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3061 __Pyx_XDECREF(__pyx_t_1);
3062 __Pyx_XDECREF(__pyx_t_2);
3063 __Pyx_XDECREF(__pyx_t_3);
3064 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delattr__");
3067 __Pyx_DECREF(__pyx_v_child);
3068 __Pyx_FinishRefcountContext();
3072 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":258
3073 * self.remove(child)
3075 * def addattr(self, tag, value): # <<<<<<<<<<<<<<
3076 * u"""addattr(self, tag, value)
3080 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3081 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr[] = "addattr(self, tag, value)\n\n Add a child value to the element.\n\n As opposed to append(), it sets a data value, not an element.\n ";
3082 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3083 PyObject *__pyx_v_tag = 0;
3084 PyObject *__pyx_v_value = 0;
3085 PyObject *__pyx_r = NULL;
3086 PyObject *__pyx_t_1 = NULL;
3087 PyObject *__pyx_t_2 = NULL;
3088 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_tag,&__pyx_n_ui_value,0};
3089 __Pyx_SetupRefcountContext("addattr");
3090 if (unlikely(__pyx_kwds)) {
3091 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
3092 PyObject* values[2] = {0,0};
3093 switch (PyTuple_GET_SIZE(__pyx_args)) {
3094 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
3095 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3097 default: goto __pyx_L5_argtuple_error;
3099 switch (PyTuple_GET_SIZE(__pyx_args)) {
3101 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_tag);
3102 if (likely(values[0])) kw_args--;
3103 else goto __pyx_L5_argtuple_error;
3105 values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_value);
3106 if (likely(values[1])) kw_args--;
3108 __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3111 if (unlikely(kw_args > 0)) {
3112 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "addattr") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3114 __pyx_v_tag = values[0];
3115 __pyx_v_value = values[1];
3116 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
3117 goto __pyx_L5_argtuple_error;
3119 __pyx_v_tag = PyTuple_GET_ITEM(__pyx_args, 0);
3120 __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
3122 goto __pyx_L4_argument_unpacking_done;
3123 __pyx_L5_argtuple_error:;
3124 __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
3126 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr");
3128 __pyx_L4_argument_unpacking_done:;
3130 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":265
3131 * As opposed to append(), it sets a data value, not an element.
3133 * _appendValue(self, _buildChildTag(self, tag), value) # <<<<<<<<<<<<<<
3135 * def __getitem__(self, key):
3137 __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3138 __Pyx_GOTREF(__pyx_t_1);
3139 __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_t_1, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3140 __Pyx_GOTREF(__pyx_t_2);
3141 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3142 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3144 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3147 __Pyx_XDECREF(__pyx_t_1);
3148 __Pyx_XDECREF(__pyx_t_2);
3149 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.addattr");
3152 __Pyx_XGIVEREF(__pyx_r);
3153 __Pyx_FinishRefcountContext();
3157 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":267
3158 * _appendValue(self, _buildChildTag(self, tag), value)
3160 * def __getitem__(self, key): # <<<<<<<<<<<<<<
3161 * u"""Return a sibling, counting from the first child of the parent. The
3162 * method behaves like both a dict and a sequence.
3165 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
3166 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___getitem__[] = "Return a sibling, counting from the first child of the parent. The\n method behaves like both a dict and a sequence.\n\n * If argument is an integer, returns the sibling at that position.\n\n * If argument is a string, does the same as getattr(). This can be\n used to provide namespaces for element lookup, or to look up\n children with special names (``text`` etc.).\n\n * If argument is a slice object, returns the matching slice.\n ";
3167 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
3168 xmlNode *__pyx_v_c_self_node;
3169 xmlNode *__pyx_v_c_parent;
3170 xmlNode *__pyx_v_c_node;
3171 PyObject *__pyx_r = NULL;
3173 PyObject *__pyx_t_2 = NULL;
3174 PyObject *__pyx_t_3 = NULL;
3175 Py_ssize_t __pyx_t_4;
3176 __Pyx_SetupRefcountContext("__getitem__");
3177 __Pyx_INCREF((PyObject *)__pyx_v_self);
3178 __Pyx_INCREF(__pyx_v_key);
3180 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":283
3181 * cdef tree.xmlNode* c_node
3182 * cdef Py_ssize_t start, stop, step, slicelength
3183 * if python._isString(key): # <<<<<<<<<<<<<<
3184 * return _lookupChildOrRaise(self, key)
3185 * elif python.PySlice_Check(key):
3187 __pyx_t_1 = _isString(__pyx_v_key);
3190 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":284
3191 * cdef Py_ssize_t start, stop, step, slicelength
3192 * if python._isString(key):
3193 * return _lookupChildOrRaise(self, key) # <<<<<<<<<<<<<<
3194 * elif python.PySlice_Check(key):
3195 * return list(self)[key]
3197 __Pyx_XDECREF(__pyx_r);
3198 __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChildOrRaise(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3199 __Pyx_GOTREF(__pyx_t_2);
3200 __pyx_r = __pyx_t_2;
3206 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":285
3207 * if python._isString(key):
3208 * return _lookupChildOrRaise(self, key)
3209 * elif python.PySlice_Check(key): # <<<<<<<<<<<<<<
3210 * return list(self)[key]
3211 * # normal item access
3213 __pyx_t_1 = PySlice_Check(__pyx_v_key);
3216 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":286
3217 * return _lookupChildOrRaise(self, key)
3218 * elif python.PySlice_Check(key):
3219 * return list(self)[key] # <<<<<<<<<<<<<<
3220 * # normal item access
3221 * c_self_node = self._c_node
3223 __Pyx_XDECREF(__pyx_r);
3224 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3225 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3226 __Pyx_INCREF(__pyx_v_self);
3227 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
3228 __Pyx_GIVEREF(__pyx_v_self);
3229 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3230 __Pyx_GOTREF(__pyx_t_3);
3231 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3232 __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3233 __Pyx_GOTREF(__pyx_t_2);
3234 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3235 __pyx_r = __pyx_t_2;
3242 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":288
3243 * return list(self)[key]
3244 * # normal item access
3245 * c_self_node = self._c_node # <<<<<<<<<<<<<<
3246 * c_parent = c_self_node.parent
3247 * if c_parent is NULL:
3249 __pyx_v_c_self_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node;
3251 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":289
3252 * # normal item access
3253 * c_self_node = self._c_node
3254 * c_parent = c_self_node.parent # <<<<<<<<<<<<<<
3255 * if c_parent is NULL:
3258 __pyx_v_c_parent = __pyx_v_c_self_node->parent;
3260 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":290
3261 * c_self_node = self._c_node
3262 * c_parent = c_self_node.parent
3263 * if c_parent is NULL: # <<<<<<<<<<<<<<
3267 __pyx_t_1 = (__pyx_v_c_parent == NULL);
3270 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":291
3271 * c_parent = c_self_node.parent
3272 * if c_parent is NULL:
3273 * if key == 0: # <<<<<<<<<<<<<<
3277 __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_EQ); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3278 __Pyx_GOTREF(__pyx_t_2);
3279 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3280 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3283 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":292
3284 * if c_parent is NULL:
3286 * return self # <<<<<<<<<<<<<<
3288 * raise IndexError, unicode(key)
3290 __Pyx_XDECREF(__pyx_r);
3291 __Pyx_INCREF(__pyx_v_self);
3292 __pyx_r = __pyx_v_self;
3298 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":294
3301 * raise IndexError, unicode(key) # <<<<<<<<<<<<<<
3303 * c_node = c_parent.last
3305 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3306 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3307 __Pyx_INCREF(__pyx_v_key);
3308 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
3309 __Pyx_GIVEREF(__pyx_v_key);
3310 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3311 __Pyx_GOTREF(__pyx_t_3);
3312 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3313 __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0);
3314 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3315 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3322 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":295
3324 * raise IndexError, unicode(key)
3325 * if key < 0: # <<<<<<<<<<<<<<
3326 * c_node = c_parent.last
3329 __pyx_t_3 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3330 __Pyx_GOTREF(__pyx_t_3);
3331 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3332 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3335 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":296
3336 * raise IndexError, unicode(key)
3338 * c_node = c_parent.last # <<<<<<<<<<<<<<
3340 * c_node = c_parent.children
3342 __pyx_v_c_node = __pyx_v_c_parent->last;
3347 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":298
3348 * c_node = c_parent.last
3350 * c_node = c_parent.children # <<<<<<<<<<<<<<
3351 * c_node = _findFollowingSibling(
3352 * c_node, tree._getNs(c_self_node), c_self_node.name, key)
3354 __pyx_v_c_node = __pyx_v_c_parent->children;
3358 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":300
3359 * c_node = c_parent.children
3360 * c_node = _findFollowingSibling(
3361 * c_node, tree._getNs(c_self_node), c_self_node.name, key) # <<<<<<<<<<<<<<
3362 * if c_node is NULL:
3363 * raise IndexError, unicode(key)
3365 __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3366 __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_c_self_node), __pyx_v_c_self_node->name, __pyx_t_4);
3368 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":301
3369 * c_node = _findFollowingSibling(
3370 * c_node, tree._getNs(c_self_node), c_self_node.name, key)
3371 * if c_node is NULL: # <<<<<<<<<<<<<<
3372 * raise IndexError, unicode(key)
3373 * return elementFactory(self._doc, c_node)
3375 __pyx_t_1 = (__pyx_v_c_node == NULL);
3378 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":302
3379 * c_node, tree._getNs(c_self_node), c_self_node.name, key)
3380 * if c_node is NULL:
3381 * raise IndexError, unicode(key) # <<<<<<<<<<<<<<
3382 * return elementFactory(self._doc, c_node)
3385 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3386 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
3387 __Pyx_INCREF(__pyx_v_key);
3388 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
3389 __Pyx_GIVEREF(__pyx_v_key);
3390 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3391 __Pyx_GOTREF(__pyx_t_2);
3392 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
3393 __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_2, 0);
3394 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3395 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3400 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":303
3401 * if c_node is NULL:
3402 * raise IndexError, unicode(key)
3403 * return elementFactory(self._doc, c_node) # <<<<<<<<<<<<<<
3405 * def __setitem__(self, key, value):
3407 __Pyx_XDECREF(__pyx_r);
3408 __pyx_t_2 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3409 __Pyx_GOTREF(__pyx_t_2);
3410 __pyx_r = __pyx_t_2;
3414 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3417 __Pyx_XDECREF(__pyx_t_2);
3418 __Pyx_XDECREF(__pyx_t_3);
3419 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__getitem__");
3422 __Pyx_DECREF((PyObject *)__pyx_v_self);
3423 __Pyx_DECREF(__pyx_v_key);
3424 __Pyx_XGIVEREF(__pyx_r);
3425 __Pyx_FinishRefcountContext();
3429 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":305
3430 * return elementFactory(self._doc, c_node)
3432 * def __setitem__(self, key, value): # <<<<<<<<<<<<<<
3433 * u"""Set the value of a sibling, counting from the first child of the
3434 * parent. Implements key assignment, item assignment and slice
3437 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
3438 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement___setitem__[] = "Set the value of a sibling, counting from the first child of the\n parent. Implements key assignment, item assignment and slice\n assignment.\n\n * If argument is an integer, sets the sibling at that position.\n\n * If argument is a string, does the same as setattr(). This is used\n to provide namespaces for element lookup.\n\n * If argument is a sequence (list, tuple, etc.), assign the contained\n items to the siblings.\n ";
3439 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
3440 struct LxmlElement *__pyx_v_element;
3441 xmlNode *__pyx_v_c_node;
3444 PyObject *__pyx_t_2 = NULL;
3445 Py_ssize_t __pyx_t_3;
3446 PyObject *__pyx_t_4 = NULL;
3447 __Pyx_SetupRefcountContext("__setitem__");
3448 __Pyx_INCREF((PyObject *)__pyx_v_self);
3449 __Pyx_INCREF(__pyx_v_key);
3450 __Pyx_INCREF(__pyx_v_value);
3451 __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
3453 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":320
3454 * cdef _Element element
3455 * cdef tree.xmlNode* c_node
3456 * if python._isString(key): # <<<<<<<<<<<<<<
3457 * key = _buildChildTag(self, key)
3458 * element = _lookupChild(self, key)
3460 __pyx_t_1 = _isString(__pyx_v_key);
3463 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":321
3464 * cdef tree.xmlNode* c_node
3465 * if python._isString(key):
3466 * key = _buildChildTag(self, key) # <<<<<<<<<<<<<<
3467 * element = _lookupChild(self, key)
3468 * if element is None:
3470 __pyx_t_2 = __pyx_f_4lxml_9objectify__buildChildTag(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3471 __Pyx_GOTREF(__pyx_t_2);
3472 __Pyx_DECREF(__pyx_v_key);
3473 __pyx_v_key = __pyx_t_2;
3476 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":322
3477 * if python._isString(key):
3478 * key = _buildChildTag(self, key)
3479 * element = _lookupChild(self, key) # <<<<<<<<<<<<<<
3480 * if element is None:
3481 * _appendValue(self, key, value)
3483 __pyx_t_2 = __pyx_f_4lxml_9objectify__lookupChild(((struct LxmlElement *)__pyx_v_self), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3484 __Pyx_GOTREF(__pyx_t_2);
3485 if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3486 __Pyx_DECREF(((PyObject *)__pyx_v_element));
3487 __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
3490 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":323
3491 * key = _buildChildTag(self, key)
3492 * element = _lookupChild(self, key)
3493 * if element is None: # <<<<<<<<<<<<<<
3494 * _appendValue(self, key, value)
3497 __pyx_t_1 = (((PyObject *)__pyx_v_element) == Py_None);
3500 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":324
3501 * element = _lookupChild(self, key)
3502 * if element is None:
3503 * _appendValue(self, key, value) # <<<<<<<<<<<<<<
3505 * _replaceElement(element, value)
3507 __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_v_self), __pyx_v_key, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3508 __Pyx_GOTREF(__pyx_t_2);
3509 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3514 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":326
3515 * _appendValue(self, key, value)
3517 * _replaceElement(element, value) # <<<<<<<<<<<<<<
3521 __pyx_t_2 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3522 __Pyx_GOTREF(__pyx_t_2);
3523 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3527 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":327
3529 * _replaceElement(element, value)
3530 * return # <<<<<<<<<<<<<<
3532 * if self._c_node.parent is NULL:
3540 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":329
3543 * if self._c_node.parent is NULL: # <<<<<<<<<<<<<<
3544 * # the 'root[i] = ...' case
3545 * raise TypeError, u"assignment to root element is invalid"
3547 __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent == NULL);
3550 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":331
3551 * if self._c_node.parent is NULL:
3552 * # the 'root[i] = ...' case
3553 * raise TypeError, u"assignment to root element is invalid" # <<<<<<<<<<<<<<
3555 * if python.PySlice_Check(key):
3557 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_7), 0);
3558 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3563 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":333
3564 * raise TypeError, u"assignment to root element is invalid"
3566 * if python.PySlice_Check(key): # <<<<<<<<<<<<<<
3567 * # slice assignment
3568 * _setSlice(key, self, value)
3570 __pyx_t_1 = PySlice_Check(__pyx_v_key);
3573 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":335
3574 * if python.PySlice_Check(key):
3575 * # slice assignment
3576 * _setSlice(key, self, value) # <<<<<<<<<<<<<<
3578 * # normal index assignment
3580 __pyx_t_2 = __pyx_f_4lxml_9objectify__setSlice(__pyx_v_key, ((struct LxmlElement *)__pyx_v_self), __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3581 __Pyx_GOTREF(__pyx_t_2);
3582 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3587 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":338
3589 * # normal index assignment
3590 * if key < 0: # <<<<<<<<<<<<<<
3591 * c_node = self._c_node.parent.last
3594 __pyx_t_2 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_LT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3595 __Pyx_GOTREF(__pyx_t_2);
3596 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3597 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3600 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":339
3601 * # normal index assignment
3603 * c_node = self._c_node.parent.last # <<<<<<<<<<<<<<
3605 * c_node = self._c_node.parent.children
3607 __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent->last;
3612 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":341
3613 * c_node = self._c_node.parent.last
3615 * c_node = self._c_node.parent.children # <<<<<<<<<<<<<<
3616 * c_node = _findFollowingSibling(
3617 * c_node, tree._getNs(self._c_node), self._c_node.name, key)
3619 __pyx_v_c_node = ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->parent->children;
3623 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":343
3624 * c_node = self._c_node.parent.children
3625 * c_node = _findFollowingSibling(
3626 * c_node, tree._getNs(self._c_node), self._c_node.name, key) # <<<<<<<<<<<<<<
3627 * if c_node is NULL:
3628 * raise IndexError, unicode(key)
3630 __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_key); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3631 __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node), ((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node->name, __pyx_t_3);
3633 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":344
3634 * c_node = _findFollowingSibling(
3635 * c_node, tree._getNs(self._c_node), self._c_node.name, key)
3636 * if c_node is NULL: # <<<<<<<<<<<<<<
3637 * raise IndexError, unicode(key)
3638 * element = elementFactory(self._doc, c_node)
3640 __pyx_t_1 = (__pyx_v_c_node == NULL);
3643 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":345
3644 * c_node, tree._getNs(self._c_node), self._c_node.name, key)
3645 * if c_node is NULL:
3646 * raise IndexError, unicode(key) # <<<<<<<<<<<<<<
3647 * element = elementFactory(self._doc, c_node)
3648 * _replaceElement(element, value)
3650 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3651 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3652 __Pyx_INCREF(__pyx_v_key);
3653 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
3654 __Pyx_GIVEREF(__pyx_v_key);
3655 __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3656 __Pyx_GOTREF(__pyx_t_4);
3657 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3658 __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_4, 0);
3659 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3660 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3665 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":346
3666 * if c_node is NULL:
3667 * raise IndexError, unicode(key)
3668 * element = elementFactory(self._doc, c_node) # <<<<<<<<<<<<<<
3669 * _replaceElement(element, value)
3672 __pyx_t_4 = ((PyObject *)elementFactory(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3673 __Pyx_GOTREF(__pyx_t_4);
3674 __Pyx_DECREF(((PyObject *)__pyx_v_element));
3675 __pyx_v_element = ((struct LxmlElement *)__pyx_t_4);
3678 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":347
3679 * raise IndexError, unicode(key)
3680 * element = elementFactory(self._doc, c_node)
3681 * _replaceElement(element, value) # <<<<<<<<<<<<<<
3683 * def __delitem__(self, key):
3685 __pyx_t_4 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3686 __Pyx_GOTREF(__pyx_t_4);
3687 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3694 __Pyx_XDECREF(__pyx_t_2);
3695 __Pyx_XDECREF(__pyx_t_4);
3696 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__setitem__");
3699 __Pyx_DECREF((PyObject *)__pyx_v_element);
3700 __Pyx_DECREF((PyObject *)__pyx_v_self);
3701 __Pyx_DECREF(__pyx_v_key);
3702 __Pyx_DECREF(__pyx_v_value);
3703 __Pyx_FinishRefcountContext();
3707 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":349
3708 * _replaceElement(element, value)
3710 * def __delitem__(self, key): # <<<<<<<<<<<<<<
3711 * cdef Py_ssize_t start, stop, step, slicelength
3712 * parent = self.getparent()
3715 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
3716 static int __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
3717 PyObject *__pyx_v_parent;
3718 PyObject *__pyx_v_del_items;
3719 PyObject *__pyx_v_remove;
3720 PyObject *__pyx_v_el;
3721 PyObject *__pyx_v_sibling;
3723 PyObject *__pyx_t_1 = NULL;
3724 PyObject *__pyx_t_2 = NULL;
3726 Py_ssize_t __pyx_t_4;
3727 PyObject *__pyx_t_5 = NULL;
3728 __Pyx_SetupRefcountContext("__delitem__");
3729 __Pyx_INCREF((PyObject *)__pyx_v_self);
3730 __Pyx_INCREF(__pyx_v_key);
3731 __pyx_v_parent = Py_None; __Pyx_INCREF(Py_None);
3732 __pyx_v_del_items = Py_None; __Pyx_INCREF(Py_None);
3733 __pyx_v_remove = Py_None; __Pyx_INCREF(Py_None);
3734 __pyx_v_el = Py_None; __Pyx_INCREF(Py_None);
3735 __pyx_v_sibling = Py_None; __Pyx_INCREF(Py_None);
3737 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":351
3738 * def __delitem__(self, key):
3739 * cdef Py_ssize_t start, stop, step, slicelength
3740 * parent = self.getparent() # <<<<<<<<<<<<<<
3741 * if parent is None:
3742 * raise TypeError, u"deleting items not supported by root element"
3744 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_getparent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3745 __Pyx_GOTREF(__pyx_t_1);
3746 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3747 __Pyx_GOTREF(__pyx_t_2);
3748 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3749 __Pyx_DECREF(__pyx_v_parent);
3750 __pyx_v_parent = __pyx_t_2;
3753 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":352
3754 * cdef Py_ssize_t start, stop, step, slicelength
3755 * parent = self.getparent()
3756 * if parent is None: # <<<<<<<<<<<<<<
3757 * raise TypeError, u"deleting items not supported by root element"
3758 * if python.PySlice_Check(key):
3760 __pyx_t_3 = (__pyx_v_parent == Py_None);
3763 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":353
3764 * parent = self.getparent()
3765 * if parent is None:
3766 * raise TypeError, u"deleting items not supported by root element" # <<<<<<<<<<<<<<
3767 * if python.PySlice_Check(key):
3770 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_8), 0);
3771 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3776 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":354
3777 * if parent is None:
3778 * raise TypeError, u"deleting items not supported by root element"
3779 * if python.PySlice_Check(key): # <<<<<<<<<<<<<<
3781 * del_items = list(self)[key]
3783 __pyx_t_3 = PySlice_Check(__pyx_v_key);
3786 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":356
3787 * if python.PySlice_Check(key):
3789 * del_items = list(self)[key] # <<<<<<<<<<<<<<
3790 * remove = parent.remove
3791 * for el in del_items:
3793 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3794 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3795 __Pyx_INCREF(__pyx_v_self);
3796 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
3797 __Pyx_GIVEREF(__pyx_v_self);
3798 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3799 __Pyx_GOTREF(__pyx_t_1);
3800 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3801 __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3802 __Pyx_GOTREF(__pyx_t_2);
3803 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3804 __Pyx_DECREF(__pyx_v_del_items);
3805 __pyx_v_del_items = __pyx_t_2;
3808 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":357
3810 * del_items = list(self)[key]
3811 * remove = parent.remove # <<<<<<<<<<<<<<
3812 * for el in del_items:
3815 __pyx_t_2 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_ui_remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3816 __Pyx_GOTREF(__pyx_t_2);
3817 __Pyx_DECREF(__pyx_v_remove);
3818 __pyx_v_remove = __pyx_t_2;
3821 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":358
3822 * del_items = list(self)[key]
3823 * remove = parent.remove
3824 * for el in del_items: # <<<<<<<<<<<<<<
3828 if (PyList_CheckExact(__pyx_v_del_items) || PyTuple_CheckExact(__pyx_v_del_items)) {
3829 __pyx_t_4 = 0; __pyx_t_2 = __pyx_v_del_items; __Pyx_INCREF(__pyx_t_2);
3831 __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_del_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3832 __Pyx_GOTREF(__pyx_t_2);
3835 if (likely(PyList_CheckExact(__pyx_t_2))) {
3836 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
3837 __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
3838 } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
3839 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
3840 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++;
3842 __pyx_t_1 = PyIter_Next(__pyx_t_2);
3844 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3847 __Pyx_GOTREF(__pyx_t_1);
3849 __Pyx_DECREF(__pyx_v_el);
3850 __pyx_v_el = __pyx_t_1;
3853 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":359
3854 * remove = parent.remove
3855 * for el in del_items:
3856 * remove(el) # <<<<<<<<<<<<<<
3858 * # normal index deletion
3860 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3861 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3862 __Pyx_INCREF(__pyx_v_el);
3863 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_el);
3864 __Pyx_GIVEREF(__pyx_v_el);
3865 __pyx_t_5 = PyObject_Call(__pyx_v_remove, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3866 __Pyx_GOTREF(__pyx_t_5);
3867 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3868 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3870 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3875 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":362
3877 * # normal index deletion
3878 * sibling = self.__getitem__(key) # <<<<<<<<<<<<<<
3879 * parent.remove(sibling)
3882 __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui___getitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3883 __Pyx_GOTREF(__pyx_t_2);
3884 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3885 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
3886 __Pyx_INCREF(__pyx_v_key);
3887 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_key);
3888 __Pyx_GIVEREF(__pyx_v_key);
3889 __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3890 __Pyx_GOTREF(__pyx_t_1);
3891 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3892 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3893 __Pyx_DECREF(__pyx_v_sibling);
3894 __pyx_v_sibling = __pyx_t_1;
3897 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":363
3898 * # normal index deletion
3899 * sibling = self.__getitem__(key)
3900 * parent.remove(sibling) # <<<<<<<<<<<<<<
3902 * def iterfind(self, path):
3904 __pyx_t_1 = PyObject_GetAttr(__pyx_v_parent, __pyx_n_ui_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3905 __Pyx_GOTREF(__pyx_t_1);
3906 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3907 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
3908 __Pyx_INCREF(__pyx_v_sibling);
3909 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_sibling);
3910 __Pyx_GIVEREF(__pyx_v_sibling);
3911 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3912 __Pyx_GOTREF(__pyx_t_2);
3913 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3914 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
3915 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3922 __Pyx_XDECREF(__pyx_t_1);
3923 __Pyx_XDECREF(__pyx_t_2);
3924 __Pyx_XDECREF(__pyx_t_5);
3925 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.__delitem__");
3928 __Pyx_DECREF(__pyx_v_parent);
3929 __Pyx_DECREF(__pyx_v_del_items);
3930 __Pyx_DECREF(__pyx_v_remove);
3931 __Pyx_DECREF(__pyx_v_el);
3932 __Pyx_DECREF(__pyx_v_sibling);
3933 __Pyx_DECREF((PyObject *)__pyx_v_self);
3934 __Pyx_DECREF(__pyx_v_key);
3935 __Pyx_FinishRefcountContext();
3939 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":365
3940 * parent.remove(sibling)
3942 * def iterfind(self, path): # <<<<<<<<<<<<<<
3943 * u"iterfind(self, path)"
3944 * # Reimplementation of Element.iterfind() to make it work without child
3947 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
3948 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_iterfind[] = "iterfind(self, path)";
3949 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
3950 PyObject *__pyx_v_xpath;
3951 PyObject *__pyx_r = NULL;
3952 PyObject *__pyx_t_1 = NULL;
3953 PyObject *__pyx_t_2 = NULL;
3954 PyObject *__pyx_t_3 = NULL;
3955 __Pyx_SetupRefcountContext("iterfind");
3956 __pyx_v_xpath = Py_None; __Pyx_INCREF(Py_None);
3958 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":369
3959 * # Reimplementation of Element.iterfind() to make it work without child
3961 * xpath = etree.ETXPath(path) # <<<<<<<<<<<<<<
3962 * return iter(xpath(self))
3965 __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_ETXPath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3966 __Pyx_GOTREF(__pyx_t_1);
3967 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3968 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3969 __Pyx_INCREF(__pyx_v_path);
3970 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
3971 __Pyx_GIVEREF(__pyx_v_path);
3972 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3973 __Pyx_GOTREF(__pyx_t_3);
3974 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3975 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3976 __Pyx_DECREF(__pyx_v_xpath);
3977 __pyx_v_xpath = __pyx_t_3;
3980 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":370
3982 * xpath = etree.ETXPath(path)
3983 * return iter(xpath(self)) # <<<<<<<<<<<<<<
3985 * def findall(self, path):
3987 __Pyx_XDECREF(__pyx_r);
3988 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3989 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
3990 __Pyx_INCREF(__pyx_v_self);
3991 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
3992 __Pyx_GIVEREF(__pyx_v_self);
3993 __pyx_t_2 = PyObject_Call(__pyx_v_xpath, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3994 __Pyx_GOTREF(__pyx_t_2);
3995 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
3996 __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3997 __Pyx_GOTREF(__pyx_t_3);
3998 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3999 __pyx_r = __pyx_t_3;
4003 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4006 __Pyx_XDECREF(__pyx_t_1);
4007 __Pyx_XDECREF(__pyx_t_2);
4008 __Pyx_XDECREF(__pyx_t_3);
4009 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.iterfind");
4012 __Pyx_DECREF(__pyx_v_xpath);
4013 __Pyx_XGIVEREF(__pyx_r);
4014 __Pyx_FinishRefcountContext();
4018 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":372
4019 * return iter(xpath(self))
4021 * def findall(self, path): # <<<<<<<<<<<<<<
4022 * u"findall(self, path)"
4023 * # Reimplementation of Element.findall() to make it work without child
4026 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
4027 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_findall[] = "findall(self, path)";
4028 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
4029 PyObject *__pyx_v_xpath;
4030 PyObject *__pyx_r = NULL;
4031 PyObject *__pyx_t_1 = NULL;
4032 PyObject *__pyx_t_2 = NULL;
4033 PyObject *__pyx_t_3 = NULL;
4034 __Pyx_SetupRefcountContext("findall");
4035 __pyx_v_xpath = Py_None; __Pyx_INCREF(Py_None);
4037 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":376
4038 * # Reimplementation of Element.findall() to make it work without child
4040 * xpath = etree.ETXPath(path) # <<<<<<<<<<<<<<
4041 * return xpath(self)
4044 __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_ETXPath); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4045 __Pyx_GOTREF(__pyx_t_1);
4046 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4047 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4048 __Pyx_INCREF(__pyx_v_path);
4049 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
4050 __Pyx_GIVEREF(__pyx_v_path);
4051 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4052 __Pyx_GOTREF(__pyx_t_3);
4053 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4054 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4055 __Pyx_DECREF(__pyx_v_xpath);
4056 __pyx_v_xpath = __pyx_t_3;
4059 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":377
4061 * xpath = etree.ETXPath(path)
4062 * return xpath(self) # <<<<<<<<<<<<<<
4064 * def find(self, path):
4066 __Pyx_XDECREF(__pyx_r);
4067 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4068 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4069 __Pyx_INCREF(__pyx_v_self);
4070 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self);
4071 __Pyx_GIVEREF(__pyx_v_self);
4072 __pyx_t_2 = PyObject_Call(__pyx_v_xpath, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4073 __Pyx_GOTREF(__pyx_t_2);
4074 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4075 __pyx_r = __pyx_t_2;
4079 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4082 __Pyx_XDECREF(__pyx_t_1);
4083 __Pyx_XDECREF(__pyx_t_2);
4084 __Pyx_XDECREF(__pyx_t_3);
4085 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findall");
4088 __Pyx_DECREF(__pyx_v_xpath);
4089 __Pyx_XGIVEREF(__pyx_r);
4090 __Pyx_FinishRefcountContext();
4094 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":379
4095 * return xpath(self)
4097 * def find(self, path): # <<<<<<<<<<<<<<
4098 * u"find(self, path)"
4099 * # Reimplementation of Element.find() to make it work without child
4102 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
4103 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_find[] = "find(self, path)";
4104 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
4105 PyObject *__pyx_v_result;
4106 PyObject *__pyx_r = NULL;
4107 PyObject *__pyx_t_1 = NULL;
4108 PyObject *__pyx_t_2 = NULL;
4109 PyObject *__pyx_t_3 = NULL;
4111 Py_ssize_t __pyx_t_5;
4113 __Pyx_SetupRefcountContext("find");
4114 __Pyx_INCREF((PyObject *)__pyx_v_self);
4115 __Pyx_INCREF(__pyx_v_path);
4116 __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
4118 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":383
4119 * # Reimplementation of Element.find() to make it work without child
4121 * result = self.findall(path) # <<<<<<<<<<<<<<
4122 * if isinstance(result, list) and len(result):
4125 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_findall); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4126 __Pyx_GOTREF(__pyx_t_1);
4127 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4128 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4129 __Pyx_INCREF(__pyx_v_path);
4130 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
4131 __Pyx_GIVEREF(__pyx_v_path);
4132 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4133 __Pyx_GOTREF(__pyx_t_3);
4134 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4135 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4136 __Pyx_DECREF(__pyx_v_result);
4137 __pyx_v_result = __pyx_t_3;
4140 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":384
4142 * result = self.findall(path)
4143 * if isinstance(result, list) and len(result): # <<<<<<<<<<<<<<
4145 * elif isinstance(result, _Element):
4147 __pyx_t_4 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)&PyList_Type)));
4149 __pyx_t_5 = PyObject_Length(__pyx_v_result); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4150 __pyx_t_6 = __pyx_t_5;
4152 __pyx_t_6 = __pyx_t_4;
4156 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":385
4157 * result = self.findall(path)
4158 * if isinstance(result, list) and len(result):
4159 * return result[0] # <<<<<<<<<<<<<<
4160 * elif isinstance(result, _Element):
4163 __Pyx_XDECREF(__pyx_r);
4164 __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_result, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4165 __Pyx_GOTREF(__pyx_t_3);
4166 __pyx_r = __pyx_t_3;
4172 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":386
4173 * if isinstance(result, list) and len(result):
4175 * elif isinstance(result, _Element): # <<<<<<<<<<<<<<
4179 __pyx_t_6 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
4182 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":387
4184 * elif isinstance(result, _Element):
4185 * return result # <<<<<<<<<<<<<<
4189 __Pyx_XDECREF(__pyx_r);
4190 __Pyx_INCREF(__pyx_v_result);
4191 __pyx_r = __pyx_v_result;
4197 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":389
4200 * return None # <<<<<<<<<<<<<<
4202 * def findtext(self, path, default=None):
4204 __Pyx_XDECREF(__pyx_r);
4205 __Pyx_INCREF(Py_None);
4211 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4214 __Pyx_XDECREF(__pyx_t_1);
4215 __Pyx_XDECREF(__pyx_t_2);
4216 __Pyx_XDECREF(__pyx_t_3);
4217 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.find");
4220 __Pyx_DECREF(__pyx_v_result);
4221 __Pyx_DECREF((PyObject *)__pyx_v_self);
4222 __Pyx_DECREF(__pyx_v_path);
4223 __Pyx_XGIVEREF(__pyx_r);
4224 __Pyx_FinishRefcountContext();
4228 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":391
4231 * def findtext(self, path, default=None): # <<<<<<<<<<<<<<
4232 * u"findtext(self, path, default=None)"
4233 * # Reimplementation of Element.findtext() to make it work without child
4236 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4237 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_findtext[] = "findtext(self, path, default=None)";
4238 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4239 PyObject *__pyx_v_path = 0;
4240 PyObject *__pyx_v_default = 0;
4241 PyObject *__pyx_v_result;
4242 PyObject *__pyx_r = NULL;
4243 PyObject *__pyx_t_1 = NULL;
4244 PyObject *__pyx_t_2 = NULL;
4245 PyObject *__pyx_t_3 = NULL;
4247 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_path,&__pyx_n_ui_default,0};
4248 __Pyx_SetupRefcountContext("findtext");
4249 if (unlikely(__pyx_kwds)) {
4250 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
4251 PyObject* values[2] = {0,0};
4252 values[1] = ((PyObject *)Py_None);
4253 switch (PyTuple_GET_SIZE(__pyx_args)) {
4254 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4255 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4257 default: goto __pyx_L5_argtuple_error;
4259 switch (PyTuple_GET_SIZE(__pyx_args)) {
4261 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_path);
4262 if (likely(values[0])) kw_args--;
4263 else goto __pyx_L5_argtuple_error;
4266 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_default);
4267 if (unlikely(value)) { values[1] = value; kw_args--; }
4270 if (unlikely(kw_args > 0)) {
4271 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "findtext") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4273 __pyx_v_path = values[0];
4274 __pyx_v_default = values[1];
4276 __pyx_v_default = ((PyObject *)Py_None);
4277 switch (PyTuple_GET_SIZE(__pyx_args)) {
4278 case 2: __pyx_v_default = PyTuple_GET_ITEM(__pyx_args, 1);
4279 case 1: __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 0);
4281 default: goto __pyx_L5_argtuple_error;
4284 goto __pyx_L4_argument_unpacking_done;
4285 __pyx_L5_argtuple_error:;
4286 __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4288 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findtext");
4290 __pyx_L4_argument_unpacking_done:;
4291 __Pyx_INCREF((PyObject *)__pyx_v_self);
4292 __Pyx_INCREF(__pyx_v_path);
4293 __Pyx_INCREF(__pyx_v_default);
4294 __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
4296 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":395
4297 * # Reimplementation of Element.findtext() to make it work without child
4299 * result = self.find(path) # <<<<<<<<<<<<<<
4300 * if isinstance(result, _Element):
4301 * return result.text or u""
4303 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui_find); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4304 __Pyx_GOTREF(__pyx_t_1);
4305 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4306 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
4307 __Pyx_INCREF(__pyx_v_path);
4308 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path);
4309 __Pyx_GIVEREF(__pyx_v_path);
4310 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4311 __Pyx_GOTREF(__pyx_t_3);
4312 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4313 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
4314 __Pyx_DECREF(__pyx_v_result);
4315 __pyx_v_result = __pyx_t_3;
4318 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":396
4320 * result = self.find(path)
4321 * if isinstance(result, _Element): # <<<<<<<<<<<<<<
4322 * return result.text or u""
4325 __pyx_t_4 = PyObject_TypeCheck(__pyx_v_result, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
4328 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":397
4329 * result = self.find(path)
4330 * if isinstance(result, _Element):
4331 * return result.text or u"" # <<<<<<<<<<<<<<
4335 __Pyx_XDECREF(__pyx_r);
4336 __pyx_t_3 = PyObject_GetAttr(__pyx_v_result, __pyx_n_ui_text); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4337 __Pyx_GOTREF(__pyx_t_3);
4338 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4340 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4341 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
4342 __pyx_t_2 = __pyx_kp_u_4;
4344 __pyx_t_2 = __pyx_t_3;
4347 __pyx_r = __pyx_t_2;
4354 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":399
4355 * return result.text or u""
4357 * return default # <<<<<<<<<<<<<<
4359 * def descendantpaths(self, prefix=None):
4361 __Pyx_XDECREF(__pyx_r);
4362 __Pyx_INCREF(__pyx_v_default);
4363 __pyx_r = __pyx_v_default;
4368 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4371 __Pyx_XDECREF(__pyx_t_1);
4372 __Pyx_XDECREF(__pyx_t_2);
4373 __Pyx_XDECREF(__pyx_t_3);
4374 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.findtext");
4377 __Pyx_DECREF(__pyx_v_result);
4378 __Pyx_DECREF((PyObject *)__pyx_v_self);
4379 __Pyx_DECREF(__pyx_v_path);
4380 __Pyx_DECREF(__pyx_v_default);
4381 __Pyx_XGIVEREF(__pyx_r);
4382 __Pyx_FinishRefcountContext();
4386 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":401
4389 * def descendantpaths(self, prefix=None): # <<<<<<<<<<<<<<
4390 * u"""descendantpaths(self, prefix=None)
4394 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4395 static char __pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths[] = "descendantpaths(self, prefix=None)\n\n Returns a list of object path expressions for all descendants.\n ";
4396 static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4397 PyObject *__pyx_v_prefix = 0;
4398 PyObject *__pyx_r = NULL;
4401 PyObject *__pyx_t_3 = NULL;
4402 PyObject *__pyx_t_4 = NULL;
4403 PyObject *__pyx_t_5 = NULL;
4404 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_prefix,0};
4405 __Pyx_SetupRefcountContext("descendantpaths");
4406 if (unlikely(__pyx_kwds)) {
4407 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
4408 PyObject* values[1] = {0};
4409 values[0] = ((PyObject *)Py_None);
4410 switch (PyTuple_GET_SIZE(__pyx_args)) {
4411 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4413 default: goto __pyx_L5_argtuple_error;
4415 switch (PyTuple_GET_SIZE(__pyx_args)) {
4418 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_prefix);
4419 if (unlikely(value)) { values[0] = value; kw_args--; }
4422 if (unlikely(kw_args > 0)) {
4423 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "descendantpaths") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4425 __pyx_v_prefix = values[0];
4427 __pyx_v_prefix = ((PyObject *)Py_None);
4428 switch (PyTuple_GET_SIZE(__pyx_args)) {
4429 case 1: __pyx_v_prefix = PyTuple_GET_ITEM(__pyx_args, 0);
4431 default: goto __pyx_L5_argtuple_error;
4434 goto __pyx_L4_argument_unpacking_done;
4435 __pyx_L5_argtuple_error:;
4436 __Pyx_RaiseArgtupleInvalid("descendantpaths", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
4438 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths");
4440 __pyx_L4_argument_unpacking_done:;
4441 __Pyx_INCREF((PyObject *)__pyx_v_self);
4442 __Pyx_INCREF(__pyx_v_prefix);
4444 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":406
4445 * Returns a list of object path expressions for all descendants.
4447 * if prefix is not None and not python._isString(prefix): # <<<<<<<<<<<<<<
4448 * prefix = u'.'.join(prefix)
4449 * return _buildDescendantPaths(self._c_node, prefix)
4451 __pyx_t_1 = (__pyx_v_prefix != Py_None);
4453 __pyx_t_2 = (!_isString(__pyx_v_prefix));
4455 __pyx_t_2 = __pyx_t_1;
4459 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":407
4461 * if prefix is not None and not python._isString(prefix):
4462 * prefix = u'.'.join(prefix) # <<<<<<<<<<<<<<
4463 * return _buildDescendantPaths(self._c_node, prefix)
4466 __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_u_9), __pyx_n_ui_join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4467 __Pyx_GOTREF(__pyx_t_3);
4468 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4469 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
4470 __Pyx_INCREF(__pyx_v_prefix);
4471 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_prefix);
4472 __Pyx_GIVEREF(__pyx_v_prefix);
4473 __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4474 __Pyx_GOTREF(__pyx_t_5);
4475 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4476 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
4477 __Pyx_DECREF(__pyx_v_prefix);
4478 __pyx_v_prefix = __pyx_t_5;
4484 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":408
4485 * if prefix is not None and not python._isString(prefix):
4486 * prefix = u'.'.join(prefix)
4487 * return _buildDescendantPaths(self._c_node, prefix) # <<<<<<<<<<<<<<
4489 * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name):
4491 __Pyx_XDECREF(__pyx_r);
4492 __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__buildDescendantPaths(((struct __pyx_obj_4lxml_9objectify_ObjectifiedElement *)__pyx_v_self)->__pyx_base.__pyx_base._c_node, __pyx_v_prefix)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4493 __Pyx_GOTREF(__pyx_t_5);
4494 __pyx_r = __pyx_t_5;
4498 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4501 __Pyx_XDECREF(__pyx_t_3);
4502 __Pyx_XDECREF(__pyx_t_4);
4503 __Pyx_XDECREF(__pyx_t_5);
4504 __Pyx_AddTraceback("lxml.objectify.ObjectifiedElement.descendantpaths");
4507 __Pyx_DECREF((PyObject *)__pyx_v_self);
4508 __Pyx_DECREF(__pyx_v_prefix);
4509 __Pyx_XGIVEREF(__pyx_r);
4510 __Pyx_FinishRefcountContext();
4514 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":410
4515 * return _buildDescendantPaths(self._c_node, prefix)
4517 * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name): # <<<<<<<<<<<<<<
4518 * cdef char* c_node_href
4519 * if c_node.name != c_name:
4522 static INLINE int __pyx_f_4lxml_9objectify__tagMatches(xmlNode *__pyx_v_c_node, char *__pyx_v_c_href, char *__pyx_v_c_name) {
4523 char *__pyx_v_c_node_href;
4526 __Pyx_SetupRefcountContext("_tagMatches");
4528 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":412
4529 * cdef inline bint _tagMatches(tree.xmlNode* c_node, char* c_href, char* c_name):
4530 * cdef char* c_node_href
4531 * if c_node.name != c_name: # <<<<<<<<<<<<<<
4533 * if c_href == NULL:
4535 __pyx_t_1 = (__pyx_v_c_node->name != __pyx_v_c_name);
4538 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":413
4539 * cdef char* c_node_href
4540 * if c_node.name != c_name:
4541 * return 0 # <<<<<<<<<<<<<<
4542 * if c_href == NULL:
4551 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":414
4552 * if c_node.name != c_name:
4554 * if c_href == NULL: # <<<<<<<<<<<<<<
4556 * c_node_href = tree._getNs(c_node)
4558 __pyx_t_1 = (__pyx_v_c_href == NULL);
4561 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":415
4563 * if c_href == NULL:
4564 * return 1 # <<<<<<<<<<<<<<
4565 * c_node_href = tree._getNs(c_node)
4566 * if c_node_href == NULL:
4574 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":416
4575 * if c_href == NULL:
4577 * c_node_href = tree._getNs(c_node) # <<<<<<<<<<<<<<
4578 * if c_node_href == NULL:
4579 * return c_href[0] == c'\0'
4581 __pyx_v_c_node_href = _getNs(__pyx_v_c_node);
4583 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":417
4585 * c_node_href = tree._getNs(c_node)
4586 * if c_node_href == NULL: # <<<<<<<<<<<<<<
4587 * return c_href[0] == c'\0'
4588 * return cstd.strcmp(c_node_href, c_href) == 0
4590 __pyx_t_1 = (__pyx_v_c_node_href == NULL);
4593 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":418
4594 * c_node_href = tree._getNs(c_node)
4595 * if c_node_href == NULL:
4596 * return c_href[0] == c'\0' # <<<<<<<<<<<<<<
4597 * return cstd.strcmp(c_node_href, c_href) == 0
4600 __pyx_r = ((__pyx_v_c_href[0]) == '\x00');
4606 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":419
4607 * if c_node_href == NULL:
4608 * return c_href[0] == c'\0'
4609 * return cstd.strcmp(c_node_href, c_href) == 0 # <<<<<<<<<<<<<<
4611 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node):
4613 __pyx_r = (strcmp(__pyx_v_c_node_href, __pyx_v_c_href) == 0);
4618 __Pyx_FinishRefcountContext();
4622 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":421
4623 * return cstd.strcmp(c_node_href, c_href) == 0
4625 * cdef Py_ssize_t _countSiblings(tree.xmlNode* c_start_node): # <<<<<<<<<<<<<<
4626 * cdef tree.xmlNode* c_node
4630 static Py_ssize_t __pyx_f_4lxml_9objectify__countSiblings(xmlNode *__pyx_v_c_start_node) {
4631 xmlNode *__pyx_v_c_node;
4632 char *__pyx_v_c_href;
4633 char *__pyx_v_c_tag;
4634 Py_ssize_t __pyx_v_count;
4637 __Pyx_SetupRefcountContext("_countSiblings");
4639 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":426
4641 * cdef Py_ssize_t count
4642 * c_tag = c_start_node.name # <<<<<<<<<<<<<<
4643 * c_href = tree._getNs(c_start_node)
4646 __pyx_v_c_tag = __pyx_v_c_start_node->name;
4648 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":427
4649 * cdef Py_ssize_t count
4650 * c_tag = c_start_node.name
4651 * c_href = tree._getNs(c_start_node) # <<<<<<<<<<<<<<
4653 * c_node = c_start_node.next
4655 __pyx_v_c_href = _getNs(__pyx_v_c_start_node);
4657 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":428
4658 * c_tag = c_start_node.name
4659 * c_href = tree._getNs(c_start_node)
4660 * count = 1 # <<<<<<<<<<<<<<
4661 * c_node = c_start_node.next
4662 * while c_node is not NULL:
4666 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":429
4667 * c_href = tree._getNs(c_start_node)
4669 * c_node = c_start_node.next # <<<<<<<<<<<<<<
4670 * while c_node is not NULL:
4671 * if c_node.type == tree.XML_ELEMENT_NODE and \
4673 __pyx_v_c_node = __pyx_v_c_start_node->next;
4675 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":430
4677 * c_node = c_start_node.next
4678 * while c_node is not NULL: # <<<<<<<<<<<<<<
4679 * if c_node.type == tree.XML_ELEMENT_NODE and \
4680 * _tagMatches(c_node, c_href, c_tag):
4683 __pyx_t_1 = (__pyx_v_c_node != NULL);
4684 if (!__pyx_t_1) break;
4686 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":431
4687 * c_node = c_start_node.next
4688 * while c_node is not NULL:
4689 * if c_node.type == tree.XML_ELEMENT_NODE and \ # <<<<<<<<<<<<<<
4690 * _tagMatches(c_node, c_href, c_tag):
4693 if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {
4695 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":432
4696 * while c_node is not NULL:
4697 * if c_node.type == tree.XML_ELEMENT_NODE and \
4698 * _tagMatches(c_node, c_href, c_tag): # <<<<<<<<<<<<<<
4700 * c_node = c_node.next
4702 __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag);
4704 __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
4708 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":433
4709 * if c_node.type == tree.XML_ELEMENT_NODE and \
4710 * _tagMatches(c_node, c_href, c_tag):
4711 * count = count + 1 # <<<<<<<<<<<<<<
4712 * c_node = c_node.next
4713 * c_node = c_start_node.prev
4715 __pyx_v_count = (__pyx_v_count + 1);
4720 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":434
4721 * _tagMatches(c_node, c_href, c_tag):
4723 * c_node = c_node.next # <<<<<<<<<<<<<<
4724 * c_node = c_start_node.prev
4725 * while c_node is not NULL:
4727 __pyx_v_c_node = __pyx_v_c_node->next;
4730 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":435
4732 * c_node = c_node.next
4733 * c_node = c_start_node.prev # <<<<<<<<<<<<<<
4734 * while c_node is not NULL:
4735 * if c_node.type == tree.XML_ELEMENT_NODE and \
4737 __pyx_v_c_node = __pyx_v_c_start_node->prev;
4739 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":436
4740 * c_node = c_node.next
4741 * c_node = c_start_node.prev
4742 * while c_node is not NULL: # <<<<<<<<<<<<<<
4743 * if c_node.type == tree.XML_ELEMENT_NODE and \
4744 * _tagMatches(c_node, c_href, c_tag):
4747 __pyx_t_1 = (__pyx_v_c_node != NULL);
4748 if (!__pyx_t_1) break;
4750 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":437
4751 * c_node = c_start_node.prev
4752 * while c_node is not NULL:
4753 * if c_node.type == tree.XML_ELEMENT_NODE and \ # <<<<<<<<<<<<<<
4754 * _tagMatches(c_node, c_href, c_tag):
4757 if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {
4759 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":438
4760 * while c_node is not NULL:
4761 * if c_node.type == tree.XML_ELEMENT_NODE and \
4762 * _tagMatches(c_node, c_href, c_tag): # <<<<<<<<<<<<<<
4764 * c_node = c_node.prev
4766 __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_tag);
4768 __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
4772 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":439
4773 * if c_node.type == tree.XML_ELEMENT_NODE and \
4774 * _tagMatches(c_node, c_href, c_tag):
4775 * count = count + 1 # <<<<<<<<<<<<<<
4776 * c_node = c_node.prev
4779 __pyx_v_count = (__pyx_v_count + 1);
4784 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":440
4785 * _tagMatches(c_node, c_href, c_tag):
4787 * c_node = c_node.prev # <<<<<<<<<<<<<<
4791 __pyx_v_c_node = __pyx_v_c_node->prev;
4794 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":441
4796 * c_node = c_node.prev
4797 * return count # <<<<<<<<<<<<<<
4799 * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node,
4801 __pyx_r = __pyx_v_count;
4806 __Pyx_FinishRefcountContext();
4810 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":443
4813 * cdef tree.xmlNode* _findFollowingSibling(tree.xmlNode* c_node, # <<<<<<<<<<<<<<
4814 * char* href, char* name,
4815 * Py_ssize_t index):
4818 static xmlNode *__pyx_f_4lxml_9objectify__findFollowingSibling(xmlNode *__pyx_v_c_node, char *__pyx_v_href, char *__pyx_v_name, Py_ssize_t __pyx_v_index) {
4819 xmlNode *(*__pyx_v_next)(xmlNode *);
4822 __Pyx_SetupRefcountContext("_findFollowingSibling");
4824 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":447
4825 * Py_ssize_t index):
4826 * cdef tree.xmlNode* (*next)(tree.xmlNode*)
4827 * if index >= 0: # <<<<<<<<<<<<<<
4828 * next = cetree.nextElement
4831 __pyx_t_1 = (__pyx_v_index >= 0);
4834 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":448
4835 * cdef tree.xmlNode* (*next)(tree.xmlNode*)
4837 * next = cetree.nextElement # <<<<<<<<<<<<<<
4839 * index = -1 - index
4841 __pyx_v_next = nextElement;
4846 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":450
4847 * next = cetree.nextElement
4849 * index = -1 - index # <<<<<<<<<<<<<<
4850 * next = cetree.previousElement
4851 * while c_node is not NULL:
4853 __pyx_v_index = (-1 - __pyx_v_index);
4855 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":451
4857 * index = -1 - index
4858 * next = cetree.previousElement # <<<<<<<<<<<<<<
4859 * while c_node is not NULL:
4860 * if c_node.type == tree.XML_ELEMENT_NODE and \
4862 __pyx_v_next = previousElement;
4866 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":452
4867 * index = -1 - index
4868 * next = cetree.previousElement
4869 * while c_node is not NULL: # <<<<<<<<<<<<<<
4870 * if c_node.type == tree.XML_ELEMENT_NODE and \
4871 * _tagMatches(c_node, href, name):
4874 __pyx_t_1 = (__pyx_v_c_node != NULL);
4875 if (!__pyx_t_1) break;
4877 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":453
4878 * next = cetree.previousElement
4879 * while c_node is not NULL:
4880 * if c_node.type == tree.XML_ELEMENT_NODE and \ # <<<<<<<<<<<<<<
4881 * _tagMatches(c_node, href, name):
4884 if ((__pyx_v_c_node->type == XML_ELEMENT_NODE)) {
4886 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":454
4887 * while c_node is not NULL:
4888 * if c_node.type == tree.XML_ELEMENT_NODE and \
4889 * _tagMatches(c_node, href, name): # <<<<<<<<<<<<<<
4893 __pyx_t_1 = __pyx_f_4lxml_9objectify__tagMatches(__pyx_v_c_node, __pyx_v_href, __pyx_v_name);
4895 __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
4899 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":455
4900 * if c_node.type == tree.XML_ELEMENT_NODE and \
4901 * _tagMatches(c_node, href, name):
4902 * index = index - 1 # <<<<<<<<<<<<<<
4906 __pyx_v_index = (__pyx_v_index - 1);
4908 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":456
4909 * _tagMatches(c_node, href, name):
4911 * if index < 0: # <<<<<<<<<<<<<<
4913 * c_node = next(c_node)
4915 __pyx_t_1 = (__pyx_v_index < 0);
4918 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":457
4921 * return c_node # <<<<<<<<<<<<<<
4922 * c_node = next(c_node)
4925 __pyx_r = __pyx_v_c_node;
4934 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":458
4937 * c_node = next(c_node) # <<<<<<<<<<<<<<
4941 __pyx_v_c_node = __pyx_v_next(__pyx_v_c_node);
4944 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":459
4946 * c_node = next(c_node)
4947 * return NULL # <<<<<<<<<<<<<<
4949 * cdef object _lookupChild(_Element parent, tag):
4956 __Pyx_FinishRefcountContext();
4960 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":461
4963 * cdef object _lookupChild(_Element parent, tag): # <<<<<<<<<<<<<<
4964 * cdef tree.xmlNode* c_result
4965 * cdef tree.xmlNode* c_node
4968 static PyObject *__pyx_f_4lxml_9objectify__lookupChild(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
4969 xmlNode *__pyx_v_c_result;
4970 xmlNode *__pyx_v_c_node;
4971 char *__pyx_v_c_href;
4972 char *__pyx_v_c_tag;
4973 PyObject *__pyx_v_ns;
4974 PyObject *__pyx_r = NULL;
4975 PyObject *__pyx_t_1 = NULL;
4976 PyObject *__pyx_t_2 = NULL;
4977 PyObject *__pyx_t_3 = NULL;
4978 PyObject *__pyx_t_4 = NULL;
4980 __Pyx_SetupRefcountContext("_lookupChild");
4981 __Pyx_INCREF((PyObject *)__pyx_v_parent);
4982 __Pyx_INCREF(__pyx_v_tag);
4983 __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
4985 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":466
4988 * c_node = parent._c_node # <<<<<<<<<<<<<<
4989 * ns, tag = cetree.getNsTag(tag)
4990 * c_tag = tree.xmlDictExists(
4992 __pyx_v_c_node = __pyx_v_parent->_c_node;
4994 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":467
4996 * c_node = parent._c_node
4997 * ns, tag = cetree.getNsTag(tag) # <<<<<<<<<<<<<<
4998 * c_tag = tree.xmlDictExists(
4999 * c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
5001 __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5002 __Pyx_GOTREF(__pyx_t_1);
5003 if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
5004 PyObject* tuple = __pyx_t_1;
5005 __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
5006 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
5007 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5008 __Pyx_DECREF(__pyx_v_ns);
5009 __pyx_v_ns = __pyx_t_2;
5011 __Pyx_DECREF(__pyx_v_tag);
5012 __pyx_v_tag = __pyx_t_3;
5015 __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5016 __Pyx_GOTREF(__pyx_t_4);
5017 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5018 __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_4, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5019 __Pyx_GOTREF(__pyx_t_2);
5020 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_4, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5021 __Pyx_GOTREF(__pyx_t_3);
5022 if (__Pyx_EndUnpack(__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5023 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5024 __Pyx_DECREF(__pyx_v_ns);
5025 __pyx_v_ns = __pyx_t_2;
5027 __Pyx_DECREF(__pyx_v_tag);
5028 __pyx_v_tag = __pyx_t_3;
5032 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":469
5033 * ns, tag = cetree.getNsTag(tag)
5034 * c_tag = tree.xmlDictExists(
5035 * c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag)) # <<<<<<<<<<<<<<
5039 __pyx_v_c_tag = xmlDictExists(__pyx_v_c_node->doc->dict, PyString_AS_STRING(__pyx_v_tag), PyString_GET_SIZE(__pyx_v_tag));
5041 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":470
5042 * c_tag = tree.xmlDictExists(
5043 * c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
5044 * if c_tag is NULL: # <<<<<<<<<<<<<<
5048 __pyx_t_5 = (__pyx_v_c_tag == NULL);
5051 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":471
5052 * c_node.doc.dict, _cstr(tag), python.PyString_GET_SIZE(tag))
5054 * return None # <<<<<<<<<<<<<<
5056 * c_href = tree._getNs(c_node)
5058 __Pyx_XDECREF(__pyx_r);
5059 __Pyx_INCREF(Py_None);
5066 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":472
5069 * if ns is None: # <<<<<<<<<<<<<<
5070 * c_href = tree._getNs(c_node)
5073 __pyx_t_5 = (__pyx_v_ns == Py_None);
5076 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":473
5079 * c_href = tree._getNs(c_node) # <<<<<<<<<<<<<<
5081 * c_href = _cstr(ns)
5083 __pyx_v_c_href = _getNs(__pyx_v_c_node);
5088 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":475
5089 * c_href = tree._getNs(c_node)
5091 * c_href = _cstr(ns) # <<<<<<<<<<<<<<
5092 * c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
5093 * if c_result is NULL:
5095 __pyx_v_c_href = PyString_AS_STRING(__pyx_v_ns);
5099 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":476
5101 * c_href = _cstr(ns)
5102 * c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0) # <<<<<<<<<<<<<<
5103 * if c_result is NULL:
5106 __pyx_v_c_result = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node->children, __pyx_v_c_href, __pyx_v_c_tag, 0);
5108 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":477
5109 * c_href = _cstr(ns)
5110 * c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
5111 * if c_result is NULL: # <<<<<<<<<<<<<<
5113 * return elementFactory(parent._doc, c_result)
5115 __pyx_t_5 = (__pyx_v_c_result == NULL);
5118 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":478
5119 * c_result = _findFollowingSibling(c_node.children, c_href, c_tag, 0)
5120 * if c_result is NULL:
5121 * return None # <<<<<<<<<<<<<<
5122 * return elementFactory(parent._doc, c_result)
5125 __Pyx_XDECREF(__pyx_r);
5126 __Pyx_INCREF(Py_None);
5133 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":479
5134 * if c_result is NULL:
5136 * return elementFactory(parent._doc, c_result) # <<<<<<<<<<<<<<
5138 * cdef object _lookupChildOrRaise(_Element parent, tag):
5140 __Pyx_XDECREF(__pyx_r);
5141 __pyx_t_1 = ((PyObject *)elementFactory(__pyx_v_parent->_doc, __pyx_v_c_result)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5142 __Pyx_GOTREF(__pyx_t_1);
5143 __pyx_r = __pyx_t_1;
5147 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5150 __Pyx_XDECREF(__pyx_t_1);
5151 __Pyx_XDECREF(__pyx_t_2);
5152 __Pyx_XDECREF(__pyx_t_3);
5153 __Pyx_XDECREF(__pyx_t_4);
5154 __Pyx_AddTraceback("lxml.objectify._lookupChild");
5157 __Pyx_DECREF(__pyx_v_ns);
5158 __Pyx_DECREF((PyObject *)__pyx_v_parent);
5159 __Pyx_DECREF(__pyx_v_tag);
5160 __Pyx_XGIVEREF(__pyx_r);
5161 __Pyx_FinishRefcountContext();
5165 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":481
5166 * return elementFactory(parent._doc, c_result)
5168 * cdef object _lookupChildOrRaise(_Element parent, tag): # <<<<<<<<<<<<<<
5169 * element = _lookupChild(parent, tag)
5170 * if element is None:
5173 static PyObject *__pyx_f_4lxml_9objectify__lookupChildOrRaise(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
5174 PyObject *__pyx_v_element;
5175 PyObject *__pyx_r = NULL;
5176 PyObject *__pyx_t_1 = NULL;
5178 PyObject *__pyx_t_3 = NULL;
5179 __Pyx_SetupRefcountContext("_lookupChildOrRaise");
5180 __Pyx_INCREF((PyObject *)__pyx_v_parent);
5181 __Pyx_INCREF(__pyx_v_tag);
5182 __pyx_v_element = Py_None; __Pyx_INCREF(Py_None);
5184 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":482
5186 * cdef object _lookupChildOrRaise(_Element parent, tag):
5187 * element = _lookupChild(parent, tag) # <<<<<<<<<<<<<<
5188 * if element is None:
5189 * raise AttributeError, \
5191 __pyx_t_1 = __pyx_f_4lxml_9objectify__lookupChild(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5192 __Pyx_GOTREF(__pyx_t_1);
5193 __Pyx_DECREF(__pyx_v_element);
5194 __pyx_v_element = __pyx_t_1;
5197 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":483
5198 * cdef object _lookupChildOrRaise(_Element parent, tag):
5199 * element = _lookupChild(parent, tag)
5200 * if element is None: # <<<<<<<<<<<<<<
5201 * raise AttributeError, \
5202 * u"no such child: " + _buildChildTag(parent, tag)
5204 __pyx_t_2 = (__pyx_v_element == Py_None);
5207 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":485
5208 * if element is None:
5209 * raise AttributeError, \
5210 * u"no such child: " + _buildChildTag(parent, tag) # <<<<<<<<<<<<<<
5214 __pyx_t_1 = __pyx_f_4lxml_9objectify__buildChildTag(__pyx_v_parent, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5215 __Pyx_GOTREF(__pyx_t_1);
5216 __pyx_t_3 = PyNumber_Add(((PyObject *)__pyx_kp_u_10), __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5217 __Pyx_GOTREF(__pyx_t_3);
5218 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5219 __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_3, 0);
5220 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5221 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5226 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":486
5227 * raise AttributeError, \
5228 * u"no such child: " + _buildChildTag(parent, tag)
5229 * return element # <<<<<<<<<<<<<<
5231 * cdef object _buildChildTag(_Element parent, tag):
5233 __Pyx_XDECREF(__pyx_r);
5234 __Pyx_INCREF(__pyx_v_element);
5235 __pyx_r = __pyx_v_element;
5238 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5241 __Pyx_XDECREF(__pyx_t_1);
5242 __Pyx_XDECREF(__pyx_t_3);
5243 __Pyx_AddTraceback("lxml.objectify._lookupChildOrRaise");
5246 __Pyx_DECREF(__pyx_v_element);
5247 __Pyx_DECREF((PyObject *)__pyx_v_parent);
5248 __Pyx_DECREF(__pyx_v_tag);
5249 __Pyx_XGIVEREF(__pyx_r);
5250 __Pyx_FinishRefcountContext();
5254 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":488
5257 * cdef object _buildChildTag(_Element parent, tag): # <<<<<<<<<<<<<<
5262 static PyObject *__pyx_f_4lxml_9objectify__buildChildTag(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag) {
5263 char *__pyx_v_c_href;
5264 char *__pyx_v_c_tag;
5265 PyObject *__pyx_v_ns;
5266 PyObject *__pyx_r = NULL;
5267 PyObject *__pyx_t_1 = NULL;
5268 PyObject *__pyx_t_2 = NULL;
5269 PyObject *__pyx_t_3 = NULL;
5270 PyObject *__pyx_t_4 = NULL;
5272 __Pyx_SetupRefcountContext("_buildChildTag");
5273 __Pyx_INCREF((PyObject *)__pyx_v_parent);
5274 __Pyx_INCREF(__pyx_v_tag);
5275 __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
5277 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":491
5280 * ns, tag = cetree.getNsTag(tag) # <<<<<<<<<<<<<<
5281 * c_tag = _cstr(tag)
5284 __pyx_t_1 = getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5285 __Pyx_GOTREF(__pyx_t_1);
5286 if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
5287 PyObject* tuple = __pyx_t_1;
5288 __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
5289 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
5290 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5291 __Pyx_DECREF(__pyx_v_ns);
5292 __pyx_v_ns = __pyx_t_2;
5294 __Pyx_DECREF(__pyx_v_tag);
5295 __pyx_v_tag = __pyx_t_3;
5298 __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5299 __Pyx_GOTREF(__pyx_t_4);
5300 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5301 __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_4, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5302 __Pyx_GOTREF(__pyx_t_2);
5303 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_4, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5304 __Pyx_GOTREF(__pyx_t_3);
5305 if (__Pyx_EndUnpack(__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5306 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5307 __Pyx_DECREF(__pyx_v_ns);
5308 __pyx_v_ns = __pyx_t_2;
5310 __Pyx_DECREF(__pyx_v_tag);
5311 __pyx_v_tag = __pyx_t_3;
5315 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":492
5317 * ns, tag = cetree.getNsTag(tag)
5318 * c_tag = _cstr(tag) # <<<<<<<<<<<<<<
5320 * c_href = tree._getNs(parent._c_node)
5322 __pyx_v_c_tag = PyString_AS_STRING(__pyx_v_tag);
5324 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":493
5325 * ns, tag = cetree.getNsTag(tag)
5326 * c_tag = _cstr(tag)
5327 * if ns is None: # <<<<<<<<<<<<<<
5328 * c_href = tree._getNs(parent._c_node)
5331 __pyx_t_5 = (__pyx_v_ns == Py_None);
5334 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":494
5335 * c_tag = _cstr(tag)
5337 * c_href = tree._getNs(parent._c_node) # <<<<<<<<<<<<<<
5339 * c_href = _cstr(ns)
5341 __pyx_v_c_href = _getNs(__pyx_v_parent->_c_node);
5346 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":496
5347 * c_href = tree._getNs(parent._c_node)
5349 * c_href = _cstr(ns) # <<<<<<<<<<<<<<
5350 * return cetree.namespacedNameFromNsName(c_href, c_tag)
5353 __pyx_v_c_href = PyString_AS_STRING(__pyx_v_ns);
5357 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":497
5359 * c_href = _cstr(ns)
5360 * return cetree.namespacedNameFromNsName(c_href, c_tag) # <<<<<<<<<<<<<<
5362 * cdef _replaceElement(_Element element, value):
5364 __Pyx_XDECREF(__pyx_r);
5365 __pyx_t_1 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5366 __Pyx_GOTREF(__pyx_t_1);
5367 __pyx_r = __pyx_t_1;
5371 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5374 __Pyx_XDECREF(__pyx_t_1);
5375 __Pyx_XDECREF(__pyx_t_2);
5376 __Pyx_XDECREF(__pyx_t_3);
5377 __Pyx_XDECREF(__pyx_t_4);
5378 __Pyx_AddTraceback("lxml.objectify._buildChildTag");
5381 __Pyx_DECREF(__pyx_v_ns);
5382 __Pyx_DECREF((PyObject *)__pyx_v_parent);
5383 __Pyx_DECREF(__pyx_v_tag);
5384 __Pyx_XGIVEREF(__pyx_r);
5385 __Pyx_FinishRefcountContext();
5389 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":499
5390 * return cetree.namespacedNameFromNsName(c_href, c_tag)
5392 * cdef _replaceElement(_Element element, value): # <<<<<<<<<<<<<<
5393 * cdef _Element new_element
5394 * if isinstance(value, _Element):
5397 static PyObject *__pyx_f_4lxml_9objectify__replaceElement(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
5398 struct LxmlElement *__pyx_v_new_element;
5399 PyObject *__pyx_r = NULL;
5401 PyObject *__pyx_t_2 = NULL;
5402 PyObject *__pyx_t_3 = NULL;
5403 PyObject *__pyx_t_4 = NULL;
5404 __Pyx_SetupRefcountContext("_replaceElement");
5405 __Pyx_INCREF((PyObject *)__pyx_v_element);
5406 __Pyx_INCREF(__pyx_v_value);
5407 __pyx_v_new_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
5409 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":501
5410 * cdef _replaceElement(_Element element, value):
5411 * cdef _Element new_element
5412 * if isinstance(value, _Element): # <<<<<<<<<<<<<<
5413 * # deep copy the new element
5414 * new_element = cetree.deepcopyNodeToDocument(
5416 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
5419 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":504
5420 * # deep copy the new element
5421 * new_element = cetree.deepcopyNodeToDocument(
5422 * element._doc, (<_Element>value)._c_node) # <<<<<<<<<<<<<<
5423 * new_element.tag = element.tag
5424 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5426 __pyx_t_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_element->_doc, ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5427 __Pyx_GOTREF(__pyx_t_2);
5428 __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5429 __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
5432 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":505
5433 * new_element = cetree.deepcopyNodeToDocument(
5434 * element._doc, (<_Element>value)._c_node)
5435 * new_element.tag = element.tag # <<<<<<<<<<<<<<
5436 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5437 * element[:] = value
5439 __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_tag); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5440 __Pyx_GOTREF(__pyx_t_2);
5441 if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_ui_tag, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5442 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5446 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":506
5447 * element._doc, (<_Element>value)._c_node)
5448 * new_element.tag = element.tag
5449 * elif python.PyList_Check(value) or python.PyTuple_Check(value): # <<<<<<<<<<<<<<
5450 * element[:] = value
5453 if (!PyList_Check(__pyx_v_value)) {
5454 __pyx_t_1 = PyTuple_Check(__pyx_v_value);
5456 __pyx_t_1 = PyList_Check(__pyx_v_value);
5460 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":507
5461 * new_element.tag = element.tag
5462 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5463 * element[:] = value # <<<<<<<<<<<<<<
5467 if (PySequence_SetSlice(((PyObject *)__pyx_v_element), 0, PY_SSIZE_T_MAX, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5469 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":508
5470 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5471 * element[:] = value
5472 * return # <<<<<<<<<<<<<<
5474 * new_element = element.makeelement(element.tag)
5476 __Pyx_XDECREF(__pyx_r);
5477 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5483 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":510
5486 * new_element = element.makeelement(element.tag) # <<<<<<<<<<<<<<
5487 * _setElementValue(new_element, value)
5488 * element.getparent().replace(element, new_element)
5490 __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_makeelement); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5491 __Pyx_GOTREF(__pyx_t_2);
5492 __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5493 __Pyx_GOTREF(__pyx_t_3);
5494 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5495 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5496 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
5497 __Pyx_GIVEREF(__pyx_t_3);
5499 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5500 __Pyx_GOTREF(__pyx_t_3);
5501 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5502 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
5503 if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5504 __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5505 __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_3);
5508 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":511
5510 * new_element = element.makeelement(element.tag)
5511 * _setElementValue(new_element, value) # <<<<<<<<<<<<<<
5512 * element.getparent().replace(element, new_element)
5515 __pyx_t_3 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5516 __Pyx_GOTREF(__pyx_t_3);
5517 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5521 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":512
5522 * new_element = element.makeelement(element.tag)
5523 * _setElementValue(new_element, value)
5524 * element.getparent().replace(element, new_element) # <<<<<<<<<<<<<<
5526 * cdef _appendValue(_Element parent, tag, value):
5528 __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_getparent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5529 __Pyx_GOTREF(__pyx_t_3);
5530 __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5531 __Pyx_GOTREF(__pyx_t_4);
5532 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5533 __pyx_t_3 = PyObject_GetAttr(__pyx_t_4, __pyx_n_ui_replace); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5534 __Pyx_GOTREF(__pyx_t_3);
5535 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5536 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5537 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5538 __Pyx_INCREF(((PyObject *)__pyx_v_element));
5539 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_element));
5540 __Pyx_GIVEREF(((PyObject *)__pyx_v_element));
5541 __Pyx_INCREF(((PyObject *)__pyx_v_new_element));
5542 PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_new_element));
5543 __Pyx_GIVEREF(((PyObject *)__pyx_v_new_element));
5544 __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5545 __Pyx_GOTREF(__pyx_t_2);
5546 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5547 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
5548 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5550 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5553 __Pyx_XDECREF(__pyx_t_2);
5554 __Pyx_XDECREF(__pyx_t_3);
5555 __Pyx_XDECREF(__pyx_t_4);
5556 __Pyx_AddTraceback("lxml.objectify._replaceElement");
5559 __Pyx_DECREF((PyObject *)__pyx_v_new_element);
5560 __Pyx_DECREF((PyObject *)__pyx_v_element);
5561 __Pyx_DECREF(__pyx_v_value);
5562 __Pyx_XGIVEREF(__pyx_r);
5563 __Pyx_FinishRefcountContext();
5567 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":514
5568 * element.getparent().replace(element, new_element)
5570 * cdef _appendValue(_Element parent, tag, value): # <<<<<<<<<<<<<<
5571 * cdef _Element new_element
5572 * if isinstance(value, _Element):
5575 static PyObject *__pyx_f_4lxml_9objectify__appendValue(struct LxmlElement *__pyx_v_parent, PyObject *__pyx_v_tag, PyObject *__pyx_v_value) {
5576 struct LxmlElement *__pyx_v_new_element;
5577 PyObject *__pyx_v_item;
5578 PyObject *__pyx_r = NULL;
5580 PyObject *__pyx_t_2 = NULL;
5581 Py_ssize_t __pyx_t_3;
5582 PyObject *__pyx_t_4 = NULL;
5583 __Pyx_SetupRefcountContext("_appendValue");
5584 __Pyx_INCREF((PyObject *)__pyx_v_parent);
5585 __Pyx_INCREF(__pyx_v_tag);
5586 __Pyx_INCREF(__pyx_v_value);
5587 __pyx_v_new_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
5588 __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
5590 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":516
5591 * cdef _appendValue(_Element parent, tag, value):
5592 * cdef _Element new_element
5593 * if isinstance(value, _Element): # <<<<<<<<<<<<<<
5594 * # deep copy the new element
5595 * new_element = cetree.deepcopyNodeToDocument(
5597 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
5600 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":519
5601 * # deep copy the new element
5602 * new_element = cetree.deepcopyNodeToDocument(
5603 * parent._doc, (<_Element>value)._c_node) # <<<<<<<<<<<<<<
5604 * new_element.tag = tag
5605 * cetree.appendChild(parent, new_element)
5607 __pyx_t_2 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_parent->_doc, ((struct LxmlElement *)__pyx_v_value)->_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5608 __Pyx_GOTREF(__pyx_t_2);
5609 __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5610 __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
5613 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":520
5614 * new_element = cetree.deepcopyNodeToDocument(
5615 * parent._doc, (<_Element>value)._c_node)
5616 * new_element.tag = tag # <<<<<<<<<<<<<<
5617 * cetree.appendChild(parent, new_element)
5618 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5620 if (PyObject_SetAttr(((PyObject *)__pyx_v_new_element), __pyx_n_ui_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5622 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":521
5623 * parent._doc, (<_Element>value)._c_node)
5624 * new_element.tag = tag
5625 * cetree.appendChild(parent, new_element) # <<<<<<<<<<<<<<
5626 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5627 * for item in value:
5629 appendChild(__pyx_v_parent, __pyx_v_new_element);
5633 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":522
5634 * new_element.tag = tag
5635 * cetree.appendChild(parent, new_element)
5636 * elif python.PyList_Check(value) or python.PyTuple_Check(value): # <<<<<<<<<<<<<<
5637 * for item in value:
5638 * _appendValue(parent, tag, item)
5640 if (!PyList_Check(__pyx_v_value)) {
5641 __pyx_t_1 = PyTuple_Check(__pyx_v_value);
5643 __pyx_t_1 = PyList_Check(__pyx_v_value);
5647 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":523
5648 * cetree.appendChild(parent, new_element)
5649 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5650 * for item in value: # <<<<<<<<<<<<<<
5651 * _appendValue(parent, tag, item)
5654 if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) {
5655 __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2);
5657 __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5658 __Pyx_GOTREF(__pyx_t_2);
5661 if (likely(PyList_CheckExact(__pyx_t_2))) {
5662 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
5663 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
5664 } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
5665 if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
5666 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
5668 __pyx_t_4 = PyIter_Next(__pyx_t_2);
5670 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5673 __Pyx_GOTREF(__pyx_t_4);
5675 __Pyx_DECREF(__pyx_v_item);
5676 __pyx_v_item = __pyx_t_4;
5679 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":524
5680 * elif python.PyList_Check(value) or python.PyTuple_Check(value):
5681 * for item in value:
5682 * _appendValue(parent, tag, item) # <<<<<<<<<<<<<<
5684 * new_element = cetree.makeElement(
5686 __pyx_t_4 = __pyx_f_4lxml_9objectify__appendValue(__pyx_v_parent, __pyx_v_tag, __pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5687 __Pyx_GOTREF(__pyx_t_4);
5688 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5690 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5695 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":527
5697 * new_element = cetree.makeElement(
5698 * tag, parent._doc, None, None, None, None, None) # <<<<<<<<<<<<<<
5699 * _setElementValue(new_element, value)
5700 * cetree.appendChild(parent, new_element)
5702 __pyx_t_2 = ((PyObject *)makeElement(__pyx_v_tag, __pyx_v_parent->_doc, Py_None, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5703 __Pyx_GOTREF(__pyx_t_2);
5704 __Pyx_DECREF(((PyObject *)__pyx_v_new_element));
5705 __pyx_v_new_element = ((struct LxmlElement *)__pyx_t_2);
5708 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":528
5709 * new_element = cetree.makeElement(
5710 * tag, parent._doc, None, None, None, None, None)
5711 * _setElementValue(new_element, value) # <<<<<<<<<<<<<<
5712 * cetree.appendChild(parent, new_element)
5715 __pyx_t_2 = __pyx_f_4lxml_9objectify__setElementValue(__pyx_v_new_element, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5716 __Pyx_GOTREF(__pyx_t_2);
5717 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5719 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":529
5720 * tag, parent._doc, None, None, None, None, None)
5721 * _setElementValue(new_element, value)
5722 * cetree.appendChild(parent, new_element) # <<<<<<<<<<<<<<
5724 * cdef _setElementValue(_Element element, value):
5726 appendChild(__pyx_v_parent, __pyx_v_new_element);
5730 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5733 __Pyx_XDECREF(__pyx_t_2);
5734 __Pyx_XDECREF(__pyx_t_4);
5735 __Pyx_AddTraceback("lxml.objectify._appendValue");
5738 __Pyx_DECREF((PyObject *)__pyx_v_new_element);
5739 __Pyx_DECREF(__pyx_v_item);
5740 __Pyx_DECREF((PyObject *)__pyx_v_parent);
5741 __Pyx_DECREF(__pyx_v_tag);
5742 __Pyx_DECREF(__pyx_v_value);
5743 __Pyx_XGIVEREF(__pyx_r);
5744 __Pyx_FinishRefcountContext();
5748 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":531
5749 * cetree.appendChild(parent, new_element)
5751 * cdef _setElementValue(_Element element, value): # <<<<<<<<<<<<<<
5752 * cdef python.PyObject* _pytype
5756 static PyObject *__pyx_f_4lxml_9objectify__setElementValue(struct LxmlElement *__pyx_v_element, PyObject *__pyx_v_value) {
5757 PyObject *__pyx_v__pytype;
5758 PyObject *__pyx_v_pytype_name;
5759 PyObject *__pyx_r = NULL;
5762 PyObject *__pyx_t_3 = NULL;
5763 PyObject *__pyx_t_4 = NULL;
5764 __Pyx_SetupRefcountContext("_setElementValue");
5765 __Pyx_INCREF((PyObject *)__pyx_v_element);
5766 __Pyx_INCREF(__pyx_v_value);
5767 __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);
5769 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":533
5770 * cdef _setElementValue(_Element element, value):
5771 * cdef python.PyObject* _pytype
5772 * if value is None: # <<<<<<<<<<<<<<
5773 * cetree.setAttributeValue(
5774 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
5776 __pyx_t_1 = (__pyx_v_value == Py_None);
5779 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":535
5781 * cetree.setAttributeValue(
5782 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") # <<<<<<<<<<<<<<
5783 * elif isinstance(value, _Element):
5784 * _replaceElement(element, value)
5786 __pyx_t_2 = setAttributeValue(__pyx_v_element, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_n_u_true)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5790 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":536
5791 * cetree.setAttributeValue(
5792 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
5793 * elif isinstance(value, _Element): # <<<<<<<<<<<<<<
5794 * _replaceElement(element, value)
5797 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
5800 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":537
5801 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
5802 * elif isinstance(value, _Element):
5803 * _replaceElement(element, value) # <<<<<<<<<<<<<<
5807 __pyx_t_3 = __pyx_f_4lxml_9objectify__replaceElement(__pyx_v_element, __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5808 __Pyx_GOTREF(__pyx_t_3);
5809 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5811 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":538
5812 * elif isinstance(value, _Element):
5813 * _replaceElement(element, value)
5814 * return # <<<<<<<<<<<<<<
5816 * cetree.delAttributeFromNsName(
5818 __Pyx_XDECREF(__pyx_r);
5819 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5825 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":541
5827 * cetree.delAttributeFromNsName(
5828 * element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil") # <<<<<<<<<<<<<<
5829 * if python._isString(value):
5830 * pytype_name = u"str"
5832 delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_nil);
5834 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":542
5835 * cetree.delAttributeFromNsName(
5836 * element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")
5837 * if python._isString(value): # <<<<<<<<<<<<<<
5838 * pytype_name = u"str"
5839 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5841 __pyx_t_1 = _isString(__pyx_v_value);
5844 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":543
5845 * element._c_node, _XML_SCHEMA_INSTANCE_NS, "nil")
5846 * if python._isString(value):
5847 * pytype_name = u"str" # <<<<<<<<<<<<<<
5848 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5851 __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
5852 __Pyx_DECREF(__pyx_v_pytype_name);
5853 __pyx_v_pytype_name = ((PyObject *)__pyx_n_u_str);
5855 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":544
5856 * if python._isString(value):
5857 * pytype_name = u"str"
5858 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name) # <<<<<<<<<<<<<<
5860 * pytype_name = _typename(value)
5862 __pyx_v__pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);
5867 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":546
5868 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5870 * pytype_name = _typename(value) # <<<<<<<<<<<<<<
5871 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5872 * if _pytype is not NULL:
5874 __pyx_t_3 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5875 __Pyx_GOTREF(__pyx_t_3);
5876 __Pyx_DECREF(__pyx_v_pytype_name);
5877 __pyx_v_pytype_name = __pyx_t_3;
5880 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":547
5882 * pytype_name = _typename(value)
5883 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name) # <<<<<<<<<<<<<<
5884 * if _pytype is not NULL:
5885 * value = (<PyType>_pytype).stringify(value)
5887 __pyx_v__pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);
5889 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":548
5890 * pytype_name = _typename(value)
5891 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5892 * if _pytype is not NULL: # <<<<<<<<<<<<<<
5893 * value = (<PyType>_pytype).stringify(value)
5896 __pyx_t_1 = (__pyx_v__pytype != NULL);
5899 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":549
5900 * _pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
5901 * if _pytype is not NULL:
5902 * value = (<PyType>_pytype).stringify(value) # <<<<<<<<<<<<<<
5904 * value = unicode(value)
5906 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5907 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5908 __Pyx_INCREF(__pyx_v_value);
5909 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_value);
5910 __Pyx_GIVEREF(__pyx_v_value);
5911 __pyx_t_4 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v__pytype)->stringify, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5912 __Pyx_GOTREF(__pyx_t_4);
5913 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
5914 __Pyx_DECREF(__pyx_v_value);
5915 __pyx_v_value = __pyx_t_4;
5921 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":551
5922 * value = (<PyType>_pytype).stringify(value)
5924 * value = unicode(value) # <<<<<<<<<<<<<<
5925 * if _pytype is not NULL:
5926 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
5928 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5929 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5930 __Pyx_INCREF(__pyx_v_value);
5931 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
5932 __Pyx_GIVEREF(__pyx_v_value);
5933 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5934 __Pyx_GOTREF(__pyx_t_3);
5935 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
5936 __Pyx_DECREF(__pyx_v_value);
5937 __pyx_v_value = __pyx_t_3;
5944 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":552
5946 * value = unicode(value)
5947 * if _pytype is not NULL: # <<<<<<<<<<<<<<
5948 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
5951 __pyx_t_1 = (__pyx_v__pytype != NULL);
5954 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":553
5955 * value = unicode(value)
5956 * if _pytype is not NULL:
5957 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name) # <<<<<<<<<<<<<<
5959 * cetree.delAttributeFromNsName(
5961 __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5962 __Pyx_GOTREF(__pyx_t_3);
5963 __pyx_t_2 = setAttributeValue(__pyx_v_element, __pyx_t_3, __pyx_v_pytype_name); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5964 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5969 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":556
5971 * cetree.delAttributeFromNsName(
5972 * element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) # <<<<<<<<<<<<<<
5973 * cetree.setNodeText(element._c_node, value)
5976 delAttributeFromNsName(__pyx_v_element->_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
5982 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":557
5983 * cetree.delAttributeFromNsName(
5984 * element._c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
5985 * cetree.setNodeText(element._c_node, value) # <<<<<<<<<<<<<<
5987 * cdef _setSlice(slice, _Element target, items):
5989 __pyx_t_2 = setNodeText(__pyx_v_element->_c_node, __pyx_v_value); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5991 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5994 __Pyx_XDECREF(__pyx_t_3);
5995 __Pyx_XDECREF(__pyx_t_4);
5996 __Pyx_AddTraceback("lxml.objectify._setElementValue");
5999 __Pyx_DECREF(__pyx_v_pytype_name);
6000 __Pyx_DECREF((PyObject *)__pyx_v_element);
6001 __Pyx_DECREF(__pyx_v_value);
6002 __Pyx_XGIVEREF(__pyx_r);
6003 __Pyx_FinishRefcountContext();
6007 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":559
6008 * cetree.setNodeText(element._c_node, value)
6010 * cdef _setSlice(slice, _Element target, items): # <<<<<<<<<<<<<<
6011 * cdef _Element parent
6012 * cdef tree.xmlNode* c_node
6015 static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *__pyx_v_slice, struct LxmlElement *__pyx_v_target, PyObject *__pyx_v_items) {
6016 struct LxmlElement *__pyx_v_parent;
6017 xmlNode *__pyx_v_c_node;
6018 Py_ssize_t __pyx_v_c_step;
6019 Py_ssize_t __pyx_v_pos;
6020 PyObject *__pyx_v_new_items;
6021 PyObject *__pyx_v_del_items;
6022 PyObject *__pyx_v_tag;
6023 PyObject *__pyx_v_item;
6024 PyObject *__pyx_v_new_element;
6025 PyObject *__pyx_v_replace;
6026 PyObject *__pyx_v_remove;
6027 PyObject *__pyx_v_add;
6028 PyObject *__pyx_r = NULL;
6030 Py_ssize_t __pyx_t_2;
6031 PyObject *__pyx_t_3 = NULL;
6032 PyObject *__pyx_t_4 = NULL;
6034 PyObject *__pyx_t_6 = NULL;
6035 __Pyx_SetupRefcountContext("_setSlice");
6036 __Pyx_INCREF(__pyx_v_slice);
6037 __Pyx_INCREF((PyObject *)__pyx_v_target);
6038 __Pyx_INCREF(__pyx_v_items);
6039 __pyx_v_parent = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
6040 __pyx_v_new_items = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
6041 __pyx_v_del_items = Py_None; __Pyx_INCREF(Py_None);
6042 __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
6043 __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
6044 __pyx_v_new_element = Py_None; __Pyx_INCREF(Py_None);
6045 __pyx_v_replace = Py_None; __Pyx_INCREF(Py_None);
6046 __pyx_v_remove = Py_None; __Pyx_INCREF(Py_None);
6047 __pyx_v_add = Py_None; __Pyx_INCREF(Py_None);
6049 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":565
6050 * cdef list new_items
6051 * # collect existing slice
6052 * if (<python.slice>slice).step is None: # <<<<<<<<<<<<<<
6056 __pyx_t_1 = (((PySliceObject *)__pyx_v_slice)->step == Py_None);
6059 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":566
6060 * # collect existing slice
6061 * if (<python.slice>slice).step is None:
6062 * c_step = 1 # <<<<<<<<<<<<<<
6064 * c_step = (<python.slice>slice).step
6071 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":568
6074 * c_step = (<python.slice>slice).step # <<<<<<<<<<<<<<
6076 * raise ValueError, u"Invalid slice"
6078 __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(((PySliceObject *)__pyx_v_slice)->step); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6079 __pyx_v_c_step = __pyx_t_2;
6083 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":569
6085 * c_step = (<python.slice>slice).step
6086 * if c_step == 0: # <<<<<<<<<<<<<<
6087 * raise ValueError, u"Invalid slice"
6088 * del_items = target[slice]
6090 __pyx_t_1 = (__pyx_v_c_step == 0);
6093 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":570
6094 * c_step = (<python.slice>slice).step
6096 * raise ValueError, u"Invalid slice" # <<<<<<<<<<<<<<
6097 * del_items = target[slice]
6100 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_11), 0);
6101 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6106 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":571
6108 * raise ValueError, u"Invalid slice"
6109 * del_items = target[slice] # <<<<<<<<<<<<<<
6111 * # collect new values
6113 __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_target), __pyx_v_slice); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6114 __Pyx_GOTREF(__pyx_t_3);
6115 __Pyx_DECREF(__pyx_v_del_items);
6116 __pyx_v_del_items = __pyx_t_3;
6119 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":574
6121 * # collect new values
6122 * new_items = [] # <<<<<<<<<<<<<<
6124 * for item in items:
6126 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6127 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6128 __Pyx_DECREF(((PyObject *)__pyx_v_new_items));
6129 __pyx_v_new_items = __pyx_t_3;
6132 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":575
6133 * # collect new values
6135 * tag = target.tag # <<<<<<<<<<<<<<
6136 * for item in items:
6137 * if isinstance(item, _Element):
6139 __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_target), __pyx_n_ui_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6140 __Pyx_GOTREF(__pyx_t_3);
6141 __Pyx_DECREF(__pyx_v_tag);
6142 __pyx_v_tag = __pyx_t_3;
6145 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":576
6148 * for item in items: # <<<<<<<<<<<<<<
6149 * if isinstance(item, _Element):
6150 * # deep copy the new element
6152 if (PyList_CheckExact(__pyx_v_items) || PyTuple_CheckExact(__pyx_v_items)) {
6153 __pyx_t_2 = 0; __pyx_t_3 = __pyx_v_items; __Pyx_INCREF(__pyx_t_3);
6155 __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6156 __Pyx_GOTREF(__pyx_t_3);
6159 if (likely(PyList_CheckExact(__pyx_t_3))) {
6160 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
6161 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
6162 } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
6163 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
6164 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
6166 __pyx_t_4 = PyIter_Next(__pyx_t_3);
6168 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6171 __Pyx_GOTREF(__pyx_t_4);
6173 __Pyx_DECREF(__pyx_v_item);
6174 __pyx_v_item = __pyx_t_4;
6177 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":577
6179 * for item in items:
6180 * if isinstance(item, _Element): # <<<<<<<<<<<<<<
6181 * # deep copy the new element
6182 * new_element = cetree.deepcopyNodeToDocument(
6184 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_item, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
6187 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":580
6188 * # deep copy the new element
6189 * new_element = cetree.deepcopyNodeToDocument(
6190 * target._doc, (<_Element>item)._c_node) # <<<<<<<<<<<<<<
6191 * new_element.tag = tag
6194 __pyx_t_4 = ((PyObject *)deepcopyNodeToDocument(__pyx_v_target->_doc, ((struct LxmlElement *)__pyx_v_item)->_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6195 __Pyx_GOTREF(__pyx_t_4);
6196 __Pyx_DECREF(__pyx_v_new_element);
6197 __pyx_v_new_element = __pyx_t_4;
6200 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":581
6201 * new_element = cetree.deepcopyNodeToDocument(
6202 * target._doc, (<_Element>item)._c_node)
6203 * new_element.tag = tag # <<<<<<<<<<<<<<
6205 * new_element = cetree.makeElement(
6207 if (PyObject_SetAttr(__pyx_v_new_element, __pyx_n_ui_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6212 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":584
6214 * new_element = cetree.makeElement(
6215 * tag, target._doc, None, None, None, None, None) # <<<<<<<<<<<<<<
6216 * _setElementValue(new_element, item)
6217 * new_items.append(new_element)
6219 __pyx_t_4 = ((PyObject *)makeElement(__pyx_v_tag, __pyx_v_target->_doc, Py_None, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6220 __Pyx_GOTREF(__pyx_t_4);
6221 __Pyx_DECREF(__pyx_v_new_element);
6222 __pyx_v_new_element = __pyx_t_4;
6225 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":585
6226 * new_element = cetree.makeElement(
6227 * tag, target._doc, None, None, None, None, None)
6228 * _setElementValue(new_element, item) # <<<<<<<<<<<<<<
6229 * new_items.append(new_element)
6232 if (!(__Pyx_TypeTest(__pyx_v_new_element, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6233 __pyx_t_4 = __pyx_f_4lxml_9objectify__setElementValue(((struct LxmlElement *)__pyx_v_new_element), __pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6234 __Pyx_GOTREF(__pyx_t_4);
6235 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6239 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":586
6240 * tag, target._doc, None, None, None, None, None)
6241 * _setElementValue(new_element, item)
6242 * new_items.append(new_element) # <<<<<<<<<<<<<<
6244 * # sanity check - raise what a list would raise
6246 if (unlikely(__pyx_v_new_items == Py_None)) {
6247 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6249 __pyx_t_5 = PyList_Append(((PyObject *)__pyx_v_new_items), __pyx_v_new_element); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6251 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6253 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":589
6255 * # sanity check - raise what a list would raise
6256 * if c_step != 1 and \ # <<<<<<<<<<<<<<
6257 * python.PyList_GET_SIZE(del_items) != python.PyList_GET_SIZE(new_items):
6258 * raise ValueError, \
6260 if ((__pyx_v_c_step != 1)) {
6262 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":590
6263 * # sanity check - raise what a list would raise
6264 * if c_step != 1 and \
6265 * python.PyList_GET_SIZE(del_items) != python.PyList_GET_SIZE(new_items): # <<<<<<<<<<<<<<
6266 * raise ValueError, \
6267 * u"attempt to assign sequence of size %d to extended slice of size %d" % (
6269 __pyx_t_1 = (PyList_GET_SIZE(__pyx_v_del_items) != PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6271 __pyx_t_1 = (__pyx_v_c_step != 1);
6275 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":593
6276 * raise ValueError, \
6277 * u"attempt to assign sequence of size %d to extended slice of size %d" % (
6278 * python.PyList_GET_SIZE(new_items), # <<<<<<<<<<<<<<
6279 * python.PyList_GET_SIZE(del_items))
6282 __pyx_t_3 = PyInt_FromSsize_t(PyList_GET_SIZE(((PyObject *)__pyx_v_new_items))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6283 __Pyx_GOTREF(__pyx_t_3);
6285 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":594
6286 * u"attempt to assign sequence of size %d to extended slice of size %d" % (
6287 * python.PyList_GET_SIZE(new_items),
6288 * python.PyList_GET_SIZE(del_items)) # <<<<<<<<<<<<<<
6290 * # replace existing items
6292 __pyx_t_4 = PyInt_FromSsize_t(PyList_GET_SIZE(__pyx_v_del_items)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6293 __Pyx_GOTREF(__pyx_t_4);
6294 __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6295 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
6296 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
6297 __Pyx_GIVEREF(__pyx_t_3);
6298 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
6299 __Pyx_GIVEREF(__pyx_t_4);
6302 __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_12), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6303 __Pyx_GOTREF(__pyx_t_4);
6304 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
6305 __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0);
6306 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6307 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6312 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":597
6314 * # replace existing items
6315 * pos = 0 # <<<<<<<<<<<<<<
6316 * parent = target.getparent()
6317 * replace = parent.replace
6321 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":598
6322 * # replace existing items
6324 * parent = target.getparent() # <<<<<<<<<<<<<<
6325 * replace = parent.replace
6326 * while pos < python.PyList_GET_SIZE(new_items) and \
6328 __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_target), __pyx_n_ui_getparent); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6329 __Pyx_GOTREF(__pyx_t_4);
6330 __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6331 __Pyx_GOTREF(__pyx_t_6);
6332 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6333 if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6334 __Pyx_DECREF(((PyObject *)__pyx_v_parent));
6335 __pyx_v_parent = ((struct LxmlElement *)__pyx_t_6);
6338 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":599
6340 * parent = target.getparent()
6341 * replace = parent.replace # <<<<<<<<<<<<<<
6342 * while pos < python.PyList_GET_SIZE(new_items) and \
6343 * pos < python.PyList_GET_SIZE(del_items):
6345 __pyx_t_6 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_n_ui_replace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6346 __Pyx_GOTREF(__pyx_t_6);
6347 __Pyx_DECREF(__pyx_v_replace);
6348 __pyx_v_replace = __pyx_t_6;
6351 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":600
6352 * parent = target.getparent()
6353 * replace = parent.replace
6354 * while pos < python.PyList_GET_SIZE(new_items) and \ # <<<<<<<<<<<<<<
6355 * pos < python.PyList_GET_SIZE(del_items):
6356 * replace(del_items[pos], new_items[pos])
6359 if ((__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)))) {
6361 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":601
6362 * replace = parent.replace
6363 * while pos < python.PyList_GET_SIZE(new_items) and \
6364 * pos < python.PyList_GET_SIZE(del_items): # <<<<<<<<<<<<<<
6365 * replace(del_items[pos], new_items[pos])
6368 __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
6370 __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6372 if (!__pyx_t_1) break;
6374 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":602
6375 * while pos < python.PyList_GET_SIZE(new_items) and \
6376 * pos < python.PyList_GET_SIZE(del_items):
6377 * replace(del_items[pos], new_items[pos]) # <<<<<<<<<<<<<<
6379 * # remove leftover items
6381 __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6382 __Pyx_GOTREF(__pyx_t_6);
6383 __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6384 __Pyx_GOTREF(__pyx_t_4);
6385 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6386 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6387 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
6388 __Pyx_GIVEREF(__pyx_t_6);
6389 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
6390 __Pyx_GIVEREF(__pyx_t_4);
6393 __pyx_t_4 = PyObject_Call(__pyx_v_replace, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6394 __Pyx_GOTREF(__pyx_t_4);
6395 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6396 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6398 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":603
6399 * pos < python.PyList_GET_SIZE(del_items):
6400 * replace(del_items[pos], new_items[pos])
6401 * pos += 1 # <<<<<<<<<<<<<<
6402 * # remove leftover items
6403 * if pos < python.PyList_GET_SIZE(del_items):
6408 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":605
6410 * # remove leftover items
6411 * if pos < python.PyList_GET_SIZE(del_items): # <<<<<<<<<<<<<<
6412 * remove = parent.remove
6413 * while pos < python.PyList_GET_SIZE(del_items):
6415 __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
6418 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":606
6419 * # remove leftover items
6420 * if pos < python.PyList_GET_SIZE(del_items):
6421 * remove = parent.remove # <<<<<<<<<<<<<<
6422 * while pos < python.PyList_GET_SIZE(del_items):
6423 * remove(del_items[pos])
6425 __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_parent), __pyx_n_ui_remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6426 __Pyx_GOTREF(__pyx_t_4);
6427 __Pyx_DECREF(__pyx_v_remove);
6428 __pyx_v_remove = __pyx_t_4;
6431 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":607
6432 * if pos < python.PyList_GET_SIZE(del_items):
6433 * remove = parent.remove
6434 * while pos < python.PyList_GET_SIZE(del_items): # <<<<<<<<<<<<<<
6435 * remove(del_items[pos])
6439 __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(__pyx_v_del_items));
6440 if (!__pyx_t_1) break;
6442 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":608
6443 * remove = parent.remove
6444 * while pos < python.PyList_GET_SIZE(del_items):
6445 * remove(del_items[pos]) # <<<<<<<<<<<<<<
6447 * # append remaining new items
6449 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_del_items, __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6450 __Pyx_GOTREF(__pyx_t_4);
6451 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6452 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6453 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
6454 __Pyx_GIVEREF(__pyx_t_4);
6456 __pyx_t_4 = PyObject_Call(__pyx_v_remove, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6457 __Pyx_GOTREF(__pyx_t_4);
6458 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6459 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6461 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":609
6462 * while pos < python.PyList_GET_SIZE(del_items):
6463 * remove(del_items[pos])
6464 * pos += 1 # <<<<<<<<<<<<<<
6465 * # append remaining new items
6466 * if pos < python.PyList_GET_SIZE(new_items):
6474 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":611
6476 * # append remaining new items
6477 * if pos < python.PyList_GET_SIZE(new_items): # <<<<<<<<<<<<<<
6478 * # the sanity check above guarantees (step == 1)
6481 __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6484 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":613
6485 * if pos < python.PyList_GET_SIZE(new_items):
6486 * # the sanity check above guarantees (step == 1)
6487 * if pos > 0: # <<<<<<<<<<<<<<
6488 * item = new_items[pos-1]
6491 __pyx_t_1 = (__pyx_v_pos > 0);
6494 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":614
6495 * # the sanity check above guarantees (step == 1)
6497 * item = new_items[pos-1] # <<<<<<<<<<<<<<
6499 * if (<python.slice>slice).start > 0:
6501 __pyx_t_2 = (__pyx_v_pos - 1);
6502 __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_t_2, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6503 __Pyx_GOTREF(__pyx_t_4);
6504 __Pyx_DECREF(__pyx_v_item);
6505 __pyx_v_item = __pyx_t_4;
6511 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":616
6512 * item = new_items[pos-1]
6514 * if (<python.slice>slice).start > 0: # <<<<<<<<<<<<<<
6515 * c_node = parent._c_node.children
6518 __pyx_t_4 = PyObject_RichCompare(((PySliceObject *)__pyx_v_slice)->start, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6519 __Pyx_GOTREF(__pyx_t_4);
6520 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6521 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6524 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":617
6526 * if (<python.slice>slice).start > 0:
6527 * c_node = parent._c_node.children # <<<<<<<<<<<<<<
6529 * c_node = parent._c_node.last
6531 __pyx_v_c_node = __pyx_v_parent->_c_node->children;
6536 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":619
6537 * c_node = parent._c_node.children
6539 * c_node = parent._c_node.last # <<<<<<<<<<<<<<
6540 * c_node = _findFollowingSibling(
6541 * c_node, tree._getNs(target._c_node), target._c_node.name,
6543 __pyx_v_c_node = __pyx_v_parent->_c_node->last;
6547 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":622
6548 * c_node = _findFollowingSibling(
6549 * c_node, tree._getNs(target._c_node), target._c_node.name,
6550 * (<python.slice>slice).start - 1) # <<<<<<<<<<<<<<
6551 * if c_node is NULL:
6552 * while pos < python.PyList_GET_SIZE(new_items):
6554 __pyx_t_4 = PyNumber_Subtract(((PySliceObject *)__pyx_v_slice)->start, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6555 __Pyx_GOTREF(__pyx_t_4);
6556 __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6557 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6558 __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, _getNs(__pyx_v_target->_c_node), __pyx_v_target->_c_node->name, __pyx_t_2);
6560 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":623
6561 * c_node, tree._getNs(target._c_node), target._c_node.name,
6562 * (<python.slice>slice).start - 1)
6563 * if c_node is NULL: # <<<<<<<<<<<<<<
6564 * while pos < python.PyList_GET_SIZE(new_items):
6565 * cetree.appendChild(parent, new_items[pos])
6567 __pyx_t_1 = (__pyx_v_c_node == NULL);
6570 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":624
6571 * (<python.slice>slice).start - 1)
6572 * if c_node is NULL:
6573 * while pos < python.PyList_GET_SIZE(new_items): # <<<<<<<<<<<<<<
6574 * cetree.appendChild(parent, new_items[pos])
6578 __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6579 if (!__pyx_t_1) break;
6581 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":625
6582 * if c_node is NULL:
6583 * while pos < python.PyList_GET_SIZE(new_items):
6584 * cetree.appendChild(parent, new_items[pos]) # <<<<<<<<<<<<<<
6588 __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6589 __Pyx_GOTREF(__pyx_t_4);
6590 if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6591 appendChild(__pyx_v_parent, ((struct LxmlElement *)__pyx_t_4));
6592 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6594 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":626
6595 * while pos < python.PyList_GET_SIZE(new_items):
6596 * cetree.appendChild(parent, new_items[pos])
6597 * pos += 1 # <<<<<<<<<<<<<<
6599 * item = cetree.elementFactory(parent._doc, c_node)
6604 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":627
6605 * cetree.appendChild(parent, new_items[pos])
6607 * return # <<<<<<<<<<<<<<
6608 * item = cetree.elementFactory(parent._doc, c_node)
6609 * while pos < python.PyList_GET_SIZE(new_items):
6611 __Pyx_XDECREF(__pyx_r);
6612 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6618 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":628
6621 * item = cetree.elementFactory(parent._doc, c_node) # <<<<<<<<<<<<<<
6622 * while pos < python.PyList_GET_SIZE(new_items):
6623 * add = item.addnext
6625 __pyx_t_4 = ((PyObject *)elementFactory(__pyx_v_parent->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6626 __Pyx_GOTREF(__pyx_t_4);
6627 __Pyx_DECREF(__pyx_v_item);
6628 __pyx_v_item = __pyx_t_4;
6633 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":629
6635 * item = cetree.elementFactory(parent._doc, c_node)
6636 * while pos < python.PyList_GET_SIZE(new_items): # <<<<<<<<<<<<<<
6637 * add = item.addnext
6638 * item = new_items[pos]
6641 __pyx_t_1 = (__pyx_v_pos < PyList_GET_SIZE(((PyObject *)__pyx_v_new_items)));
6642 if (!__pyx_t_1) break;
6644 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":630
6645 * item = cetree.elementFactory(parent._doc, c_node)
6646 * while pos < python.PyList_GET_SIZE(new_items):
6647 * add = item.addnext # <<<<<<<<<<<<<<
6648 * item = new_items[pos]
6651 __pyx_t_4 = PyObject_GetAttr(__pyx_v_item, __pyx_n_ui_addnext); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6652 __Pyx_GOTREF(__pyx_t_4);
6653 __Pyx_DECREF(__pyx_v_add);
6654 __pyx_v_add = __pyx_t_4;
6657 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":631
6658 * while pos < python.PyList_GET_SIZE(new_items):
6659 * add = item.addnext
6660 * item = new_items[pos] # <<<<<<<<<<<<<<
6664 __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_new_items), __pyx_v_pos, sizeof(Py_ssize_t), PyInt_FromSsize_t); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6665 __Pyx_GOTREF(__pyx_t_4);
6666 __Pyx_DECREF(__pyx_v_item);
6667 __pyx_v_item = __pyx_t_4;
6670 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":632
6671 * add = item.addnext
6672 * item = new_items[pos]
6673 * add(item) # <<<<<<<<<<<<<<
6677 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6678 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
6679 __Pyx_INCREF(__pyx_v_item);
6680 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_item);
6681 __Pyx_GIVEREF(__pyx_v_item);
6682 __pyx_t_3 = PyObject_Call(__pyx_v_add, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6683 __Pyx_GOTREF(__pyx_t_3);
6684 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
6685 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
6687 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":633
6688 * item = new_items[pos]
6690 * pos += 1 # <<<<<<<<<<<<<<
6692 * ################################################################################
6700 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6703 __Pyx_XDECREF(__pyx_t_3);
6704 __Pyx_XDECREF(__pyx_t_4);
6705 __Pyx_XDECREF(__pyx_t_6);
6706 __Pyx_AddTraceback("lxml.objectify._setSlice");
6709 __Pyx_DECREF((PyObject *)__pyx_v_parent);
6710 __Pyx_DECREF(__pyx_v_new_items);
6711 __Pyx_DECREF(__pyx_v_del_items);
6712 __Pyx_DECREF(__pyx_v_tag);
6713 __Pyx_DECREF(__pyx_v_item);
6714 __Pyx_DECREF(__pyx_v_new_element);
6715 __Pyx_DECREF(__pyx_v_replace);
6716 __Pyx_DECREF(__pyx_v_remove);
6717 __Pyx_DECREF(__pyx_v_add);
6718 __Pyx_DECREF(__pyx_v_slice);
6719 __Pyx_DECREF((PyObject *)__pyx_v_target);
6720 __Pyx_DECREF(__pyx_v_items);
6721 __Pyx_XGIVEREF(__pyx_r);
6722 __Pyx_FinishRefcountContext();
6726 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":643
6729 * def __get__(self): # <<<<<<<<<<<<<<
6730 * return textOf(self._c_node)
6734 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
6735 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(PyObject *__pyx_v_self) {
6736 PyObject *__pyx_r = NULL;
6737 PyObject *__pyx_t_1 = NULL;
6738 __Pyx_SetupRefcountContext("__get__");
6740 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":644
6742 * def __get__(self):
6743 * return textOf(self._c_node) # <<<<<<<<<<<<<<
6745 * def __str__(self):
6747 __Pyx_XDECREF(__pyx_r);
6748 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6749 __Pyx_GOTREF(__pyx_t_1);
6750 __pyx_r = __pyx_t_1;
6754 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6757 __Pyx_XDECREF(__pyx_t_1);
6758 __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.pyval.__get__");
6761 __Pyx_XGIVEREF(__pyx_r);
6762 __Pyx_FinishRefcountContext();
6766 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":646
6767 * return textOf(self._c_node)
6769 * def __str__(self): # <<<<<<<<<<<<<<
6770 * return textOf(self._c_node) or u''
6774 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self); /*proto*/
6775 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(PyObject *__pyx_v_self) {
6776 PyObject *__pyx_r = NULL;
6777 PyObject *__pyx_t_1 = NULL;
6779 PyObject *__pyx_t_3 = NULL;
6780 __Pyx_SetupRefcountContext("__str__");
6782 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":647
6784 * def __str__(self):
6785 * return textOf(self._c_node) or u'' # <<<<<<<<<<<<<<
6787 * def __repr__(self):
6789 __Pyx_XDECREF(__pyx_r);
6790 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6791 __Pyx_GOTREF(__pyx_t_1);
6792 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6794 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6795 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
6796 __pyx_t_3 = __pyx_kp_u_4;
6798 __pyx_t_3 = __pyx_t_1;
6801 __pyx_r = __pyx_t_3;
6805 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6808 __Pyx_XDECREF(__pyx_t_1);
6809 __Pyx_XDECREF(__pyx_t_3);
6810 __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__str__");
6813 __Pyx_XGIVEREF(__pyx_r);
6814 __Pyx_FinishRefcountContext();
6818 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":649
6819 * return textOf(self._c_node) or u''
6821 * def __repr__(self): # <<<<<<<<<<<<<<
6822 * return textOf(self._c_node) or u''
6826 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self); /*proto*/
6827 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__(PyObject *__pyx_v_self) {
6828 PyObject *__pyx_r = NULL;
6829 PyObject *__pyx_t_1 = NULL;
6831 PyObject *__pyx_t_3 = NULL;
6832 __Pyx_SetupRefcountContext("__repr__");
6834 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":650
6836 * def __repr__(self):
6837 * return textOf(self._c_node) or u'' # <<<<<<<<<<<<<<
6839 * def _setText(self, s):
6841 __Pyx_XDECREF(__pyx_r);
6842 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6843 __Pyx_GOTREF(__pyx_t_1);
6844 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6846 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6847 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
6848 __pyx_t_3 = __pyx_kp_u_4;
6850 __pyx_t_3 = __pyx_t_1;
6853 __pyx_r = __pyx_t_3;
6857 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6860 __Pyx_XDECREF(__pyx_t_1);
6861 __Pyx_XDECREF(__pyx_t_3);
6862 __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement.__repr__");
6865 __Pyx_XGIVEREF(__pyx_r);
6866 __Pyx_FinishRefcountContext();
6870 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":652
6871 * return textOf(self._c_node) or u''
6873 * def _setText(self, s): # <<<<<<<<<<<<<<
6874 * u"""For use in subclasses only. Don't use unless you know what you are
6878 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s); /*proto*/
6879 static char __pyx_doc_4lxml_9objectify_22ObjectifiedDataElement__setText[] = "For use in subclasses only. Don't use unless you know what you are\n doing.\n ";
6880 static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText(PyObject *__pyx_v_self, PyObject *__pyx_v_s) {
6881 PyObject *__pyx_r = NULL;
6883 __Pyx_SetupRefcountContext("_setText");
6885 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":656
6888 * cetree.setNodeText(self._c_node, s) # <<<<<<<<<<<<<<
6890 * cdef class NumberElement(ObjectifiedDataElement):
6892 __pyx_t_1 = setNodeText(((struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base._c_node, __pyx_v_s); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6894 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6897 __Pyx_AddTraceback("lxml.objectify.ObjectifiedDataElement._setText");
6900 __Pyx_XGIVEREF(__pyx_r);
6901 __Pyx_FinishRefcountContext();
6905 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":660
6906 * cdef class NumberElement(ObjectifiedDataElement):
6907 * cdef object _parse_value
6908 * def _setValueParser(self, function): # <<<<<<<<<<<<<<
6909 * u"""Set the function that parses the Python value from a string.
6913 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
6914 static char __pyx_doc_4lxml_9objectify_13NumberElement__setValueParser[] = "Set the function that parses the Python value from a string.\n\n Do not use this unless you know what you are doing.\n ";
6915 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
6916 PyObject *__pyx_r = NULL;
6917 __Pyx_SetupRefcountContext("_setValueParser");
6919 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":665
6920 * Do not use this unless you know what you are doing.
6922 * self._parse_value = function # <<<<<<<<<<<<<<
6926 __Pyx_INCREF(__pyx_v_function);
6927 __Pyx_GIVEREF(__pyx_v_function);
6928 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value);
6929 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value);
6930 ((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)->_parse_value = __pyx_v_function;
6932 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6933 __Pyx_XGIVEREF(__pyx_r);
6934 __Pyx_FinishRefcountContext();
6938 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":668
6941 * def __get__(self): # <<<<<<<<<<<<<<
6942 * return _parseNumber(self)
6946 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
6947 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(PyObject *__pyx_v_self) {
6948 PyObject *__pyx_r = NULL;
6949 PyObject *__pyx_t_1 = NULL;
6950 __Pyx_SetupRefcountContext("__get__");
6952 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":669
6954 * def __get__(self):
6955 * return _parseNumber(self) # <<<<<<<<<<<<<<
6957 * def __int__(self):
6959 __Pyx_XDECREF(__pyx_r);
6960 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6961 __Pyx_GOTREF(__pyx_t_1);
6962 __pyx_r = __pyx_t_1;
6966 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6969 __Pyx_XDECREF(__pyx_t_1);
6970 __Pyx_AddTraceback("lxml.objectify.NumberElement.pyval.__get__");
6973 __Pyx_XGIVEREF(__pyx_r);
6974 __Pyx_FinishRefcountContext();
6978 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":671
6979 * return _parseNumber(self)
6981 * def __int__(self): # <<<<<<<<<<<<<<
6982 * return int(_parseNumber(self))
6986 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self); /*proto*/
6987 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___int__(PyObject *__pyx_v_self) {
6988 PyObject *__pyx_r = NULL;
6989 PyObject *__pyx_t_1 = NULL;
6990 PyObject *__pyx_t_2 = NULL;
6991 __Pyx_SetupRefcountContext("__int__");
6993 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":672
6995 * def __int__(self):
6996 * return int(_parseNumber(self)) # <<<<<<<<<<<<<<
6998 * def __long__(self):
7000 __Pyx_XDECREF(__pyx_r);
7001 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7002 __Pyx_GOTREF(__pyx_t_1);
7003 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7004 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7005 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7006 __Pyx_GIVEREF(__pyx_t_1);
7008 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7009 __Pyx_GOTREF(__pyx_t_1);
7010 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7011 __pyx_r = __pyx_t_1;
7015 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7018 __Pyx_XDECREF(__pyx_t_1);
7019 __Pyx_XDECREF(__pyx_t_2);
7020 __Pyx_AddTraceback("lxml.objectify.NumberElement.__int__");
7023 __Pyx_XGIVEREF(__pyx_r);
7024 __Pyx_FinishRefcountContext();
7028 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":674
7029 * return int(_parseNumber(self))
7031 * def __long__(self): # <<<<<<<<<<<<<<
7032 * return long(_parseNumber(self))
7036 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self); /*proto*/
7037 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___long__(PyObject *__pyx_v_self) {
7038 PyObject *__pyx_r = NULL;
7039 PyObject *__pyx_t_1 = NULL;
7040 PyObject *__pyx_t_2 = NULL;
7041 __Pyx_SetupRefcountContext("__long__");
7043 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":675
7045 * def __long__(self):
7046 * return long(_parseNumber(self)) # <<<<<<<<<<<<<<
7048 * def __float__(self):
7050 __Pyx_XDECREF(__pyx_r);
7051 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7052 __Pyx_GOTREF(__pyx_t_1);
7053 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7054 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7055 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7056 __Pyx_GIVEREF(__pyx_t_1);
7058 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyLong_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7059 __Pyx_GOTREF(__pyx_t_1);
7060 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7061 __pyx_r = __pyx_t_1;
7065 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7068 __Pyx_XDECREF(__pyx_t_1);
7069 __Pyx_XDECREF(__pyx_t_2);
7070 __Pyx_AddTraceback("lxml.objectify.NumberElement.__long__");
7073 __Pyx_XGIVEREF(__pyx_r);
7074 __Pyx_FinishRefcountContext();
7078 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":677
7079 * return long(_parseNumber(self))
7081 * def __float__(self): # <<<<<<<<<<<<<<
7082 * return float(_parseNumber(self))
7086 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self); /*proto*/
7087 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___float__(PyObject *__pyx_v_self) {
7088 PyObject *__pyx_r = NULL;
7089 PyObject *__pyx_t_1 = NULL;
7090 PyObject *__pyx_t_2 = NULL;
7091 __Pyx_SetupRefcountContext("__float__");
7093 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":678
7095 * def __float__(self):
7096 * return float(_parseNumber(self)) # <<<<<<<<<<<<<<
7098 * def __complex__(self):
7100 __Pyx_XDECREF(__pyx_r);
7101 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7102 __Pyx_GOTREF(__pyx_t_1);
7103 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7104 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7105 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7106 __Pyx_GIVEREF(__pyx_t_1);
7108 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyFloat_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7109 __Pyx_GOTREF(__pyx_t_1);
7110 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7111 __pyx_r = __pyx_t_1;
7115 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7118 __Pyx_XDECREF(__pyx_t_1);
7119 __Pyx_XDECREF(__pyx_t_2);
7120 __Pyx_AddTraceback("lxml.objectify.NumberElement.__float__");
7123 __Pyx_XGIVEREF(__pyx_r);
7124 __Pyx_FinishRefcountContext();
7128 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":680
7129 * return float(_parseNumber(self))
7131 * def __complex__(self): # <<<<<<<<<<<<<<
7132 * return complex(_parseNumber(self))
7136 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___complex__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
7137 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___complex__(PyObject *__pyx_v_self, PyObject *unused) {
7138 PyObject *__pyx_r = NULL;
7139 PyObject *__pyx_t_1 = NULL;
7140 PyObject *__pyx_t_2 = NULL;
7141 __Pyx_SetupRefcountContext("__complex__");
7143 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":681
7145 * def __complex__(self):
7146 * return complex(_parseNumber(self)) # <<<<<<<<<<<<<<
7148 * def __str__(self):
7150 __Pyx_XDECREF(__pyx_r);
7151 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7152 __Pyx_GOTREF(__pyx_t_1);
7153 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7154 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7155 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7156 __Pyx_GIVEREF(__pyx_t_1);
7158 __pyx_t_1 = PyObject_Call(((PyObject*)&PyComplex_Type), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7159 __Pyx_GOTREF(__pyx_t_1);
7160 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7161 __pyx_r = __pyx_t_1;
7165 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7168 __Pyx_XDECREF(__pyx_t_1);
7169 __Pyx_XDECREF(__pyx_t_2);
7170 __Pyx_AddTraceback("lxml.objectify.NumberElement.__complex__");
7173 __Pyx_XGIVEREF(__pyx_r);
7174 __Pyx_FinishRefcountContext();
7178 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":683
7179 * return complex(_parseNumber(self))
7181 * def __str__(self): # <<<<<<<<<<<<<<
7182 * return unicode(_parseNumber(self))
7186 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self); /*proto*/
7187 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___str__(PyObject *__pyx_v_self) {
7188 PyObject *__pyx_r = NULL;
7189 PyObject *__pyx_t_1 = NULL;
7190 PyObject *__pyx_t_2 = NULL;
7191 __Pyx_SetupRefcountContext("__str__");
7193 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":684
7195 * def __str__(self):
7196 * return unicode(_parseNumber(self)) # <<<<<<<<<<<<<<
7198 * def __repr__(self):
7200 __Pyx_XDECREF(__pyx_r);
7201 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7202 __Pyx_GOTREF(__pyx_t_1);
7203 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7204 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7205 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7206 __Pyx_GIVEREF(__pyx_t_1);
7208 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7209 __Pyx_GOTREF(__pyx_t_1);
7210 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7211 __pyx_r = __pyx_t_1;
7215 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7218 __Pyx_XDECREF(__pyx_t_1);
7219 __Pyx_XDECREF(__pyx_t_2);
7220 __Pyx_AddTraceback("lxml.objectify.NumberElement.__str__");
7223 __Pyx_XGIVEREF(__pyx_r);
7224 __Pyx_FinishRefcountContext();
7228 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":686
7229 * return unicode(_parseNumber(self))
7231 * def __repr__(self): # <<<<<<<<<<<<<<
7232 * return repr(_parseNumber(self))
7236 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self); /*proto*/
7237 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___repr__(PyObject *__pyx_v_self) {
7238 PyObject *__pyx_r = NULL;
7239 PyObject *__pyx_t_1 = NULL;
7240 PyObject *__pyx_t_2 = NULL;
7241 __Pyx_SetupRefcountContext("__repr__");
7243 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":687
7245 * def __repr__(self):
7246 * return repr(_parseNumber(self)) # <<<<<<<<<<<<<<
7248 * def __oct__(self):
7250 __Pyx_XDECREF(__pyx_r);
7251 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7252 __Pyx_GOTREF(__pyx_t_1);
7253 __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7254 __Pyx_GOTREF(__pyx_t_2);
7255 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7256 __pyx_r = __pyx_t_2;
7260 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7263 __Pyx_XDECREF(__pyx_t_1);
7264 __Pyx_XDECREF(__pyx_t_2);
7265 __Pyx_AddTraceback("lxml.objectify.NumberElement.__repr__");
7268 __Pyx_XGIVEREF(__pyx_r);
7269 __Pyx_FinishRefcountContext();
7273 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":689
7274 * return repr(_parseNumber(self))
7276 * def __oct__(self): # <<<<<<<<<<<<<<
7277 * return oct(_parseNumber(self))
7281 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___oct__(PyObject *__pyx_v_self); /*proto*/
7282 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___oct__(PyObject *__pyx_v_self) {
7283 PyObject *__pyx_r = NULL;
7284 PyObject *__pyx_t_1 = NULL;
7285 PyObject *__pyx_t_2 = NULL;
7286 __Pyx_SetupRefcountContext("__oct__");
7288 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":690
7290 * def __oct__(self):
7291 * return oct(_parseNumber(self)) # <<<<<<<<<<<<<<
7293 * def __hex__(self):
7295 __Pyx_XDECREF(__pyx_r);
7296 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7297 __Pyx_GOTREF(__pyx_t_1);
7298 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7299 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7300 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7301 __Pyx_GIVEREF(__pyx_t_1);
7303 __pyx_t_1 = PyObject_Call(__pyx_builtin_oct, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7304 __Pyx_GOTREF(__pyx_t_1);
7305 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7306 __pyx_r = __pyx_t_1;
7310 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7313 __Pyx_XDECREF(__pyx_t_1);
7314 __Pyx_XDECREF(__pyx_t_2);
7315 __Pyx_AddTraceback("lxml.objectify.NumberElement.__oct__");
7318 __Pyx_XGIVEREF(__pyx_r);
7319 __Pyx_FinishRefcountContext();
7323 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":692
7324 * return oct(_parseNumber(self))
7326 * def __hex__(self): # <<<<<<<<<<<<<<
7327 * return hex(_parseNumber(self))
7331 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___hex__(PyObject *__pyx_v_self); /*proto*/
7332 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___hex__(PyObject *__pyx_v_self) {
7333 PyObject *__pyx_r = NULL;
7334 PyObject *__pyx_t_1 = NULL;
7335 PyObject *__pyx_t_2 = NULL;
7336 __Pyx_SetupRefcountContext("__hex__");
7338 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":693
7340 * def __hex__(self):
7341 * return hex(_parseNumber(self)) # <<<<<<<<<<<<<<
7343 * def __richcmp__(self, other, int op):
7345 __Pyx_XDECREF(__pyx_r);
7346 __pyx_t_1 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7347 __Pyx_GOTREF(__pyx_t_1);
7348 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7349 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7350 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
7351 __Pyx_GIVEREF(__pyx_t_1);
7353 __pyx_t_1 = PyObject_Call(__pyx_builtin_hex, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7354 __Pyx_GOTREF(__pyx_t_1);
7355 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
7356 __pyx_r = __pyx_t_1;
7360 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7363 __Pyx_XDECREF(__pyx_t_1);
7364 __Pyx_XDECREF(__pyx_t_2);
7365 __Pyx_AddTraceback("lxml.objectify.NumberElement.__hex__");
7368 __Pyx_XGIVEREF(__pyx_r);
7369 __Pyx_FinishRefcountContext();
7373 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":695
7374 * return hex(_parseNumber(self))
7376 * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
7377 * return _richcmpPyvals(self, other, op)
7381 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
7382 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
7383 PyObject *__pyx_r = NULL;
7384 PyObject *__pyx_t_1 = NULL;
7385 __Pyx_SetupRefcountContext("__richcmp__");
7387 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":696
7389 * def __richcmp__(self, other, int op):
7390 * return _richcmpPyvals(self, other, op) # <<<<<<<<<<<<<<
7392 * def __add__(self, other):
7394 __Pyx_XDECREF(__pyx_r);
7395 __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7396 __Pyx_GOTREF(__pyx_t_1);
7397 __pyx_r = __pyx_t_1;
7401 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7404 __Pyx_XDECREF(__pyx_t_1);
7405 __Pyx_AddTraceback("lxml.objectify.NumberElement.__richcmp__");
7408 __Pyx_XGIVEREF(__pyx_r);
7409 __Pyx_FinishRefcountContext();
7413 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":698
7414 * return _richcmpPyvals(self, other, op)
7416 * def __add__(self, other): # <<<<<<<<<<<<<<
7417 * return _numericValueOf(self) + _numericValueOf(other)
7421 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7422 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7423 PyObject *__pyx_r = NULL;
7424 PyObject *__pyx_t_1 = NULL;
7425 PyObject *__pyx_t_2 = NULL;
7426 PyObject *__pyx_t_3 = NULL;
7427 __Pyx_SetupRefcountContext("__add__");
7429 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":699
7431 * def __add__(self, other):
7432 * return _numericValueOf(self) + _numericValueOf(other) # <<<<<<<<<<<<<<
7434 * def __sub__(self, other):
7436 __Pyx_XDECREF(__pyx_r);
7437 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7438 __Pyx_GOTREF(__pyx_t_1);
7439 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7440 __Pyx_GOTREF(__pyx_t_2);
7441 __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7442 __Pyx_GOTREF(__pyx_t_3);
7443 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7444 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7445 __pyx_r = __pyx_t_3;
7449 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7452 __Pyx_XDECREF(__pyx_t_1);
7453 __Pyx_XDECREF(__pyx_t_2);
7454 __Pyx_XDECREF(__pyx_t_3);
7455 __Pyx_AddTraceback("lxml.objectify.NumberElement.__add__");
7458 __Pyx_XGIVEREF(__pyx_r);
7459 __Pyx_FinishRefcountContext();
7463 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":701
7464 * return _numericValueOf(self) + _numericValueOf(other)
7466 * def __sub__(self, other): # <<<<<<<<<<<<<<
7467 * return _numericValueOf(self) - _numericValueOf(other)
7471 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7472 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7473 PyObject *__pyx_r = NULL;
7474 PyObject *__pyx_t_1 = NULL;
7475 PyObject *__pyx_t_2 = NULL;
7476 PyObject *__pyx_t_3 = NULL;
7477 __Pyx_SetupRefcountContext("__sub__");
7479 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":702
7481 * def __sub__(self, other):
7482 * return _numericValueOf(self) - _numericValueOf(other) # <<<<<<<<<<<<<<
7484 * def __mul__(self, other):
7486 __Pyx_XDECREF(__pyx_r);
7487 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7488 __Pyx_GOTREF(__pyx_t_1);
7489 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7490 __Pyx_GOTREF(__pyx_t_2);
7491 __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7492 __Pyx_GOTREF(__pyx_t_3);
7493 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7494 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7495 __pyx_r = __pyx_t_3;
7499 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7502 __Pyx_XDECREF(__pyx_t_1);
7503 __Pyx_XDECREF(__pyx_t_2);
7504 __Pyx_XDECREF(__pyx_t_3);
7505 __Pyx_AddTraceback("lxml.objectify.NumberElement.__sub__");
7508 __Pyx_XGIVEREF(__pyx_r);
7509 __Pyx_FinishRefcountContext();
7513 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":704
7514 * return _numericValueOf(self) - _numericValueOf(other)
7516 * def __mul__(self, other): # <<<<<<<<<<<<<<
7517 * return _numericValueOf(self) * _numericValueOf(other)
7521 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7522 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7523 PyObject *__pyx_r = NULL;
7524 PyObject *__pyx_t_1 = NULL;
7525 PyObject *__pyx_t_2 = NULL;
7526 PyObject *__pyx_t_3 = NULL;
7527 __Pyx_SetupRefcountContext("__mul__");
7529 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":705
7531 * def __mul__(self, other):
7532 * return _numericValueOf(self) * _numericValueOf(other) # <<<<<<<<<<<<<<
7534 * def __div__(self, other):
7536 __Pyx_XDECREF(__pyx_r);
7537 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7538 __Pyx_GOTREF(__pyx_t_1);
7539 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7540 __Pyx_GOTREF(__pyx_t_2);
7541 __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7542 __Pyx_GOTREF(__pyx_t_3);
7543 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7544 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7545 __pyx_r = __pyx_t_3;
7549 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7552 __Pyx_XDECREF(__pyx_t_1);
7553 __Pyx_XDECREF(__pyx_t_2);
7554 __Pyx_XDECREF(__pyx_t_3);
7555 __Pyx_AddTraceback("lxml.objectify.NumberElement.__mul__");
7558 __Pyx_XGIVEREF(__pyx_r);
7559 __Pyx_FinishRefcountContext();
7563 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":707
7564 * return _numericValueOf(self) * _numericValueOf(other)
7566 * def __div__(self, other): # <<<<<<<<<<<<<<
7567 * return _numericValueOf(self) / _numericValueOf(other)
7571 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7572 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___div__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7573 PyObject *__pyx_r = NULL;
7574 PyObject *__pyx_t_1 = NULL;
7575 PyObject *__pyx_t_2 = NULL;
7576 PyObject *__pyx_t_3 = NULL;
7577 __Pyx_SetupRefcountContext("__div__");
7579 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":708
7581 * def __div__(self, other):
7582 * return _numericValueOf(self) / _numericValueOf(other) # <<<<<<<<<<<<<<
7584 * def __truediv__(self, other):
7586 __Pyx_XDECREF(__pyx_r);
7587 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7588 __Pyx_GOTREF(__pyx_t_1);
7589 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7590 __Pyx_GOTREF(__pyx_t_2);
7591 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7592 __Pyx_GOTREF(__pyx_t_3);
7593 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7594 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7595 __pyx_r = __pyx_t_3;
7599 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7602 __Pyx_XDECREF(__pyx_t_1);
7603 __Pyx_XDECREF(__pyx_t_2);
7604 __Pyx_XDECREF(__pyx_t_3);
7605 __Pyx_AddTraceback("lxml.objectify.NumberElement.__div__");
7608 __Pyx_XGIVEREF(__pyx_r);
7609 __Pyx_FinishRefcountContext();
7613 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":710
7614 * return _numericValueOf(self) / _numericValueOf(other)
7616 * def __truediv__(self, other): # <<<<<<<<<<<<<<
7617 * return _numericValueOf(self) / _numericValueOf(other)
7621 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7622 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7623 PyObject *__pyx_r = NULL;
7624 PyObject *__pyx_t_1 = NULL;
7625 PyObject *__pyx_t_2 = NULL;
7626 PyObject *__pyx_t_3 = NULL;
7627 __Pyx_SetupRefcountContext("__truediv__");
7629 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":711
7631 * def __truediv__(self, other):
7632 * return _numericValueOf(self) / _numericValueOf(other) # <<<<<<<<<<<<<<
7634 * def __mod__(self, other):
7636 __Pyx_XDECREF(__pyx_r);
7637 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7638 __Pyx_GOTREF(__pyx_t_1);
7639 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7640 __Pyx_GOTREF(__pyx_t_2);
7641 __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7642 __Pyx_GOTREF(__pyx_t_3);
7643 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7644 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7645 __pyx_r = __pyx_t_3;
7649 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7652 __Pyx_XDECREF(__pyx_t_1);
7653 __Pyx_XDECREF(__pyx_t_2);
7654 __Pyx_XDECREF(__pyx_t_3);
7655 __Pyx_AddTraceback("lxml.objectify.NumberElement.__truediv__");
7658 __Pyx_XGIVEREF(__pyx_r);
7659 __Pyx_FinishRefcountContext();
7663 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":713
7664 * return _numericValueOf(self) / _numericValueOf(other)
7666 * def __mod__(self, other): # <<<<<<<<<<<<<<
7667 * return _numericValueOf(self) % _numericValueOf(other)
7671 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
7672 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
7673 PyObject *__pyx_r = NULL;
7674 PyObject *__pyx_t_1 = NULL;
7675 PyObject *__pyx_t_2 = NULL;
7676 PyObject *__pyx_t_3 = NULL;
7677 __Pyx_SetupRefcountContext("__mod__");
7679 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":714
7681 * def __mod__(self, other):
7682 * return _numericValueOf(self) % _numericValueOf(other) # <<<<<<<<<<<<<<
7684 * def __pow__(self, other, modulo):
7686 __Pyx_XDECREF(__pyx_r);
7687 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7688 __Pyx_GOTREF(__pyx_t_1);
7689 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7690 __Pyx_GOTREF(__pyx_t_2);
7691 __pyx_t_3 = PyNumber_Remainder(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7692 __Pyx_GOTREF(__pyx_t_3);
7693 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7694 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7695 __pyx_r = __pyx_t_3;
7699 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7702 __Pyx_XDECREF(__pyx_t_1);
7703 __Pyx_XDECREF(__pyx_t_2);
7704 __Pyx_XDECREF(__pyx_t_3);
7705 __Pyx_AddTraceback("lxml.objectify.NumberElement.__mod__");
7708 __Pyx_XGIVEREF(__pyx_r);
7709 __Pyx_FinishRefcountContext();
7713 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":716
7714 * return _numericValueOf(self) % _numericValueOf(other)
7716 * def __pow__(self, other, modulo): # <<<<<<<<<<<<<<
7717 * if modulo is None:
7718 * return _numericValueOf(self) ** _numericValueOf(other)
7721 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo); /*proto*/
7722 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pow__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_modulo) {
7723 PyObject *__pyx_r = NULL;
7725 PyObject *__pyx_t_2 = NULL;
7726 PyObject *__pyx_t_3 = NULL;
7727 PyObject *__pyx_t_4 = NULL;
7728 __Pyx_SetupRefcountContext("__pow__");
7729 __Pyx_INCREF(__pyx_v_self);
7730 __Pyx_INCREF(__pyx_v_other);
7731 __Pyx_INCREF(__pyx_v_modulo);
7733 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":717
7735 * def __pow__(self, other, modulo):
7736 * if modulo is None: # <<<<<<<<<<<<<<
7737 * return _numericValueOf(self) ** _numericValueOf(other)
7740 __pyx_t_1 = (__pyx_v_modulo == Py_None);
7743 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":718
7744 * def __pow__(self, other, modulo):
7745 * if modulo is None:
7746 * return _numericValueOf(self) ** _numericValueOf(other) # <<<<<<<<<<<<<<
7748 * return pow(_numericValueOf(self), _numericValueOf(other), modulo)
7750 __Pyx_XDECREF(__pyx_r);
7751 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7752 __Pyx_GOTREF(__pyx_t_2);
7753 __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7754 __Pyx_GOTREF(__pyx_t_3);
7755 __pyx_t_4 = PyNumber_Power(__pyx_t_2, __pyx_t_3, Py_None); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7756 __Pyx_GOTREF(__pyx_t_4);
7757 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7758 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7759 __pyx_r = __pyx_t_4;
7766 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":720
7767 * return _numericValueOf(self) ** _numericValueOf(other)
7769 * return pow(_numericValueOf(self), _numericValueOf(other), modulo) # <<<<<<<<<<<<<<
7771 * def __neg__(self):
7773 __Pyx_XDECREF(__pyx_r);
7774 __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7775 __Pyx_GOTREF(__pyx_t_4);
7776 __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7777 __Pyx_GOTREF(__pyx_t_3);
7778 __pyx_t_2 = PyNumber_Power(__pyx_t_4, __pyx_t_3, __pyx_v_modulo); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7779 __Pyx_GOTREF(__pyx_t_2);
7780 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
7781 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7782 __pyx_r = __pyx_t_2;
7788 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7791 __Pyx_XDECREF(__pyx_t_2);
7792 __Pyx_XDECREF(__pyx_t_3);
7793 __Pyx_XDECREF(__pyx_t_4);
7794 __Pyx_AddTraceback("lxml.objectify.NumberElement.__pow__");
7797 __Pyx_DECREF(__pyx_v_self);
7798 __Pyx_DECREF(__pyx_v_other);
7799 __Pyx_DECREF(__pyx_v_modulo);
7800 __Pyx_XGIVEREF(__pyx_r);
7801 __Pyx_FinishRefcountContext();
7805 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":722
7806 * return pow(_numericValueOf(self), _numericValueOf(other), modulo)
7808 * def __neg__(self): # <<<<<<<<<<<<<<
7809 * return - _numericValueOf(self)
7813 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self); /*proto*/
7814 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___neg__(PyObject *__pyx_v_self) {
7815 PyObject *__pyx_r = NULL;
7816 PyObject *__pyx_t_1 = NULL;
7817 PyObject *__pyx_t_2 = NULL;
7818 __Pyx_SetupRefcountContext("__neg__");
7820 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":723
7822 * def __neg__(self):
7823 * return - _numericValueOf(self) # <<<<<<<<<<<<<<
7825 * def __pos__(self):
7827 __Pyx_XDECREF(__pyx_r);
7828 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7829 __Pyx_GOTREF(__pyx_t_1);
7830 __pyx_t_2 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7831 __Pyx_GOTREF(__pyx_t_2);
7832 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7833 __pyx_r = __pyx_t_2;
7837 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7840 __Pyx_XDECREF(__pyx_t_1);
7841 __Pyx_XDECREF(__pyx_t_2);
7842 __Pyx_AddTraceback("lxml.objectify.NumberElement.__neg__");
7845 __Pyx_XGIVEREF(__pyx_r);
7846 __Pyx_FinishRefcountContext();
7850 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":725
7851 * return - _numericValueOf(self)
7853 * def __pos__(self): # <<<<<<<<<<<<<<
7854 * return + _numericValueOf(self)
7858 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self); /*proto*/
7859 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___pos__(PyObject *__pyx_v_self) {
7860 PyObject *__pyx_r = NULL;
7861 PyObject *__pyx_t_1 = NULL;
7862 PyObject *__pyx_t_2 = NULL;
7863 __Pyx_SetupRefcountContext("__pos__");
7865 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":726
7867 * def __pos__(self):
7868 * return + _numericValueOf(self) # <<<<<<<<<<<<<<
7870 * def __abs__(self):
7872 __Pyx_XDECREF(__pyx_r);
7873 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7874 __Pyx_GOTREF(__pyx_t_1);
7875 __pyx_t_2 = PyNumber_Positive(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7876 __Pyx_GOTREF(__pyx_t_2);
7877 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7878 __pyx_r = __pyx_t_2;
7882 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7885 __Pyx_XDECREF(__pyx_t_1);
7886 __Pyx_XDECREF(__pyx_t_2);
7887 __Pyx_AddTraceback("lxml.objectify.NumberElement.__pos__");
7890 __Pyx_XGIVEREF(__pyx_r);
7891 __Pyx_FinishRefcountContext();
7895 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":728
7896 * return + _numericValueOf(self)
7898 * def __abs__(self): # <<<<<<<<<<<<<<
7899 * return abs( _numericValueOf(self) )
7903 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self); /*proto*/
7904 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___abs__(PyObject *__pyx_v_self) {
7905 PyObject *__pyx_r = NULL;
7906 PyObject *__pyx_t_1 = NULL;
7907 PyObject *__pyx_t_2 = NULL;
7908 __Pyx_SetupRefcountContext("__abs__");
7910 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":729
7912 * def __abs__(self):
7913 * return abs( _numericValueOf(self) ) # <<<<<<<<<<<<<<
7915 * def __nonzero__(self):
7917 __Pyx_XDECREF(__pyx_r);
7918 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7919 __Pyx_GOTREF(__pyx_t_1);
7920 __pyx_t_2 = PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7921 __Pyx_GOTREF(__pyx_t_2);
7922 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7923 __pyx_r = __pyx_t_2;
7927 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
7930 __Pyx_XDECREF(__pyx_t_1);
7931 __Pyx_XDECREF(__pyx_t_2);
7932 __Pyx_AddTraceback("lxml.objectify.NumberElement.__abs__");
7935 __Pyx_XGIVEREF(__pyx_r);
7936 __Pyx_FinishRefcountContext();
7940 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":731
7941 * return abs( _numericValueOf(self) )
7943 * def __nonzero__(self): # <<<<<<<<<<<<<<
7944 * return _numericValueOf(self) != 0
7948 static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
7949 static int __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__(PyObject *__pyx_v_self) {
7951 PyObject *__pyx_t_1 = NULL;
7952 PyObject *__pyx_t_2 = NULL;
7954 __Pyx_SetupRefcountContext("__nonzero__");
7956 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":732
7958 * def __nonzero__(self):
7959 * return _numericValueOf(self) != 0 # <<<<<<<<<<<<<<
7961 * def __invert__(self):
7963 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7964 __Pyx_GOTREF(__pyx_t_1);
7965 __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7966 __Pyx_GOTREF(__pyx_t_2);
7967 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7968 __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7969 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7970 __pyx_r = __pyx_t_3;
7976 __Pyx_XDECREF(__pyx_t_1);
7977 __Pyx_XDECREF(__pyx_t_2);
7978 __Pyx_AddTraceback("lxml.objectify.NumberElement.__nonzero__");
7981 __Pyx_FinishRefcountContext();
7985 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":734
7986 * return _numericValueOf(self) != 0
7988 * def __invert__(self): # <<<<<<<<<<<<<<
7989 * return ~ _numericValueOf(self)
7993 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self); /*proto*/
7994 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___invert__(PyObject *__pyx_v_self) {
7995 PyObject *__pyx_r = NULL;
7996 PyObject *__pyx_t_1 = NULL;
7997 PyObject *__pyx_t_2 = NULL;
7998 __Pyx_SetupRefcountContext("__invert__");
8000 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":735
8002 * def __invert__(self):
8003 * return ~ _numericValueOf(self) # <<<<<<<<<<<<<<
8005 * def __lshift__(self, other):
8007 __Pyx_XDECREF(__pyx_r);
8008 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8009 __Pyx_GOTREF(__pyx_t_1);
8010 __pyx_t_2 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8011 __Pyx_GOTREF(__pyx_t_2);
8012 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8013 __pyx_r = __pyx_t_2;
8017 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8020 __Pyx_XDECREF(__pyx_t_1);
8021 __Pyx_XDECREF(__pyx_t_2);
8022 __Pyx_AddTraceback("lxml.objectify.NumberElement.__invert__");
8025 __Pyx_XGIVEREF(__pyx_r);
8026 __Pyx_FinishRefcountContext();
8030 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":737
8031 * return ~ _numericValueOf(self)
8033 * def __lshift__(self, other): # <<<<<<<<<<<<<<
8034 * return _numericValueOf(self) << _numericValueOf(other)
8038 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8039 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___lshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8040 PyObject *__pyx_r = NULL;
8041 PyObject *__pyx_t_1 = NULL;
8042 PyObject *__pyx_t_2 = NULL;
8043 PyObject *__pyx_t_3 = NULL;
8044 __Pyx_SetupRefcountContext("__lshift__");
8046 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":738
8048 * def __lshift__(self, other):
8049 * return _numericValueOf(self) << _numericValueOf(other) # <<<<<<<<<<<<<<
8051 * def __rshift__(self, other):
8053 __Pyx_XDECREF(__pyx_r);
8054 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8055 __Pyx_GOTREF(__pyx_t_1);
8056 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8057 __Pyx_GOTREF(__pyx_t_2);
8058 __pyx_t_3 = PyNumber_Lshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8059 __Pyx_GOTREF(__pyx_t_3);
8060 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8061 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8062 __pyx_r = __pyx_t_3;
8066 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8069 __Pyx_XDECREF(__pyx_t_1);
8070 __Pyx_XDECREF(__pyx_t_2);
8071 __Pyx_XDECREF(__pyx_t_3);
8072 __Pyx_AddTraceback("lxml.objectify.NumberElement.__lshift__");
8075 __Pyx_XGIVEREF(__pyx_r);
8076 __Pyx_FinishRefcountContext();
8080 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":740
8081 * return _numericValueOf(self) << _numericValueOf(other)
8083 * def __rshift__(self, other): # <<<<<<<<<<<<<<
8084 * return _numericValueOf(self) >> _numericValueOf(other)
8088 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8089 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___rshift__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8090 PyObject *__pyx_r = NULL;
8091 PyObject *__pyx_t_1 = NULL;
8092 PyObject *__pyx_t_2 = NULL;
8093 PyObject *__pyx_t_3 = NULL;
8094 __Pyx_SetupRefcountContext("__rshift__");
8096 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":741
8098 * def __rshift__(self, other):
8099 * return _numericValueOf(self) >> _numericValueOf(other) # <<<<<<<<<<<<<<
8101 * def __and__(self, other):
8103 __Pyx_XDECREF(__pyx_r);
8104 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8105 __Pyx_GOTREF(__pyx_t_1);
8106 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8107 __Pyx_GOTREF(__pyx_t_2);
8108 __pyx_t_3 = PyNumber_Rshift(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8109 __Pyx_GOTREF(__pyx_t_3);
8110 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8111 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8112 __pyx_r = __pyx_t_3;
8116 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8119 __Pyx_XDECREF(__pyx_t_1);
8120 __Pyx_XDECREF(__pyx_t_2);
8121 __Pyx_XDECREF(__pyx_t_3);
8122 __Pyx_AddTraceback("lxml.objectify.NumberElement.__rshift__");
8125 __Pyx_XGIVEREF(__pyx_r);
8126 __Pyx_FinishRefcountContext();
8130 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":743
8131 * return _numericValueOf(self) >> _numericValueOf(other)
8133 * def __and__(self, other): # <<<<<<<<<<<<<<
8134 * return _numericValueOf(self) & _numericValueOf(other)
8138 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8139 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8140 PyObject *__pyx_r = NULL;
8141 PyObject *__pyx_t_1 = NULL;
8142 PyObject *__pyx_t_2 = NULL;
8143 PyObject *__pyx_t_3 = NULL;
8144 __Pyx_SetupRefcountContext("__and__");
8146 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":744
8148 * def __and__(self, other):
8149 * return _numericValueOf(self) & _numericValueOf(other) # <<<<<<<<<<<<<<
8151 * def __or__(self, other):
8153 __Pyx_XDECREF(__pyx_r);
8154 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8155 __Pyx_GOTREF(__pyx_t_1);
8156 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8157 __Pyx_GOTREF(__pyx_t_2);
8158 __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8159 __Pyx_GOTREF(__pyx_t_3);
8160 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8161 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8162 __pyx_r = __pyx_t_3;
8166 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8169 __Pyx_XDECREF(__pyx_t_1);
8170 __Pyx_XDECREF(__pyx_t_2);
8171 __Pyx_XDECREF(__pyx_t_3);
8172 __Pyx_AddTraceback("lxml.objectify.NumberElement.__and__");
8175 __Pyx_XGIVEREF(__pyx_r);
8176 __Pyx_FinishRefcountContext();
8180 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":746
8181 * return _numericValueOf(self) & _numericValueOf(other)
8183 * def __or__(self, other): # <<<<<<<<<<<<<<
8184 * return _numericValueOf(self) | _numericValueOf(other)
8188 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8189 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8190 PyObject *__pyx_r = NULL;
8191 PyObject *__pyx_t_1 = NULL;
8192 PyObject *__pyx_t_2 = NULL;
8193 PyObject *__pyx_t_3 = NULL;
8194 __Pyx_SetupRefcountContext("__or__");
8196 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":747
8198 * def __or__(self, other):
8199 * return _numericValueOf(self) | _numericValueOf(other) # <<<<<<<<<<<<<<
8201 * def __xor__(self, other):
8203 __Pyx_XDECREF(__pyx_r);
8204 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8205 __Pyx_GOTREF(__pyx_t_1);
8206 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8207 __Pyx_GOTREF(__pyx_t_2);
8208 __pyx_t_3 = PyNumber_Or(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8209 __Pyx_GOTREF(__pyx_t_3);
8210 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8211 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8212 __pyx_r = __pyx_t_3;
8216 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8219 __Pyx_XDECREF(__pyx_t_1);
8220 __Pyx_XDECREF(__pyx_t_2);
8221 __Pyx_XDECREF(__pyx_t_3);
8222 __Pyx_AddTraceback("lxml.objectify.NumberElement.__or__");
8225 __Pyx_XGIVEREF(__pyx_r);
8226 __Pyx_FinishRefcountContext();
8230 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":749
8231 * return _numericValueOf(self) | _numericValueOf(other)
8233 * def __xor__(self, other): # <<<<<<<<<<<<<<
8234 * return _numericValueOf(self) ^ _numericValueOf(other)
8238 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8239 static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement___xor__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8240 PyObject *__pyx_r = NULL;
8241 PyObject *__pyx_t_1 = NULL;
8242 PyObject *__pyx_t_2 = NULL;
8243 PyObject *__pyx_t_3 = NULL;
8244 __Pyx_SetupRefcountContext("__xor__");
8246 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":750
8248 * def __xor__(self, other):
8249 * return _numericValueOf(self) ^ _numericValueOf(other) # <<<<<<<<<<<<<<
8251 * cdef class IntElement(NumberElement):
8253 __Pyx_XDECREF(__pyx_r);
8254 __pyx_t_1 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8255 __Pyx_GOTREF(__pyx_t_1);
8256 __pyx_t_2 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8257 __Pyx_GOTREF(__pyx_t_2);
8258 __pyx_t_3 = PyNumber_Xor(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8259 __Pyx_GOTREF(__pyx_t_3);
8260 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8261 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8262 __pyx_r = __pyx_t_3;
8266 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8269 __Pyx_XDECREF(__pyx_t_1);
8270 __Pyx_XDECREF(__pyx_t_2);
8271 __Pyx_XDECREF(__pyx_t_3);
8272 __Pyx_AddTraceback("lxml.objectify.NumberElement.__xor__");
8275 __Pyx_XGIVEREF(__pyx_r);
8276 __Pyx_FinishRefcountContext();
8280 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":753
8282 * cdef class IntElement(NumberElement):
8283 * def _init(self): # <<<<<<<<<<<<<<
8284 * self._parse_value = int
8288 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8289 static PyObject *__pyx_pf_4lxml_9objectify_10IntElement__init(PyObject *__pyx_v_self, PyObject *unused) {
8290 PyObject *__pyx_r = NULL;
8291 __Pyx_SetupRefcountContext("_init");
8293 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":754
8294 * cdef class IntElement(NumberElement):
8296 * self._parse_value = int # <<<<<<<<<<<<<<
8298 * cdef class LongElement(NumberElement):
8300 __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
8301 __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
8302 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value);
8303 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value);
8304 ((struct __pyx_obj_4lxml_9objectify_IntElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyInt_Type));
8306 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8307 __Pyx_XGIVEREF(__pyx_r);
8308 __Pyx_FinishRefcountContext();
8312 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":757
8314 * cdef class LongElement(NumberElement):
8315 * def _init(self): # <<<<<<<<<<<<<<
8316 * self._parse_value = long
8320 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8321 static PyObject *__pyx_pf_4lxml_9objectify_11LongElement__init(PyObject *__pyx_v_self, PyObject *unused) {
8322 PyObject *__pyx_r = NULL;
8323 __Pyx_SetupRefcountContext("_init");
8325 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":758
8326 * cdef class LongElement(NumberElement):
8328 * self._parse_value = long # <<<<<<<<<<<<<<
8330 * cdef class FloatElement(NumberElement):
8332 __Pyx_INCREF(((PyObject *)((PyObject*)&PyLong_Type)));
8333 __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyLong_Type)));
8334 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value);
8335 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value);
8336 ((struct __pyx_obj_4lxml_9objectify_LongElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyLong_Type));
8338 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8339 __Pyx_XGIVEREF(__pyx_r);
8340 __Pyx_FinishRefcountContext();
8344 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":761
8346 * cdef class FloatElement(NumberElement):
8347 * def _init(self): # <<<<<<<<<<<<<<
8348 * self._parse_value = float
8352 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8353 static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(PyObject *__pyx_v_self, PyObject *unused) {
8354 PyObject *__pyx_r = NULL;
8355 __Pyx_SetupRefcountContext("_init");
8357 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":762
8358 * cdef class FloatElement(NumberElement):
8360 * self._parse_value = float # <<<<<<<<<<<<<<
8362 * cdef class StringElement(ObjectifiedDataElement):
8364 __Pyx_INCREF(((PyObject *)((PyObject*)&PyFloat_Type)));
8365 __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyFloat_Type)));
8366 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value);
8367 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value);
8368 ((struct __pyx_obj_4lxml_9objectify_FloatElement *)__pyx_v_self)->__pyx_base._parse_value = ((PyObject *)((PyObject*)&PyFloat_Type));
8370 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8371 __Pyx_XGIVEREF(__pyx_r);
8372 __Pyx_FinishRefcountContext();
8376 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":772
8379 * def __get__(self): # <<<<<<<<<<<<<<
8380 * return textOf(self._c_node) or u''
8384 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
8385 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(PyObject *__pyx_v_self) {
8386 PyObject *__pyx_r = NULL;
8387 PyObject *__pyx_t_1 = NULL;
8389 PyObject *__pyx_t_3 = NULL;
8390 __Pyx_SetupRefcountContext("__get__");
8392 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":773
8394 * def __get__(self):
8395 * return textOf(self._c_node) or u'' # <<<<<<<<<<<<<<
8397 * def __repr__(self):
8399 __Pyx_XDECREF(__pyx_r);
8400 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8401 __Pyx_GOTREF(__pyx_t_1);
8402 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8404 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8405 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
8406 __pyx_t_3 = __pyx_kp_u_4;
8408 __pyx_t_3 = __pyx_t_1;
8411 __pyx_r = __pyx_t_3;
8415 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8418 __Pyx_XDECREF(__pyx_t_1);
8419 __Pyx_XDECREF(__pyx_t_3);
8420 __Pyx_AddTraceback("lxml.objectify.StringElement.pyval.__get__");
8423 __Pyx_XGIVEREF(__pyx_r);
8424 __Pyx_FinishRefcountContext();
8428 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":775
8429 * return textOf(self._c_node) or u''
8431 * def __repr__(self): # <<<<<<<<<<<<<<
8432 * return repr(textOf(self._c_node) or u'')
8436 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(PyObject *__pyx_v_self); /*proto*/
8437 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(PyObject *__pyx_v_self) {
8438 PyObject *__pyx_r = NULL;
8439 PyObject *__pyx_t_1 = NULL;
8441 PyObject *__pyx_t_3 = NULL;
8442 __Pyx_SetupRefcountContext("__repr__");
8444 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":776
8446 * def __repr__(self):
8447 * return repr(textOf(self._c_node) or u'') # <<<<<<<<<<<<<<
8451 __Pyx_XDECREF(__pyx_r);
8452 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8453 __Pyx_GOTREF(__pyx_t_1);
8454 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8456 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8457 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
8458 __pyx_t_3 = __pyx_kp_u_4;
8460 __pyx_t_3 = __pyx_t_1;
8463 __pyx_t_1 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 776; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8464 __Pyx_GOTREF(__pyx_t_1);
8465 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8466 __pyx_r = __pyx_t_1;
8470 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8473 __Pyx_XDECREF(__pyx_t_1);
8474 __Pyx_XDECREF(__pyx_t_3);
8475 __Pyx_AddTraceback("lxml.objectify.StringElement.__repr__");
8478 __Pyx_XGIVEREF(__pyx_r);
8479 __Pyx_FinishRefcountContext();
8483 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":778
8484 * return repr(textOf(self._c_node) or u'')
8486 * def strlen(self): # <<<<<<<<<<<<<<
8487 * text = textOf(self._c_node)
8491 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_strlen(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
8492 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_strlen(PyObject *__pyx_v_self, PyObject *unused) {
8493 PyObject *__pyx_v_text;
8494 PyObject *__pyx_r = NULL;
8495 PyObject *__pyx_t_1 = NULL;
8497 Py_ssize_t __pyx_t_3;
8498 __Pyx_SetupRefcountContext("strlen");
8499 __Pyx_INCREF((PyObject *)__pyx_v_self);
8500 __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);
8502 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":779
8505 * text = textOf(self._c_node) # <<<<<<<<<<<<<<
8509 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8510 __Pyx_GOTREF(__pyx_t_1);
8511 __Pyx_DECREF(__pyx_v_text);
8512 __pyx_v_text = __pyx_t_1;
8515 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":780
8517 * text = textOf(self._c_node)
8518 * if text is None: # <<<<<<<<<<<<<<
8522 __pyx_t_2 = (__pyx_v_text == Py_None);
8525 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":781
8526 * text = textOf(self._c_node)
8528 * return 0 # <<<<<<<<<<<<<<
8532 __Pyx_XDECREF(__pyx_r);
8533 __Pyx_INCREF(__pyx_int_0);
8534 __pyx_r = __pyx_int_0;
8540 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":783
8543 * return len(text) # <<<<<<<<<<<<<<
8545 * def __nonzero__(self):
8547 __Pyx_XDECREF(__pyx_r);
8548 __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8549 __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8550 __Pyx_GOTREF(__pyx_t_1);
8551 __pyx_r = __pyx_t_1;
8557 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8560 __Pyx_XDECREF(__pyx_t_1);
8561 __Pyx_AddTraceback("lxml.objectify.StringElement.strlen");
8564 __Pyx_DECREF(__pyx_v_text);
8565 __Pyx_DECREF((PyObject *)__pyx_v_self);
8566 __Pyx_XGIVEREF(__pyx_r);
8567 __Pyx_FinishRefcountContext();
8571 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":785
8574 * def __nonzero__(self): # <<<<<<<<<<<<<<
8575 * text = textOf(self._c_node)
8579 static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
8580 static int __pyx_pf_4lxml_9objectify_13StringElement___nonzero__(PyObject *__pyx_v_self) {
8581 PyObject *__pyx_v_text;
8583 PyObject *__pyx_t_1 = NULL;
8585 Py_ssize_t __pyx_t_3;
8586 __Pyx_SetupRefcountContext("__nonzero__");
8587 __Pyx_INCREF((PyObject *)__pyx_v_self);
8588 __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);
8590 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":786
8592 * def __nonzero__(self):
8593 * text = textOf(self._c_node) # <<<<<<<<<<<<<<
8597 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8598 __Pyx_GOTREF(__pyx_t_1);
8599 __Pyx_DECREF(__pyx_v_text);
8600 __pyx_v_text = __pyx_t_1;
8603 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":787
8604 * def __nonzero__(self):
8605 * text = textOf(self._c_node)
8606 * if text is None: # <<<<<<<<<<<<<<
8608 * return len(text) > 0
8610 __pyx_t_2 = (__pyx_v_text == Py_None);
8613 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":788
8614 * text = textOf(self._c_node)
8616 * return False # <<<<<<<<<<<<<<
8617 * return len(text) > 0
8626 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":789
8629 * return len(text) > 0 # <<<<<<<<<<<<<<
8631 * def __richcmp__(self, other, int op):
8633 __pyx_t_3 = PyObject_Length(__pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8634 __pyx_r = (__pyx_t_3 > 0);
8640 __Pyx_XDECREF(__pyx_t_1);
8641 __Pyx_AddTraceback("lxml.objectify.StringElement.__nonzero__");
8644 __Pyx_DECREF(__pyx_v_text);
8645 __Pyx_DECREF((PyObject *)__pyx_v_self);
8646 __Pyx_FinishRefcountContext();
8650 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":791
8651 * return len(text) > 0
8653 * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
8654 * return _richcmpPyvals(self, other, op)
8658 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
8659 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
8660 PyObject *__pyx_r = NULL;
8661 PyObject *__pyx_t_1 = NULL;
8662 __Pyx_SetupRefcountContext("__richcmp__");
8664 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":792
8666 * def __richcmp__(self, other, int op):
8667 * return _richcmpPyvals(self, other, op) # <<<<<<<<<<<<<<
8669 * def __add__(self, other):
8671 __Pyx_XDECREF(__pyx_r);
8672 __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8673 __Pyx_GOTREF(__pyx_t_1);
8674 __pyx_r = __pyx_t_1;
8678 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8681 __Pyx_XDECREF(__pyx_t_1);
8682 __Pyx_AddTraceback("lxml.objectify.StringElement.__richcmp__");
8685 __Pyx_XGIVEREF(__pyx_r);
8686 __Pyx_FinishRefcountContext();
8690 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":794
8691 * return _richcmpPyvals(self, other, op)
8693 * def __add__(self, other): # <<<<<<<<<<<<<<
8694 * text = _strValueOf(self)
8695 * other = _strValueOf(other)
8698 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8699 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8700 PyObject *__pyx_v_text;
8701 PyObject *__pyx_r = NULL;
8702 PyObject *__pyx_t_1 = NULL;
8704 __Pyx_SetupRefcountContext("__add__");
8705 __Pyx_INCREF(__pyx_v_self);
8706 __Pyx_INCREF(__pyx_v_other);
8707 __pyx_v_text = Py_None; __Pyx_INCREF(Py_None);
8709 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":795
8711 * def __add__(self, other):
8712 * text = _strValueOf(self) # <<<<<<<<<<<<<<
8713 * other = _strValueOf(other)
8716 __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8717 __Pyx_GOTREF(__pyx_t_1);
8718 __Pyx_DECREF(__pyx_v_text);
8719 __pyx_v_text = __pyx_t_1;
8722 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":796
8723 * def __add__(self, other):
8724 * text = _strValueOf(self)
8725 * other = _strValueOf(other) # <<<<<<<<<<<<<<
8729 __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_other); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8730 __Pyx_GOTREF(__pyx_t_1);
8731 __Pyx_DECREF(__pyx_v_other);
8732 __pyx_v_other = __pyx_t_1;
8735 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":797
8736 * text = _strValueOf(self)
8737 * other = _strValueOf(other)
8738 * if text is None: # <<<<<<<<<<<<<<
8742 __pyx_t_2 = (__pyx_v_text == Py_None);
8745 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":798
8746 * other = _strValueOf(other)
8748 * return other # <<<<<<<<<<<<<<
8752 __Pyx_XDECREF(__pyx_r);
8753 __Pyx_INCREF(__pyx_v_other);
8754 __pyx_r = __pyx_v_other;
8760 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":799
8763 * if other is None: # <<<<<<<<<<<<<<
8765 * return text + other
8767 __pyx_t_2 = (__pyx_v_other == Py_None);
8770 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":800
8773 * return text # <<<<<<<<<<<<<<
8774 * return text + other
8777 __Pyx_XDECREF(__pyx_r);
8778 __Pyx_INCREF(__pyx_v_text);
8779 __pyx_r = __pyx_v_text;
8785 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":801
8788 * return text + other # <<<<<<<<<<<<<<
8790 * def __mul__(self, other):
8792 __Pyx_XDECREF(__pyx_r);
8793 __pyx_t_1 = PyNumber_Add(__pyx_v_text, __pyx_v_other); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8794 __Pyx_GOTREF(__pyx_t_1);
8795 __pyx_r = __pyx_t_1;
8799 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8802 __Pyx_XDECREF(__pyx_t_1);
8803 __Pyx_AddTraceback("lxml.objectify.StringElement.__add__");
8806 __Pyx_DECREF(__pyx_v_text);
8807 __Pyx_DECREF(__pyx_v_self);
8808 __Pyx_DECREF(__pyx_v_other);
8809 __Pyx_XGIVEREF(__pyx_r);
8810 __Pyx_FinishRefcountContext();
8814 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":803
8815 * return text + other
8817 * def __mul__(self, other): # <<<<<<<<<<<<<<
8818 * if isinstance(self, StringElement):
8819 * return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8822 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8823 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8824 PyObject *__pyx_r = NULL;
8826 PyObject *__pyx_t_2 = NULL;
8827 PyObject *__pyx_t_3 = NULL;
8828 PyObject *__pyx_t_4 = NULL;
8829 __Pyx_SetupRefcountContext("__mul__");
8830 __Pyx_INCREF(__pyx_v_self);
8831 __Pyx_INCREF(__pyx_v_other);
8833 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":804
8835 * def __mul__(self, other):
8836 * if isinstance(self, StringElement): # <<<<<<<<<<<<<<
8837 * return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8838 * elif isinstance(other, StringElement):
8840 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_self, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
8843 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":805
8844 * def __mul__(self, other):
8845 * if isinstance(self, StringElement):
8846 * return textOf((<StringElement>self)._c_node) * _numericValueOf(other) # <<<<<<<<<<<<<<
8847 * elif isinstance(other, StringElement):
8848 * return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
8850 __Pyx_XDECREF(__pyx_r);
8851 __pyx_t_2 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8852 __Pyx_GOTREF(__pyx_t_2);
8853 __pyx_t_3 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_other); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8854 __Pyx_GOTREF(__pyx_t_3);
8855 __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8856 __Pyx_GOTREF(__pyx_t_4);
8857 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8858 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8859 __pyx_r = __pyx_t_4;
8865 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":806
8866 * if isinstance(self, StringElement):
8867 * return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8868 * elif isinstance(other, StringElement): # <<<<<<<<<<<<<<
8869 * return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
8872 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_other, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
8875 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":807
8876 * return textOf((<StringElement>self)._c_node) * _numericValueOf(other)
8877 * elif isinstance(other, StringElement):
8878 * return _numericValueOf(self) * textOf((<StringElement>other)._c_node) # <<<<<<<<<<<<<<
8880 * raise TypeError, u"invalid types for * operator"
8882 __Pyx_XDECREF(__pyx_r);
8883 __pyx_t_4 = __pyx_f_4lxml_9objectify__numericValueOf(__pyx_v_self); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8884 __Pyx_GOTREF(__pyx_t_4);
8885 __pyx_t_3 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_other)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8886 __Pyx_GOTREF(__pyx_t_3);
8887 __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8888 __Pyx_GOTREF(__pyx_t_2);
8889 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8890 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8891 __pyx_r = __pyx_t_2;
8898 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":809
8899 * return _numericValueOf(self) * textOf((<StringElement>other)._c_node)
8901 * raise TypeError, u"invalid types for * operator" # <<<<<<<<<<<<<<
8903 * def __mod__(self, other):
8905 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_13), 0);
8906 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8910 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8913 __Pyx_XDECREF(__pyx_t_2);
8914 __Pyx_XDECREF(__pyx_t_3);
8915 __Pyx_XDECREF(__pyx_t_4);
8916 __Pyx_AddTraceback("lxml.objectify.StringElement.__mul__");
8919 __Pyx_DECREF(__pyx_v_self);
8920 __Pyx_DECREF(__pyx_v_other);
8921 __Pyx_XGIVEREF(__pyx_r);
8922 __Pyx_FinishRefcountContext();
8926 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":811
8927 * raise TypeError, u"invalid types for * operator"
8929 * def __mod__(self, other): # <<<<<<<<<<<<<<
8930 * return _strValueOf(self) % other
8934 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
8935 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___mod__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
8936 PyObject *__pyx_r = NULL;
8937 PyObject *__pyx_t_1 = NULL;
8938 PyObject *__pyx_t_2 = NULL;
8939 __Pyx_SetupRefcountContext("__mod__");
8941 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":812
8943 * def __mod__(self, other):
8944 * return _strValueOf(self) % other # <<<<<<<<<<<<<<
8946 * def __int__(self):
8948 __Pyx_XDECREF(__pyx_r);
8949 __pyx_t_1 = __pyx_f_4lxml_9objectify__strValueOf(__pyx_v_self); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8950 __Pyx_GOTREF(__pyx_t_1);
8951 __pyx_t_2 = PyNumber_Remainder(__pyx_t_1, __pyx_v_other); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8952 __Pyx_GOTREF(__pyx_t_2);
8953 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8954 __pyx_r = __pyx_t_2;
8958 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8961 __Pyx_XDECREF(__pyx_t_1);
8962 __Pyx_XDECREF(__pyx_t_2);
8963 __Pyx_AddTraceback("lxml.objectify.StringElement.__mod__");
8966 __Pyx_XGIVEREF(__pyx_r);
8967 __Pyx_FinishRefcountContext();
8971 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":814
8972 * return _strValueOf(self) % other
8974 * def __int__(self): # <<<<<<<<<<<<<<
8975 * return int(textOf(self._c_node))
8979 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___int__(PyObject *__pyx_v_self); /*proto*/
8980 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___int__(PyObject *__pyx_v_self) {
8981 PyObject *__pyx_r = NULL;
8982 PyObject *__pyx_t_1 = NULL;
8983 PyObject *__pyx_t_2 = NULL;
8984 __Pyx_SetupRefcountContext("__int__");
8986 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":815
8988 * def __int__(self):
8989 * return int(textOf(self._c_node)) # <<<<<<<<<<<<<<
8991 * def __long__(self):
8993 __Pyx_XDECREF(__pyx_r);
8994 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8995 __Pyx_GOTREF(__pyx_t_1);
8996 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8997 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8998 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
8999 __Pyx_GIVEREF(__pyx_t_1);
9001 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9002 __Pyx_GOTREF(__pyx_t_1);
9003 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9004 __pyx_r = __pyx_t_1;
9008 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9011 __Pyx_XDECREF(__pyx_t_1);
9012 __Pyx_XDECREF(__pyx_t_2);
9013 __Pyx_AddTraceback("lxml.objectify.StringElement.__int__");
9016 __Pyx_XGIVEREF(__pyx_r);
9017 __Pyx_FinishRefcountContext();
9021 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":817
9022 * return int(textOf(self._c_node))
9024 * def __long__(self): # <<<<<<<<<<<<<<
9025 * return long(textOf(self._c_node))
9029 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___long__(PyObject *__pyx_v_self); /*proto*/
9030 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___long__(PyObject *__pyx_v_self) {
9031 PyObject *__pyx_r = NULL;
9032 PyObject *__pyx_t_1 = NULL;
9033 PyObject *__pyx_t_2 = NULL;
9034 __Pyx_SetupRefcountContext("__long__");
9036 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":818
9038 * def __long__(self):
9039 * return long(textOf(self._c_node)) # <<<<<<<<<<<<<<
9041 * def __float__(self):
9043 __Pyx_XDECREF(__pyx_r);
9044 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9045 __Pyx_GOTREF(__pyx_t_1);
9046 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9047 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
9048 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9049 __Pyx_GIVEREF(__pyx_t_1);
9051 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyLong_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9052 __Pyx_GOTREF(__pyx_t_1);
9053 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9054 __pyx_r = __pyx_t_1;
9058 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9061 __Pyx_XDECREF(__pyx_t_1);
9062 __Pyx_XDECREF(__pyx_t_2);
9063 __Pyx_AddTraceback("lxml.objectify.StringElement.__long__");
9066 __Pyx_XGIVEREF(__pyx_r);
9067 __Pyx_FinishRefcountContext();
9071 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":820
9072 * return long(textOf(self._c_node))
9074 * def __float__(self): # <<<<<<<<<<<<<<
9075 * return float(textOf(self._c_node))
9079 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___float__(PyObject *__pyx_v_self); /*proto*/
9080 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___float__(PyObject *__pyx_v_self) {
9081 PyObject *__pyx_r = NULL;
9082 PyObject *__pyx_t_1 = NULL;
9083 PyObject *__pyx_t_2 = NULL;
9084 __Pyx_SetupRefcountContext("__float__");
9086 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":821
9088 * def __float__(self):
9089 * return float(textOf(self._c_node)) # <<<<<<<<<<<<<<
9091 * def __complex__(self):
9093 __Pyx_XDECREF(__pyx_r);
9094 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9095 __Pyx_GOTREF(__pyx_t_1);
9096 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9097 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
9098 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9099 __Pyx_GIVEREF(__pyx_t_1);
9101 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)&PyFloat_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9102 __Pyx_GOTREF(__pyx_t_1);
9103 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9104 __pyx_r = __pyx_t_1;
9108 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9111 __Pyx_XDECREF(__pyx_t_1);
9112 __Pyx_XDECREF(__pyx_t_2);
9113 __Pyx_AddTraceback("lxml.objectify.StringElement.__float__");
9116 __Pyx_XGIVEREF(__pyx_r);
9117 __Pyx_FinishRefcountContext();
9121 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":823
9122 * return float(textOf(self._c_node))
9124 * def __complex__(self): # <<<<<<<<<<<<<<
9125 * return complex(textOf(self._c_node))
9129 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___complex__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
9130 static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___complex__(PyObject *__pyx_v_self, PyObject *unused) {
9131 PyObject *__pyx_r = NULL;
9132 PyObject *__pyx_t_1 = NULL;
9133 PyObject *__pyx_t_2 = NULL;
9134 __Pyx_SetupRefcountContext("__complex__");
9136 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":824
9138 * def __complex__(self):
9139 * return complex(textOf(self._c_node)) # <<<<<<<<<<<<<<
9141 * cdef class NoneElement(ObjectifiedDataElement):
9143 __Pyx_XDECREF(__pyx_r);
9144 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_StringElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9145 __Pyx_GOTREF(__pyx_t_1);
9146 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9147 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
9148 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
9149 __Pyx_GIVEREF(__pyx_t_1);
9151 __pyx_t_1 = PyObject_Call(((PyObject*)&PyComplex_Type), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9152 __Pyx_GOTREF(__pyx_t_1);
9153 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
9154 __pyx_r = __pyx_t_1;
9158 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9161 __Pyx_XDECREF(__pyx_t_1);
9162 __Pyx_XDECREF(__pyx_t_2);
9163 __Pyx_AddTraceback("lxml.objectify.StringElement.__complex__");
9166 __Pyx_XGIVEREF(__pyx_r);
9167 __Pyx_FinishRefcountContext();
9171 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":827
9173 * cdef class NoneElement(ObjectifiedDataElement):
9174 * def __str__(self): # <<<<<<<<<<<<<<
9179 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self); /*proto*/
9180 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___str__(PyObject *__pyx_v_self) {
9181 PyObject *__pyx_r = NULL;
9182 __Pyx_SetupRefcountContext("__str__");
9184 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":828
9185 * cdef class NoneElement(ObjectifiedDataElement):
9186 * def __str__(self):
9187 * return u"None" # <<<<<<<<<<<<<<
9189 * def __repr__(self):
9191 __Pyx_XDECREF(__pyx_r);
9192 __Pyx_INCREF(((PyObject *)__pyx_n_u_None));
9193 __pyx_r = ((PyObject *)__pyx_n_u_None);
9196 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9198 __Pyx_XGIVEREF(__pyx_r);
9199 __Pyx_FinishRefcountContext();
9203 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":830
9206 * def __repr__(self): # <<<<<<<<<<<<<<
9211 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self); /*proto*/
9212 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___repr__(PyObject *__pyx_v_self) {
9213 PyObject *__pyx_r = NULL;
9214 __Pyx_SetupRefcountContext("__repr__");
9216 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":831
9218 * def __repr__(self):
9219 * return u"None" # <<<<<<<<<<<<<<
9221 * def __nonzero__(self):
9223 __Pyx_XDECREF(__pyx_r);
9224 __Pyx_INCREF(((PyObject *)__pyx_n_u_None));
9225 __pyx_r = ((PyObject *)__pyx_n_u_None);
9228 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9230 __Pyx_XGIVEREF(__pyx_r);
9231 __Pyx_FinishRefcountContext();
9235 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":833
9238 * def __nonzero__(self): # <<<<<<<<<<<<<<
9243 static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
9244 static int __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__(PyObject *__pyx_v_self) {
9246 __Pyx_SetupRefcountContext("__nonzero__");
9248 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":834
9250 * def __nonzero__(self):
9251 * return False # <<<<<<<<<<<<<<
9253 * def __richcmp__(self, other, int op):
9260 __Pyx_FinishRefcountContext();
9264 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":836
9267 * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
9268 * if other is None or self is None:
9269 * return python.PyObject_RichCompare(None, None, op)
9272 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
9273 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
9274 PyObject *__pyx_r = NULL;
9278 PyObject *__pyx_t_4 = NULL;
9279 __Pyx_SetupRefcountContext("__richcmp__");
9280 __Pyx_INCREF(__pyx_v_self);
9281 __Pyx_INCREF(__pyx_v_other);
9283 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":837
9285 * def __richcmp__(self, other, int op):
9286 * if other is None or self is None: # <<<<<<<<<<<<<<
9287 * return python.PyObject_RichCompare(None, None, op)
9288 * if isinstance(self, NoneElement):
9290 __pyx_t_1 = (__pyx_v_other == Py_None);
9292 __pyx_t_2 = (__pyx_v_self == Py_None);
9293 __pyx_t_3 = __pyx_t_2;
9295 __pyx_t_3 = __pyx_t_1;
9299 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":838
9300 * def __richcmp__(self, other, int op):
9301 * if other is None or self is None:
9302 * return python.PyObject_RichCompare(None, None, op) # <<<<<<<<<<<<<<
9303 * if isinstance(self, NoneElement):
9304 * return python.PyObject_RichCompare(None, other, op)
9306 __Pyx_XDECREF(__pyx_r);
9307 __pyx_t_4 = PyObject_RichCompare(Py_None, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9308 __Pyx_GOTREF(__pyx_t_4);
9309 __pyx_r = __pyx_t_4;
9316 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":839
9317 * if other is None or self is None:
9318 * return python.PyObject_RichCompare(None, None, op)
9319 * if isinstance(self, NoneElement): # <<<<<<<<<<<<<<
9320 * return python.PyObject_RichCompare(None, other, op)
9323 __pyx_t_3 = PyObject_TypeCheck(__pyx_v_self, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
9326 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":840
9327 * return python.PyObject_RichCompare(None, None, op)
9328 * if isinstance(self, NoneElement):
9329 * return python.PyObject_RichCompare(None, other, op) # <<<<<<<<<<<<<<
9331 * return python.PyObject_RichCompare(self, None, op)
9333 __Pyx_XDECREF(__pyx_r);
9334 __pyx_t_4 = PyObject_RichCompare(Py_None, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9335 __Pyx_GOTREF(__pyx_t_4);
9336 __pyx_r = __pyx_t_4;
9343 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":842
9344 * return python.PyObject_RichCompare(None, other, op)
9346 * return python.PyObject_RichCompare(self, None, op) # <<<<<<<<<<<<<<
9350 __Pyx_XDECREF(__pyx_r);
9351 __pyx_t_4 = PyObject_RichCompare(__pyx_v_self, Py_None, __pyx_v_op); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9352 __Pyx_GOTREF(__pyx_t_4);
9353 __pyx_r = __pyx_t_4;
9359 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9362 __Pyx_XDECREF(__pyx_t_4);
9363 __Pyx_AddTraceback("lxml.objectify.NoneElement.__richcmp__");
9366 __Pyx_DECREF(__pyx_v_self);
9367 __Pyx_DECREF(__pyx_v_other);
9368 __Pyx_XGIVEREF(__pyx_r);
9369 __Pyx_FinishRefcountContext();
9373 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":845
9376 * def __get__(self): # <<<<<<<<<<<<<<
9381 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
9382 static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(PyObject *__pyx_v_self) {
9383 PyObject *__pyx_r = NULL;
9384 __Pyx_SetupRefcountContext("__get__");
9386 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":846
9388 * def __get__(self):
9389 * return None # <<<<<<<<<<<<<<
9391 * cdef class BoolElement(IntElement):
9393 __Pyx_XDECREF(__pyx_r);
9394 __Pyx_INCREF(Py_None);
9398 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9400 __Pyx_XGIVEREF(__pyx_r);
9401 __Pyx_FinishRefcountContext();
9405 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":854
9406 * Python's bool type.
9408 * def _init(self): # <<<<<<<<<<<<<<
9409 * self._parse_value = __parseBool
9413 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
9414 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(PyObject *__pyx_v_self, PyObject *unused) {
9415 PyObject *__pyx_r = NULL;
9416 PyObject *__pyx_t_1 = NULL;
9417 __Pyx_SetupRefcountContext("_init");
9419 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":855
9422 * self._parse_value = __parseBool # <<<<<<<<<<<<<<
9424 * def __nonzero__(self):
9426 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui___parseBool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 855; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9427 __Pyx_GOTREF(__pyx_t_1);
9428 __Pyx_GIVEREF(__pyx_t_1);
9429 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value);
9430 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value);
9431 ((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base._parse_value = __pyx_t_1;
9434 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9437 __Pyx_XDECREF(__pyx_t_1);
9438 __Pyx_AddTraceback("lxml.objectify.BoolElement._init");
9441 __Pyx_XGIVEREF(__pyx_r);
9442 __Pyx_FinishRefcountContext();
9446 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":857
9447 * self._parse_value = __parseBool
9449 * def __nonzero__(self): # <<<<<<<<<<<<<<
9450 * return __parseBool(textOf(self._c_node))
9454 static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self); /*proto*/
9455 static int __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__(PyObject *__pyx_v_self) {
9457 PyObject *__pyx_t_1 = NULL;
9458 PyObject *__pyx_t_2 = NULL;
9460 __Pyx_SetupRefcountContext("__nonzero__");
9462 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":858
9464 * def __nonzero__(self):
9465 * return __parseBool(textOf(self._c_node)) # <<<<<<<<<<<<<<
9467 * def __richcmp__(self, other, int op):
9469 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9470 __Pyx_GOTREF(__pyx_t_1);
9471 __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9472 __Pyx_GOTREF(__pyx_t_2);
9473 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9474 __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9475 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9476 __pyx_r = __pyx_t_3;
9482 __Pyx_XDECREF(__pyx_t_1);
9483 __Pyx_XDECREF(__pyx_t_2);
9484 __Pyx_AddTraceback("lxml.objectify.BoolElement.__nonzero__");
9487 __Pyx_FinishRefcountContext();
9491 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":860
9492 * return __parseBool(textOf(self._c_node))
9494 * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<<
9495 * return _richcmpPyvals(self, other, op)
9499 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/
9500 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) {
9501 PyObject *__pyx_r = NULL;
9502 PyObject *__pyx_t_1 = NULL;
9503 __Pyx_SetupRefcountContext("__richcmp__");
9505 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":861
9507 * def __richcmp__(self, other, int op):
9508 * return _richcmpPyvals(self, other, op) # <<<<<<<<<<<<<<
9510 * def __str__(self):
9512 __Pyx_XDECREF(__pyx_r);
9513 __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(__pyx_v_self, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9514 __Pyx_GOTREF(__pyx_t_1);
9515 __pyx_r = __pyx_t_1;
9519 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9522 __Pyx_XDECREF(__pyx_t_1);
9523 __Pyx_AddTraceback("lxml.objectify.BoolElement.__richcmp__");
9526 __Pyx_XGIVEREF(__pyx_r);
9527 __Pyx_FinishRefcountContext();
9531 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":863
9532 * return _richcmpPyvals(self, other, op)
9534 * def __str__(self): # <<<<<<<<<<<<<<
9535 * return unicode(__parseBool(textOf(self._c_node)))
9539 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self); /*proto*/
9540 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___str__(PyObject *__pyx_v_self) {
9541 PyObject *__pyx_r = NULL;
9542 PyObject *__pyx_t_1 = NULL;
9543 PyObject *__pyx_t_2 = NULL;
9544 __Pyx_SetupRefcountContext("__str__");
9546 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":864
9548 * def __str__(self):
9549 * return unicode(__parseBool(textOf(self._c_node))) # <<<<<<<<<<<<<<
9551 * def __repr__(self):
9553 __Pyx_XDECREF(__pyx_r);
9554 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9555 __Pyx_GOTREF(__pyx_t_1);
9556 __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9557 __Pyx_GOTREF(__pyx_t_2);
9558 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9559 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9560 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
9561 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
9562 __Pyx_GIVEREF(__pyx_t_2);
9564 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9565 __Pyx_GOTREF(__pyx_t_2);
9566 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9567 __pyx_r = __pyx_t_2;
9571 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9574 __Pyx_XDECREF(__pyx_t_1);
9575 __Pyx_XDECREF(__pyx_t_2);
9576 __Pyx_AddTraceback("lxml.objectify.BoolElement.__str__");
9579 __Pyx_XGIVEREF(__pyx_r);
9580 __Pyx_FinishRefcountContext();
9584 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":866
9585 * return unicode(__parseBool(textOf(self._c_node)))
9587 * def __repr__(self): # <<<<<<<<<<<<<<
9588 * return repr(__parseBool(textOf(self._c_node)))
9592 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self); /*proto*/
9593 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement___repr__(PyObject *__pyx_v_self) {
9594 PyObject *__pyx_r = NULL;
9595 PyObject *__pyx_t_1 = NULL;
9596 PyObject *__pyx_t_2 = NULL;
9597 __Pyx_SetupRefcountContext("__repr__");
9599 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":867
9601 * def __repr__(self):
9602 * return repr(__parseBool(textOf(self._c_node))) # <<<<<<<<<<<<<<
9606 __Pyx_XDECREF(__pyx_r);
9607 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9608 __Pyx_GOTREF(__pyx_t_1);
9609 __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9610 __Pyx_GOTREF(__pyx_t_2);
9611 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9612 __pyx_t_1 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9613 __Pyx_GOTREF(__pyx_t_1);
9614 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9615 __pyx_r = __pyx_t_1;
9619 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9622 __Pyx_XDECREF(__pyx_t_1);
9623 __Pyx_XDECREF(__pyx_t_2);
9624 __Pyx_AddTraceback("lxml.objectify.BoolElement.__repr__");
9627 __Pyx_XGIVEREF(__pyx_r);
9628 __Pyx_FinishRefcountContext();
9632 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":870
9635 * def __get__(self): # <<<<<<<<<<<<<<
9636 * return __parseBool(textOf(self._c_node))
9640 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self); /*proto*/
9641 static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(PyObject *__pyx_v_self) {
9642 PyObject *__pyx_r = NULL;
9643 PyObject *__pyx_t_1 = NULL;
9644 PyObject *__pyx_t_2 = NULL;
9645 __Pyx_SetupRefcountContext("__get__");
9647 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":871
9649 * def __get__(self):
9650 * return __parseBool(textOf(self._c_node)) # <<<<<<<<<<<<<<
9652 * def __checkBool(s):
9654 __Pyx_XDECREF(__pyx_r);
9655 __pyx_t_1 = textOf(((struct __pyx_obj_4lxml_9objectify_BoolElement *)__pyx_v_self)->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9656 __Pyx_GOTREF(__pyx_t_1);
9657 __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9658 __Pyx_GOTREF(__pyx_t_2);
9659 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9660 __pyx_r = __pyx_t_2;
9664 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9667 __Pyx_XDECREF(__pyx_t_1);
9668 __Pyx_XDECREF(__pyx_t_2);
9669 __Pyx_AddTraceback("lxml.objectify.BoolElement.pyval.__get__");
9672 __Pyx_XGIVEREF(__pyx_r);
9673 __Pyx_FinishRefcountContext();
9677 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":873
9678 * return __parseBool(textOf(self._c_node))
9680 * def __checkBool(s): # <<<<<<<<<<<<<<
9681 * cdef int value = -1
9685 static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
9686 static PyObject *__pyx_pf_4lxml_9objectify___checkBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
9688 PyObject *__pyx_r = NULL;
9690 __Pyx_SetupRefcountContext("__checkBool");
9691 __pyx_self = __pyx_self;
9692 __Pyx_INCREF(__pyx_v_s);
9694 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":874
9696 * def __checkBool(s):
9697 * cdef int value = -1 # <<<<<<<<<<<<<<
9699 * value = __parseBoolAsInt(s)
9703 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":875
9704 * def __checkBool(s):
9705 * cdef int value = -1
9706 * if s is not None: # <<<<<<<<<<<<<<
9707 * value = __parseBoolAsInt(s)
9710 __pyx_t_1 = (__pyx_v_s != Py_None);
9713 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":876
9714 * cdef int value = -1
9716 * value = __parseBoolAsInt(s) # <<<<<<<<<<<<<<
9720 __pyx_v_value = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s);
9725 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":877
9727 * value = __parseBoolAsInt(s)
9728 * if value == -1: # <<<<<<<<<<<<<<
9732 __pyx_t_1 = (__pyx_v_value == -1);
9735 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":878
9736 * value = __parseBoolAsInt(s)
9738 * raise ValueError # <<<<<<<<<<<<<<
9740 * cpdef __parseBool(s):
9742 __Pyx_Raise(__pyx_builtin_ValueError, 0, 0);
9743 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9748 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9751 __Pyx_AddTraceback("lxml.objectify.__checkBool");
9754 __Pyx_DECREF(__pyx_v_s);
9755 __Pyx_XGIVEREF(__pyx_r);
9756 __Pyx_FinishRefcountContext();
9760 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":880
9763 * cpdef __parseBool(s): # <<<<<<<<<<<<<<
9768 static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
9769 static PyObject *__pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, int __pyx_skip_dispatch) {
9771 PyObject *__pyx_r = NULL;
9773 PyObject *__pyx_t_2 = NULL;
9774 __Pyx_SetupRefcountContext("__parseBool");
9775 __Pyx_INCREF(__pyx_v_s);
9777 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":882
9778 * cpdef __parseBool(s):
9780 * if s is None: # <<<<<<<<<<<<<<
9782 * value = __parseBoolAsInt(s)
9784 __pyx_t_1 = (__pyx_v_s == Py_None);
9787 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":883
9790 * return False # <<<<<<<<<<<<<<
9791 * value = __parseBoolAsInt(s)
9794 __Pyx_XDECREF(__pyx_r);
9795 __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9796 __Pyx_GOTREF(__pyx_t_2);
9797 __pyx_r = __pyx_t_2;
9804 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":884
9807 * value = __parseBoolAsInt(s) # <<<<<<<<<<<<<<
9809 * raise ValueError, u"Invalid boolean value: '%s'" % s
9811 __pyx_v_value = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s);
9813 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":885
9815 * value = __parseBoolAsInt(s)
9816 * if value == -1: # <<<<<<<<<<<<<<
9817 * raise ValueError, u"Invalid boolean value: '%s'" % s
9818 * return <bint>value
9820 __pyx_t_1 = (__pyx_v_value == -1);
9823 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":886
9824 * value = __parseBoolAsInt(s)
9826 * raise ValueError, u"Invalid boolean value: '%s'" % s # <<<<<<<<<<<<<<
9827 * return <bint>value
9830 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_14), __pyx_v_s); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9831 __Pyx_GOTREF(__pyx_t_2);
9832 __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_2, 0);
9833 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9834 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9839 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":887
9841 * raise ValueError, u"Invalid boolean value: '%s'" % s
9842 * return <bint>value # <<<<<<<<<<<<<<
9844 * cdef inline int __parseBoolAsInt(text):
9846 __Pyx_XDECREF(__pyx_r);
9847 __pyx_t_2 = __Pyx_PyBool_FromLong(((int)__pyx_v_value)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9848 __Pyx_GOTREF(__pyx_t_2);
9849 __pyx_r = __pyx_t_2;
9853 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9856 __Pyx_XDECREF(__pyx_t_2);
9857 __Pyx_AddTraceback("lxml.objectify.__parseBool");
9860 __Pyx_DECREF(__pyx_v_s);
9861 __Pyx_XGIVEREF(__pyx_r);
9862 __Pyx_FinishRefcountContext();
9866 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":880
9869 * cpdef __parseBool(s): # <<<<<<<<<<<<<<
9874 static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
9875 static PyObject *__pyx_pf_4lxml_9objectify___parseBool(PyObject *__pyx_self, PyObject *__pyx_v_s) {
9876 PyObject *__pyx_r = NULL;
9877 PyObject *__pyx_t_1 = NULL;
9878 __Pyx_SetupRefcountContext("__parseBool");
9879 __pyx_self = __pyx_self;
9880 __Pyx_XDECREF(__pyx_r);
9881 __pyx_t_1 = __pyx_f_4lxml_9objectify___parseBool(__pyx_v_s, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9882 __Pyx_GOTREF(__pyx_t_1);
9883 __pyx_r = __pyx_t_1;
9887 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9890 __Pyx_XDECREF(__pyx_t_1);
9891 __Pyx_AddTraceback("lxml.objectify.__parseBool");
9894 __Pyx_XGIVEREF(__pyx_r);
9895 __Pyx_FinishRefcountContext();
9899 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":889
9900 * return <bint>value
9902 * cdef inline int __parseBoolAsInt(text): # <<<<<<<<<<<<<<
9903 * if text == u'false':
9907 static INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__pyx_v_text) {
9909 PyObject *__pyx_t_1 = NULL;
9911 __Pyx_SetupRefcountContext("__parseBoolAsInt");
9912 __Pyx_INCREF(__pyx_v_text);
9914 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":890
9916 * cdef inline int __parseBoolAsInt(text):
9917 * if text == u'false': # <<<<<<<<<<<<<<
9919 * elif text == u'true':
9921 __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_n_u_false), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9922 __Pyx_GOTREF(__pyx_t_1);
9923 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9924 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9927 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":891
9928 * cdef inline int __parseBoolAsInt(text):
9929 * if text == u'false':
9930 * return 0 # <<<<<<<<<<<<<<
9931 * elif text == u'true':
9939 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":892
9940 * if text == u'false':
9942 * elif text == u'true': # <<<<<<<<<<<<<<
9944 * elif text == u'0':
9946 __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_n_u_true), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9947 __Pyx_GOTREF(__pyx_t_1);
9948 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9949 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9952 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":893
9954 * elif text == u'true':
9955 * return 1 # <<<<<<<<<<<<<<
9956 * elif text == u'0':
9964 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":894
9965 * elif text == u'true':
9967 * elif text == u'0': # <<<<<<<<<<<<<<
9969 * elif text == u'1':
9971 __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_u_0), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9972 __Pyx_GOTREF(__pyx_t_1);
9973 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9974 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9977 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":895
9979 * elif text == u'0':
9980 * return 0 # <<<<<<<<<<<<<<
9981 * elif text == u'1':
9989 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":896
9990 * elif text == u'0':
9992 * elif text == u'1': # <<<<<<<<<<<<<<
9996 __pyx_t_1 = PyObject_RichCompare(__pyx_v_text, ((PyObject *)__pyx_kp_u_15), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9997 __Pyx_GOTREF(__pyx_t_1);
9998 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9999 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10002 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":897
10004 * elif text == u'1':
10005 * return 1 # <<<<<<<<<<<<<<
10015 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":898
10016 * elif text == u'1':
10018 * return -1 # <<<<<<<<<<<<<<
10020 * cdef inline object _parseNumber(NumberElement element):
10028 __Pyx_XDECREF(__pyx_t_1);
10029 __Pyx_WriteUnraisable("lxml.objectify.__parseBoolAsInt");
10032 __Pyx_DECREF(__pyx_v_text);
10033 __Pyx_FinishRefcountContext();
10037 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":900
10040 * cdef inline object _parseNumber(NumberElement element): # <<<<<<<<<<<<<<
10041 * return element._parse_value(textOf(element._c_node))
10045 static INLINE PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9objectify_NumberElement *__pyx_v_element) {
10046 PyObject *__pyx_r = NULL;
10047 PyObject *__pyx_t_1 = NULL;
10048 PyObject *__pyx_t_2 = NULL;
10049 __Pyx_SetupRefcountContext("_parseNumber");
10051 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":901
10053 * cdef inline object _parseNumber(NumberElement element):
10054 * return element._parse_value(textOf(element._c_node)) # <<<<<<<<<<<<<<
10056 * cdef inline object _strValueOf(obj):
10058 __Pyx_XDECREF(__pyx_r);
10059 __pyx_t_1 = textOf(__pyx_v_element->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10060 __Pyx_GOTREF(__pyx_t_1);
10061 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10062 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
10063 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
10064 __Pyx_GIVEREF(__pyx_t_1);
10066 __pyx_t_1 = PyObject_Call(__pyx_v_element->_parse_value, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10067 __Pyx_GOTREF(__pyx_t_1);
10068 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
10069 __pyx_r = __pyx_t_1;
10073 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10076 __Pyx_XDECREF(__pyx_t_1);
10077 __Pyx_XDECREF(__pyx_t_2);
10078 __Pyx_AddTraceback("lxml.objectify._parseNumber");
10081 __Pyx_XGIVEREF(__pyx_r);
10082 __Pyx_FinishRefcountContext();
10086 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":903
10087 * return element._parse_value(textOf(element._c_node))
10089 * cdef inline object _strValueOf(obj): # <<<<<<<<<<<<<<
10090 * if python._isString(obj):
10094 static INLINE PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) {
10095 PyObject *__pyx_r = NULL;
10097 PyObject *__pyx_t_2 = NULL;
10098 PyObject *__pyx_t_3 = NULL;
10099 __Pyx_SetupRefcountContext("_strValueOf");
10100 __Pyx_INCREF(__pyx_v_obj);
10102 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":904
10104 * cdef inline object _strValueOf(obj):
10105 * if python._isString(obj): # <<<<<<<<<<<<<<
10107 * if isinstance(obj, _Element):
10109 __pyx_t_1 = _isString(__pyx_v_obj);
10112 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":905
10113 * cdef inline object _strValueOf(obj):
10114 * if python._isString(obj):
10115 * return obj # <<<<<<<<<<<<<<
10116 * if isinstance(obj, _Element):
10117 * return textOf((<_Element>obj)._c_node) or u''
10119 __Pyx_XDECREF(__pyx_r);
10120 __Pyx_INCREF(__pyx_v_obj);
10121 __pyx_r = __pyx_v_obj;
10127 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":906
10128 * if python._isString(obj):
10130 * if isinstance(obj, _Element): # <<<<<<<<<<<<<<
10131 * return textOf((<_Element>obj)._c_node) or u''
10134 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
10137 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":907
10139 * if isinstance(obj, _Element):
10140 * return textOf((<_Element>obj)._c_node) or u'' # <<<<<<<<<<<<<<
10144 __Pyx_XDECREF(__pyx_r);
10145 __pyx_t_2 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10146 __Pyx_GOTREF(__pyx_t_2);
10147 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10149 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10150 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
10151 __pyx_t_3 = __pyx_kp_u_4;
10153 __pyx_t_3 = __pyx_t_2;
10156 __pyx_r = __pyx_t_3;
10163 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":908
10164 * if isinstance(obj, _Element):
10165 * return textOf((<_Element>obj)._c_node) or u''
10166 * if obj is None: # <<<<<<<<<<<<<<
10168 * return unicode(obj)
10170 __pyx_t_1 = (__pyx_v_obj == Py_None);
10173 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":909
10174 * return textOf((<_Element>obj)._c_node) or u''
10176 * return u'' # <<<<<<<<<<<<<<
10177 * return unicode(obj)
10180 __Pyx_XDECREF(__pyx_r);
10181 __Pyx_INCREF(((PyObject *)__pyx_kp_u_4));
10182 __pyx_r = ((PyObject *)__pyx_kp_u_4);
10188 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":910
10191 * return unicode(obj) # <<<<<<<<<<<<<<
10193 * cdef inline object _numericValueOf(obj):
10195 __Pyx_XDECREF(__pyx_r);
10196 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10197 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
10198 __Pyx_INCREF(__pyx_v_obj);
10199 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
10200 __Pyx_GIVEREF(__pyx_v_obj);
10201 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10202 __Pyx_GOTREF(__pyx_t_2);
10203 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
10204 __pyx_r = __pyx_t_2;
10208 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10211 __Pyx_XDECREF(__pyx_t_2);
10212 __Pyx_XDECREF(__pyx_t_3);
10213 __Pyx_AddTraceback("lxml.objectify._strValueOf");
10216 __Pyx_DECREF(__pyx_v_obj);
10217 __Pyx_XGIVEREF(__pyx_r);
10218 __Pyx_FinishRefcountContext();
10222 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":912
10223 * return unicode(obj)
10225 * cdef inline object _numericValueOf(obj): # <<<<<<<<<<<<<<
10226 * if isinstance(obj, NumberElement):
10227 * return _parseNumber(<NumberElement>obj)
10230 static INLINE PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) {
10231 PyObject *__pyx_r = NULL;
10233 PyObject *__pyx_t_2 = NULL;
10234 __Pyx_SetupRefcountContext("_numericValueOf");
10235 __Pyx_INCREF(__pyx_v_obj);
10237 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":913
10239 * cdef inline object _numericValueOf(obj):
10240 * if isinstance(obj, NumberElement): # <<<<<<<<<<<<<<
10241 * return _parseNumber(<NumberElement>obj)
10242 * elif hasattr(obj, u'pyval'):
10244 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_obj, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NumberElement)));
10247 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":914
10248 * cdef inline object _numericValueOf(obj):
10249 * if isinstance(obj, NumberElement):
10250 * return _parseNumber(<NumberElement>obj) # <<<<<<<<<<<<<<
10251 * elif hasattr(obj, u'pyval'):
10252 * # not always numeric, but Python will raise the right exception
10254 __Pyx_XDECREF(__pyx_r);
10255 __pyx_t_2 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10256 __Pyx_GOTREF(__pyx_t_2);
10257 __pyx_r = __pyx_t_2;
10263 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":915
10264 * if isinstance(obj, NumberElement):
10265 * return _parseNumber(<NumberElement>obj)
10266 * elif hasattr(obj, u'pyval'): # <<<<<<<<<<<<<<
10267 * # not always numeric, but Python will raise the right exception
10270 __pyx_t_1 = PyObject_HasAttr(__pyx_v_obj, ((PyObject *)__pyx_n_u_pyval)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10273 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":917
10274 * elif hasattr(obj, u'pyval'):
10275 * # not always numeric, but Python will raise the right exception
10276 * return obj.pyval # <<<<<<<<<<<<<<
10280 __Pyx_XDECREF(__pyx_r);
10281 __pyx_t_2 = PyObject_GetAttr(__pyx_v_obj, __pyx_n_ui_pyval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10282 __Pyx_GOTREF(__pyx_t_2);
10283 __pyx_r = __pyx_t_2;
10290 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":918
10291 * # not always numeric, but Python will raise the right exception
10293 * return obj # <<<<<<<<<<<<<<
10295 * cdef inline _richcmpPyvals(left, right, int op):
10297 __Pyx_XDECREF(__pyx_r);
10298 __Pyx_INCREF(__pyx_v_obj);
10299 __pyx_r = __pyx_v_obj;
10302 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10305 __Pyx_XDECREF(__pyx_t_2);
10306 __Pyx_AddTraceback("lxml.objectify._numericValueOf");
10309 __Pyx_DECREF(__pyx_v_obj);
10310 __Pyx_XGIVEREF(__pyx_r);
10311 __Pyx_FinishRefcountContext();
10315 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":920
10318 * cdef inline _richcmpPyvals(left, right, int op): # <<<<<<<<<<<<<<
10319 * left = getattr3(left, u'pyval', left)
10320 * right = getattr3(right, u'pyval', right)
10323 static INLINE PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, PyObject *__pyx_v_right, int __pyx_v_op) {
10324 PyObject *__pyx_r = NULL;
10325 PyObject *__pyx_t_1 = NULL;
10326 __Pyx_SetupRefcountContext("_richcmpPyvals");
10327 __Pyx_INCREF(__pyx_v_left);
10328 __Pyx_INCREF(__pyx_v_right);
10330 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":921
10332 * cdef inline _richcmpPyvals(left, right, int op):
10333 * left = getattr3(left, u'pyval', left) # <<<<<<<<<<<<<<
10334 * right = getattr3(right, u'pyval', right)
10335 * return python.PyObject_RichCompare(left, right, op)
10337 __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_left, ((PyObject *)__pyx_n_u_pyval), __pyx_v_left); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10338 __Pyx_GOTREF(__pyx_t_1);
10339 __Pyx_DECREF(__pyx_v_left);
10340 __pyx_v_left = __pyx_t_1;
10343 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":922
10344 * cdef inline _richcmpPyvals(left, right, int op):
10345 * left = getattr3(left, u'pyval', left)
10346 * right = getattr3(right, u'pyval', right) # <<<<<<<<<<<<<<
10347 * return python.PyObject_RichCompare(left, right, op)
10350 __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_right, ((PyObject *)__pyx_n_u_pyval), __pyx_v_right); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10351 __Pyx_GOTREF(__pyx_t_1);
10352 __Pyx_DECREF(__pyx_v_right);
10353 __pyx_v_right = __pyx_t_1;
10356 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":923
10357 * left = getattr3(left, u'pyval', left)
10358 * right = getattr3(right, u'pyval', right)
10359 * return python.PyObject_RichCompare(left, right, op) # <<<<<<<<<<<<<<
10363 __Pyx_XDECREF(__pyx_r);
10364 __pyx_t_1 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, __pyx_v_op); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10365 __Pyx_GOTREF(__pyx_t_1);
10366 __pyx_r = __pyx_t_1;
10370 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10373 __Pyx_XDECREF(__pyx_t_1);
10374 __Pyx_AddTraceback("lxml.objectify._richcmpPyvals");
10377 __Pyx_DECREF(__pyx_v_left);
10378 __Pyx_DECREF(__pyx_v_right);
10379 __Pyx_XGIVEREF(__pyx_r);
10380 __Pyx_FinishRefcountContext();
10384 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":951
10385 * cdef object _type
10386 * cdef list _schema_types
10387 * def __init__(self, name, type_check, type_class, stringify=None): # <<<<<<<<<<<<<<
10388 * if python.PyString_Check(name):
10389 * name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10392 static int __pyx_pf_4lxml_9objectify_6PyType___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10393 static int __pyx_pf_4lxml_9objectify_6PyType___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10394 PyObject *__pyx_v_name = 0;
10395 PyObject *__pyx_v_type_check = 0;
10396 PyObject *__pyx_v_type_class = 0;
10397 PyObject *__pyx_v_stringify = 0;
10400 PyObject *__pyx_t_2 = NULL;
10403 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_name,&__pyx_n_ui_type_check,&__pyx_n_ui_type_class,&__pyx_n_ui_stringify,0};
10404 __Pyx_SetupRefcountContext("__init__");
10405 if (unlikely(__pyx_kwds)) {
10406 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
10407 PyObject* values[4] = {0,0,0,0};
10408 values[3] = ((PyObject *)Py_None);
10409 switch (PyTuple_GET_SIZE(__pyx_args)) {
10410 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
10411 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
10412 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10413 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10415 default: goto __pyx_L5_argtuple_error;
10417 switch (PyTuple_GET_SIZE(__pyx_args)) {
10419 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_name);
10420 if (likely(values[0])) kw_args--;
10421 else goto __pyx_L5_argtuple_error;
10423 values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_type_check);
10424 if (likely(values[1])) kw_args--;
10426 __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10429 values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_type_class);
10430 if (likely(values[2])) kw_args--;
10432 __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10436 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_stringify);
10437 if (unlikely(value)) { values[3] = value; kw_args--; }
10440 if (unlikely(kw_args > 0)) {
10441 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10443 __pyx_v_name = values[0];
10444 __pyx_v_type_check = values[1];
10445 __pyx_v_type_class = values[2];
10446 __pyx_v_stringify = values[3];
10448 __pyx_v_stringify = ((PyObject *)Py_None);
10449 switch (PyTuple_GET_SIZE(__pyx_args)) {
10451 __pyx_v_stringify = PyTuple_GET_ITEM(__pyx_args, 3);
10453 __pyx_v_type_class = PyTuple_GET_ITEM(__pyx_args, 2);
10454 __pyx_v_type_check = PyTuple_GET_ITEM(__pyx_args, 1);
10455 __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
10457 default: goto __pyx_L5_argtuple_error;
10460 goto __pyx_L4_argument_unpacking_done;
10461 __pyx_L5_argtuple_error:;
10462 __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10464 __Pyx_AddTraceback("lxml.objectify.PyType.__init__");
10466 __pyx_L4_argument_unpacking_done:;
10467 __Pyx_INCREF((PyObject *)__pyx_v_self);
10468 __Pyx_INCREF(__pyx_v_name);
10469 __Pyx_INCREF(__pyx_v_type_check);
10470 __Pyx_INCREF(__pyx_v_type_class);
10471 __Pyx_INCREF(__pyx_v_stringify);
10473 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":952
10474 * cdef list _schema_types
10475 * def __init__(self, name, type_check, type_class, stringify=None):
10476 * if python.PyString_Check(name): # <<<<<<<<<<<<<<
10477 * name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10478 * elif not python.PyUnicode_Check(name):
10480 __pyx_t_1 = PyString_Check(__pyx_v_name);
10483 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":953
10484 * def __init__(self, name, type_check, type_class, stringify=None):
10485 * if python.PyString_Check(name):
10486 * name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL) # <<<<<<<<<<<<<<
10487 * elif not python.PyUnicode_Check(name):
10488 * raise TypeError, u"Type name must be a string"
10490 __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_name, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10491 __Pyx_GOTREF(__pyx_t_2);
10492 __Pyx_DECREF(__pyx_v_name);
10493 __pyx_v_name = __pyx_t_2;
10498 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":954
10499 * if python.PyString_Check(name):
10500 * name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10501 * elif not python.PyUnicode_Check(name): # <<<<<<<<<<<<<<
10502 * raise TypeError, u"Type name must be a string"
10503 * if type_check is not None and not callable(type_check):
10505 __pyx_t_1 = (!PyUnicode_Check(__pyx_v_name));
10508 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":955
10509 * name = python.PyUnicode_FromEncodedObject(name, 'ASCII', NULL)
10510 * elif not python.PyUnicode_Check(name):
10511 * raise TypeError, u"Type name must be a string" # <<<<<<<<<<<<<<
10512 * if type_check is not None and not callable(type_check):
10513 * raise TypeError, u"Type check function must be callable (or None)"
10515 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_16), 0);
10516 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10521 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":956
10522 * elif not python.PyUnicode_Check(name):
10523 * raise TypeError, u"Type name must be a string"
10524 * if type_check is not None and not callable(type_check): # <<<<<<<<<<<<<<
10525 * raise TypeError, u"Type check function must be callable (or None)"
10526 * if name != TREE_PYTYPE_NAME and \
10528 __pyx_t_1 = (__pyx_v_type_check != Py_None);
10530 __pyx_t_3 = (!PyCallable_Check(__pyx_v_type_check));
10532 __pyx_t_3 = __pyx_t_1;
10536 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":957
10537 * raise TypeError, u"Type name must be a string"
10538 * if type_check is not None and not callable(type_check):
10539 * raise TypeError, u"Type check function must be callable (or None)" # <<<<<<<<<<<<<<
10540 * if name != TREE_PYTYPE_NAME and \
10541 * not issubclass(type_class, ObjectifiedDataElement):
10543 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_17), 0);
10544 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10549 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":958
10550 * if type_check is not None and not callable(type_check):
10551 * raise TypeError, u"Type check function must be callable (or None)"
10552 * if name != TREE_PYTYPE_NAME and \ # <<<<<<<<<<<<<<
10553 * not issubclass(type_class, ObjectifiedDataElement):
10554 * raise TypeError, \
10556 __pyx_t_2 = PyObject_RichCompare(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10557 __Pyx_GOTREF(__pyx_t_2);
10558 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10559 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10562 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":959
10563 * raise TypeError, u"Type check function must be callable (or None)"
10564 * if name != TREE_PYTYPE_NAME and \
10565 * not issubclass(type_class, ObjectifiedDataElement): # <<<<<<<<<<<<<<
10566 * raise TypeError, \
10567 * u"Data classes must inherit from ObjectifiedDataElement"
10569 __pyx_t_1 = PyObject_IsSubclass(__pyx_v_type_class, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement))); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10570 __pyx_t_4 = (!__pyx_t_1);
10571 __pyx_t_1 = __pyx_t_4;
10573 __pyx_t_1 = __pyx_t_3;
10577 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":960
10578 * if name != TREE_PYTYPE_NAME and \
10579 * not issubclass(type_class, ObjectifiedDataElement):
10580 * raise TypeError, \ # <<<<<<<<<<<<<<
10581 * u"Data classes must inherit from ObjectifiedDataElement"
10584 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_18), 0);
10585 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 960; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10590 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":962
10591 * raise TypeError, \
10592 * u"Data classes must inherit from ObjectifiedDataElement"
10593 * self.name = name # <<<<<<<<<<<<<<
10594 * self._type = type_class
10595 * self.type_check = type_check
10597 __Pyx_INCREF(__pyx_v_name);
10598 __Pyx_GIVEREF(__pyx_v_name);
10599 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10600 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10601 ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name = __pyx_v_name;
10603 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":963
10604 * u"Data classes must inherit from ObjectifiedDataElement"
10606 * self._type = type_class # <<<<<<<<<<<<<<
10607 * self.type_check = type_check
10608 * if stringify is None:
10610 __Pyx_INCREF(__pyx_v_type_class);
10611 __Pyx_GIVEREF(__pyx_v_type_class);
10612 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type);
10613 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type);
10614 ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type = __pyx_v_type_class;
10616 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":964
10618 * self._type = type_class
10619 * self.type_check = type_check # <<<<<<<<<<<<<<
10620 * if stringify is None:
10621 * stringify = unicode
10623 __Pyx_INCREF(__pyx_v_type_check);
10624 __Pyx_GIVEREF(__pyx_v_type_check);
10625 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10626 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10627 ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check = __pyx_v_type_check;
10629 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":965
10630 * self._type = type_class
10631 * self.type_check = type_check
10632 * if stringify is None: # <<<<<<<<<<<<<<
10633 * stringify = unicode
10634 * self.stringify = stringify
10636 __pyx_t_1 = (__pyx_v_stringify == Py_None);
10639 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":966
10640 * self.type_check = type_check
10641 * if stringify is None:
10642 * stringify = unicode # <<<<<<<<<<<<<<
10643 * self.stringify = stringify
10644 * self._schema_types = []
10646 __Pyx_INCREF(((PyObject *)((PyObject*)&PyUnicode_Type)));
10647 __Pyx_DECREF(__pyx_v_stringify);
10648 __pyx_v_stringify = ((PyObject *)((PyObject*)&PyUnicode_Type));
10653 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":967
10654 * if stringify is None:
10655 * stringify = unicode
10656 * self.stringify = stringify # <<<<<<<<<<<<<<
10657 * self._schema_types = []
10660 __Pyx_INCREF(__pyx_v_stringify);
10661 __Pyx_GIVEREF(__pyx_v_stringify);
10662 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify);
10663 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify);
10664 ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->stringify = __pyx_v_stringify;
10666 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":968
10667 * stringify = unicode
10668 * self.stringify = stringify
10669 * self._schema_types = [] # <<<<<<<<<<<<<<
10671 * def __repr__(self):
10673 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10674 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
10675 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
10676 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
10677 __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
10678 ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types = __pyx_t_2;
10684 __Pyx_XDECREF(__pyx_t_2);
10685 __Pyx_AddTraceback("lxml.objectify.PyType.__init__");
10688 __Pyx_DECREF((PyObject *)__pyx_v_self);
10689 __Pyx_DECREF(__pyx_v_name);
10690 __Pyx_DECREF(__pyx_v_type_check);
10691 __Pyx_DECREF(__pyx_v_type_class);
10692 __Pyx_DECREF(__pyx_v_stringify);
10693 __Pyx_FinishRefcountContext();
10697 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":970
10698 * self._schema_types = []
10700 * def __repr__(self): # <<<<<<<<<<<<<<
10701 * return u"PyType(%s, %s)" % (self.name, self._type.__name__)
10705 static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self); /*proto*/
10706 static PyObject *__pyx_pf_4lxml_9objectify_6PyType___repr__(PyObject *__pyx_v_self) {
10707 PyObject *__pyx_r = NULL;
10708 PyObject *__pyx_t_1 = NULL;
10709 PyObject *__pyx_t_2 = NULL;
10710 __Pyx_SetupRefcountContext("__repr__");
10712 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":971
10714 * def __repr__(self):
10715 * return u"PyType(%s, %s)" % (self.name, self._type.__name__) # <<<<<<<<<<<<<<
10717 * def register(self, before=None, after=None):
10719 __Pyx_XDECREF(__pyx_r);
10720 __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_type, __pyx_n_ui___name__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10721 __Pyx_GOTREF(__pyx_t_1);
10722 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10723 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
10724 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10725 PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10726 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
10727 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
10728 __Pyx_GIVEREF(__pyx_t_1);
10730 __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_19), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10731 __Pyx_GOTREF(__pyx_t_1);
10732 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
10733 __pyx_r = __pyx_t_1;
10737 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10740 __Pyx_XDECREF(__pyx_t_1);
10741 __Pyx_XDECREF(__pyx_t_2);
10742 __Pyx_AddTraceback("lxml.objectify.PyType.__repr__");
10745 __Pyx_XGIVEREF(__pyx_r);
10746 __Pyx_FinishRefcountContext();
10750 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":973
10751 * return u"PyType(%s, %s)" % (self.name, self._type.__name__)
10753 * def register(self, before=None, after=None): # <<<<<<<<<<<<<<
10754 * u"""register(self, before=None, after=None)
10758 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
10759 static char __pyx_doc_4lxml_9objectify_6PyType_register[] = "register(self, before=None, after=None)\n\n Register the type.\n\n The additional keyword arguments 'before' and 'after' accept a\n sequence of type names that must appear before/after the new type in\n the type list. If any of them is not currently known, it is simply\n ignored. Raises ValueError if the dependencies cannot be fulfilled.\n ";
10760 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_register(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
10761 PyObject *__pyx_v_before = 0;
10762 PyObject *__pyx_v_after = 0;
10763 PyObject *__pyx_v_item;
10764 PyObject *__pyx_v_entry;
10765 PyObject *__pyx_v_first_pos;
10766 PyObject *__pyx_v_last_pos;
10767 PyObject *__pyx_v_i;
10768 PyObject *__pyx_v_check;
10769 PyObject *__pyx_v_pytype;
10770 PyObject *__pyx_v_xs_type;
10771 PyObject *__pyx_r = NULL;
10772 PyObject *__pyx_t_1 = NULL;
10774 Py_ssize_t __pyx_t_3;
10775 PyObject *__pyx_t_4 = NULL;
10776 PyObject *__pyx_t_5 = NULL;
10777 PyObject *__pyx_t_6 = NULL;
10780 PyObject *__pyx_t_9 = NULL;
10781 PyObject *__pyx_t_10 = NULL;
10783 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_before,&__pyx_n_ui_after,0};
10784 __Pyx_SetupRefcountContext("register");
10785 if (unlikely(__pyx_kwds)) {
10786 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
10787 PyObject* values[2] = {0,0};
10788 values[0] = ((PyObject *)Py_None);
10789 values[1] = ((PyObject *)Py_None);
10790 switch (PyTuple_GET_SIZE(__pyx_args)) {
10791 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
10792 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
10794 default: goto __pyx_L5_argtuple_error;
10796 switch (PyTuple_GET_SIZE(__pyx_args)) {
10799 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_before);
10800 if (unlikely(value)) { values[0] = value; kw_args--; }
10804 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_after);
10805 if (unlikely(value)) { values[1] = value; kw_args--; }
10808 if (unlikely(kw_args > 0)) {
10809 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "register") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10811 __pyx_v_before = values[0];
10812 __pyx_v_after = values[1];
10814 __pyx_v_before = ((PyObject *)Py_None);
10815 __pyx_v_after = ((PyObject *)Py_None);
10816 switch (PyTuple_GET_SIZE(__pyx_args)) {
10817 case 2: __pyx_v_after = PyTuple_GET_ITEM(__pyx_args, 1);
10818 case 1: __pyx_v_before = PyTuple_GET_ITEM(__pyx_args, 0);
10820 default: goto __pyx_L5_argtuple_error;
10823 goto __pyx_L4_argument_unpacking_done;
10824 __pyx_L5_argtuple_error:;
10825 __Pyx_RaiseArgtupleInvalid("register", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
10827 __Pyx_AddTraceback("lxml.objectify.PyType.register");
10829 __pyx_L4_argument_unpacking_done:;
10830 __Pyx_INCREF((PyObject *)__pyx_v_self);
10831 __Pyx_INCREF(__pyx_v_before);
10832 __Pyx_INCREF(__pyx_v_after);
10833 __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
10834 __pyx_v_entry = Py_None; __Pyx_INCREF(Py_None);
10835 __pyx_v_first_pos = Py_None; __Pyx_INCREF(Py_None);
10836 __pyx_v_last_pos = Py_None; __Pyx_INCREF(Py_None);
10837 __pyx_v_i = Py_None; __Pyx_INCREF(Py_None);
10838 __pyx_v_check = Py_None; __Pyx_INCREF(Py_None);
10839 __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
10840 __pyx_v_xs_type = Py_None; __Pyx_INCREF(Py_None);
10842 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":983
10843 * ignored. Raises ValueError if the dependencies cannot be fulfilled.
10845 * if self.name == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<<
10846 * raise ValueError, u"Cannot register tree type"
10847 * if self.type_check is not None:
10849 __pyx_t_1 = PyObject_RichCompare(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10850 __Pyx_GOTREF(__pyx_t_1);
10851 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10852 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10855 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":984
10857 * if self.name == TREE_PYTYPE_NAME:
10858 * raise ValueError, u"Cannot register tree type" # <<<<<<<<<<<<<<
10859 * if self.type_check is not None:
10860 * for item in _TYPE_CHECKS:
10862 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_20), 0);
10863 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10868 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":985
10869 * if self.name == TREE_PYTYPE_NAME:
10870 * raise ValueError, u"Cannot register tree type"
10871 * if self.type_check is not None: # <<<<<<<<<<<<<<
10872 * for item in _TYPE_CHECKS:
10873 * if item[0] is self.type_check:
10875 __pyx_t_2 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check != Py_None);
10878 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":986
10879 * raise ValueError, u"Cannot register tree type"
10880 * if self.type_check is not None:
10881 * for item in _TYPE_CHECKS: # <<<<<<<<<<<<<<
10882 * if item[0] is self.type_check:
10883 * _TYPE_CHECKS.remove(item)
10885 if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
10886 __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
10888 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10891 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
10892 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
10893 __Pyx_DECREF(__pyx_v_item);
10894 __pyx_v_item = __pyx_t_4;
10897 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":987
10898 * if self.type_check is not None:
10899 * for item in _TYPE_CHECKS:
10900 * if item[0] is self.type_check: # <<<<<<<<<<<<<<
10901 * _TYPE_CHECKS.remove(item)
10904 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_item, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10905 __Pyx_GOTREF(__pyx_t_4);
10906 __pyx_t_2 = (__pyx_t_4 == ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10907 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10910 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":988
10911 * for item in _TYPE_CHECKS:
10912 * if item[0] is self.type_check:
10913 * _TYPE_CHECKS.remove(item) # <<<<<<<<<<<<<<
10915 * entry = (self.type_check, self)
10917 __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_n_ui_remove); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10918 __Pyx_GOTREF(__pyx_t_4);
10919 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10920 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
10921 __Pyx_INCREF(__pyx_v_item);
10922 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
10923 __Pyx_GIVEREF(__pyx_v_item);
10924 __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10925 __Pyx_GOTREF(__pyx_t_6);
10926 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10927 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
10928 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10930 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":989
10931 * if item[0] is self.type_check:
10932 * _TYPE_CHECKS.remove(item)
10933 * break # <<<<<<<<<<<<<<
10934 * entry = (self.type_check, self)
10937 goto __pyx_L9_break;
10943 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10945 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":990
10946 * _TYPE_CHECKS.remove(item)
10948 * entry = (self.type_check, self) # <<<<<<<<<<<<<<
10952 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10953 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
10954 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10955 PyTuple_SET_ITEM(__pyx_t_1, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10956 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
10957 __Pyx_INCREF(__pyx_v_self);
10958 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self);
10959 __Pyx_GIVEREF(__pyx_v_self);
10960 __Pyx_DECREF(__pyx_v_entry);
10961 __pyx_v_entry = ((PyObject *)__pyx_t_1);
10964 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":991
10966 * entry = (self.type_check, self)
10967 * first_pos = 0 # <<<<<<<<<<<<<<
10969 * if before or after:
10971 __Pyx_INCREF(__pyx_int_0);
10972 __Pyx_DECREF(__pyx_v_first_pos);
10973 __pyx_v_first_pos = __pyx_int_0;
10975 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":992
10976 * entry = (self.type_check, self)
10978 * last_pos = -1 # <<<<<<<<<<<<<<
10979 * if before or after:
10980 * if before is None:
10982 __Pyx_INCREF(__pyx_int_neg_1);
10983 __Pyx_DECREF(__pyx_v_last_pos);
10984 __pyx_v_last_pos = __pyx_int_neg_1;
10986 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":993
10989 * if before or after: # <<<<<<<<<<<<<<
10990 * if before is None:
10993 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_before); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10995 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_after); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
10996 __pyx_t_8 = __pyx_t_7;
10998 __pyx_t_8 = __pyx_t_2;
11002 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":994
11004 * if before or after:
11005 * if before is None: # <<<<<<<<<<<<<<
11007 * elif after is None:
11009 __pyx_t_8 = (__pyx_v_before == Py_None);
11012 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":995
11013 * if before or after:
11014 * if before is None:
11015 * before = () # <<<<<<<<<<<<<<
11016 * elif after is None:
11019 __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
11020 __Pyx_DECREF(__pyx_v_before);
11021 __pyx_v_before = ((PyObject *)__pyx_empty_tuple);
11025 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":996
11026 * if before is None:
11028 * elif after is None: # <<<<<<<<<<<<<<
11030 * for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11032 __pyx_t_8 = (__pyx_v_after == Py_None);
11035 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":997
11037 * elif after is None:
11038 * after = () # <<<<<<<<<<<<<<
11039 * for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11040 * if last_pos == -1 and pytype.name in before:
11042 __Pyx_INCREF(((PyObject *)__pyx_empty_tuple));
11043 __Pyx_DECREF(__pyx_v_after);
11044 __pyx_v_after = ((PyObject *)__pyx_empty_tuple);
11049 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":998
11050 * elif after is None:
11052 * for i, (check, pytype) in enumerate(_TYPE_CHECKS): # <<<<<<<<<<<<<<
11053 * if last_pos == -1 and pytype.name in before:
11056 __Pyx_INCREF(__pyx_int_0);
11057 __pyx_t_1 = __pyx_int_0;
11058 if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
11059 __pyx_t_3 = 0; __pyx_t_6 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_6);
11061 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11064 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
11065 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++;
11066 if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
11067 PyObject* tuple = __pyx_t_5;
11068 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
11069 __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
11070 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11071 __Pyx_DECREF(__pyx_v_check);
11072 __pyx_v_check = __pyx_t_4;
11074 __Pyx_DECREF(__pyx_v_pytype);
11075 __pyx_v_pytype = __pyx_t_9;
11078 __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11079 __Pyx_GOTREF(__pyx_t_10);
11080 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11081 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11082 __Pyx_GOTREF(__pyx_t_4);
11083 __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11084 __Pyx_GOTREF(__pyx_t_9);
11085 if (__Pyx_EndUnpack(__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11086 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
11087 __Pyx_DECREF(__pyx_v_check);
11088 __pyx_v_check = __pyx_t_4;
11090 __Pyx_DECREF(__pyx_v_pytype);
11091 __pyx_v_pytype = __pyx_t_9;
11094 __Pyx_INCREF(__pyx_t_1);
11095 __Pyx_DECREF(__pyx_v_i);
11096 __pyx_v_i = __pyx_t_1;
11097 __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11098 __Pyx_GOTREF(__pyx_t_5);
11099 __Pyx_DECREF(__pyx_t_1);
11100 __pyx_t_1 = __pyx_t_5;
11103 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":999
11105 * for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11106 * if last_pos == -1 and pytype.name in before: # <<<<<<<<<<<<<<
11108 * if pytype.name in after:
11110 __pyx_t_5 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11111 __Pyx_GOTREF(__pyx_t_5);
11112 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11113 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11115 __pyx_t_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11116 __Pyx_GOTREF(__pyx_t_5);
11117 __pyx_t_2 = (PySequence_Contains(__pyx_v_before, __pyx_t_5)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11118 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11119 __pyx_t_7 = __pyx_t_2;
11121 __pyx_t_7 = __pyx_t_8;
11125 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1000
11126 * for i, (check, pytype) in enumerate(_TYPE_CHECKS):
11127 * if last_pos == -1 and pytype.name in before:
11128 * last_pos = i # <<<<<<<<<<<<<<
11129 * if pytype.name in after:
11132 __Pyx_INCREF(__pyx_v_i);
11133 __Pyx_DECREF(__pyx_v_last_pos);
11134 __pyx_v_last_pos = __pyx_v_i;
11139 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1001
11140 * if last_pos == -1 and pytype.name in before:
11142 * if pytype.name in after: # <<<<<<<<<<<<<<
11144 * if last_pos == -1:
11146 __pyx_t_5 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11147 __Pyx_GOTREF(__pyx_t_5);
11148 __pyx_t_7 = (PySequence_Contains(__pyx_v_after, __pyx_t_5)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11149 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11152 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1002
11154 * if pytype.name in after:
11155 * first_pos = i+1 # <<<<<<<<<<<<<<
11156 * if last_pos == -1:
11157 * _TYPE_CHECKS.append(entry)
11159 __pyx_t_5 = PyNumber_Add(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11160 __Pyx_GOTREF(__pyx_t_5);
11161 __Pyx_DECREF(__pyx_v_first_pos);
11162 __pyx_v_first_pos = __pyx_t_5;
11168 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11169 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11174 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1003
11175 * if pytype.name in after:
11177 * if last_pos == -1: # <<<<<<<<<<<<<<
11178 * _TYPE_CHECKS.append(entry)
11179 * elif first_pos > last_pos:
11181 __pyx_t_1 = PyObject_RichCompare(__pyx_v_last_pos, __pyx_int_neg_1, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11182 __Pyx_GOTREF(__pyx_t_1);
11183 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11184 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11187 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1004
11189 * if last_pos == -1:
11190 * _TYPE_CHECKS.append(entry) # <<<<<<<<<<<<<<
11191 * elif first_pos > last_pos:
11192 * raise ValueError, u"inconsistent before/after dependencies"
11194 if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) {
11195 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11197 __pyx_t_11 = PyList_Append(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_v_entry); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11201 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1005
11202 * if last_pos == -1:
11203 * _TYPE_CHECKS.append(entry)
11204 * elif first_pos > last_pos: # <<<<<<<<<<<<<<
11205 * raise ValueError, u"inconsistent before/after dependencies"
11208 __pyx_t_1 = PyObject_RichCompare(__pyx_v_first_pos, __pyx_v_last_pos, Py_GT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11209 __Pyx_GOTREF(__pyx_t_1);
11210 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11211 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11214 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1006
11215 * _TYPE_CHECKS.append(entry)
11216 * elif first_pos > last_pos:
11217 * raise ValueError, u"inconsistent before/after dependencies" # <<<<<<<<<<<<<<
11219 * _TYPE_CHECKS.insert(last_pos, entry)
11221 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_21), 0);
11222 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11227 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1008
11228 * raise ValueError, u"inconsistent before/after dependencies"
11230 * _TYPE_CHECKS.insert(last_pos, entry) # <<<<<<<<<<<<<<
11232 * _PYTYPE_DICT[self.name] = self
11234 __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_last_pos); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11235 __pyx_t_11 = PyList_Insert(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_t_3, __pyx_v_entry); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11242 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1010
11243 * _TYPE_CHECKS.insert(last_pos, entry)
11245 * _PYTYPE_DICT[self.name] = self # <<<<<<<<<<<<<<
11246 * for xs_type in self._schema_types:
11247 * _SCHEMA_TYPE_DICT[xs_type] = self
11249 if (PyDict_SetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11251 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1011
11253 * _PYTYPE_DICT[self.name] = self
11254 * for xs_type in self._schema_types: # <<<<<<<<<<<<<<
11255 * _SCHEMA_TYPE_DICT[xs_type] = self
11258 if (likely(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types) != Py_None)) {
11259 __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types); __Pyx_INCREF(__pyx_t_1);
11261 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11264 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
11265 __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_6); __pyx_t_3++;
11266 __Pyx_DECREF(__pyx_v_xs_type);
11267 __pyx_v_xs_type = __pyx_t_6;
11270 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1012
11271 * _PYTYPE_DICT[self.name] = self
11272 * for xs_type in self._schema_types:
11273 * _SCHEMA_TYPE_DICT[xs_type] = self # <<<<<<<<<<<<<<
11275 * def unregister(self):
11277 if (PyDict_SetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type, __pyx_v_self) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11279 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11281 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11284 __Pyx_XDECREF(__pyx_t_1);
11285 __Pyx_XDECREF(__pyx_t_4);
11286 __Pyx_XDECREF(__pyx_t_5);
11287 __Pyx_XDECREF(__pyx_t_6);
11288 __Pyx_XDECREF(__pyx_t_9);
11289 __Pyx_XDECREF(__pyx_t_10);
11290 __Pyx_AddTraceback("lxml.objectify.PyType.register");
11293 __Pyx_DECREF(__pyx_v_item);
11294 __Pyx_DECREF(__pyx_v_entry);
11295 __Pyx_DECREF(__pyx_v_first_pos);
11296 __Pyx_DECREF(__pyx_v_last_pos);
11297 __Pyx_DECREF(__pyx_v_i);
11298 __Pyx_DECREF(__pyx_v_check);
11299 __Pyx_DECREF(__pyx_v_pytype);
11300 __Pyx_DECREF(__pyx_v_xs_type);
11301 __Pyx_DECREF((PyObject *)__pyx_v_self);
11302 __Pyx_DECREF(__pyx_v_before);
11303 __Pyx_DECREF(__pyx_v_after);
11304 __Pyx_XGIVEREF(__pyx_r);
11305 __Pyx_FinishRefcountContext();
11309 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1014
11310 * _SCHEMA_TYPE_DICT[xs_type] = self
11312 * def unregister(self): # <<<<<<<<<<<<<<
11313 * u"unregister(self)"
11314 * if _PYTYPE_DICT.get(self.name) is self:
11317 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_unregister(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
11318 static char __pyx_doc_4lxml_9objectify_6PyType_unregister[] = "unregister(self)";
11319 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_unregister(PyObject *__pyx_v_self, PyObject *unused) {
11320 PyObject *__pyx_v_xs_type;
11321 PyObject *__pyx_v_pytype;
11322 PyObject *__pyx_r = NULL;
11323 PyObject *__pyx_t_1 = NULL;
11324 PyObject *__pyx_t_2 = NULL;
11325 PyObject *__pyx_t_3 = NULL;
11327 Py_ssize_t __pyx_t_5;
11328 PyObject *__pyx_t_6 = NULL;
11329 PyObject *__pyx_t_7 = NULL;
11331 __Pyx_SetupRefcountContext("unregister");
11332 __Pyx_INCREF((PyObject *)__pyx_v_self);
11333 __pyx_v_xs_type = Py_None; __Pyx_INCREF(Py_None);
11334 __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
11336 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1016
11337 * def unregister(self):
11338 * u"unregister(self)"
11339 * if _PYTYPE_DICT.get(self.name) is self: # <<<<<<<<<<<<<<
11340 * del _PYTYPE_DICT[self.name]
11341 * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11343 __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_n_ui_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11344 __Pyx_GOTREF(__pyx_t_1);
11345 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11346 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
11347 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
11348 PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
11349 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name);
11350 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11351 __Pyx_GOTREF(__pyx_t_3);
11352 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11353 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11354 __pyx_t_4 = (__pyx_t_3 == __pyx_v_self);
11355 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11358 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1017
11359 * u"unregister(self)"
11360 * if _PYTYPE_DICT.get(self.name) is self:
11361 * del _PYTYPE_DICT[self.name] # <<<<<<<<<<<<<<
11362 * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11363 * if pytype is self:
11365 if (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->name) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11370 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1018
11371 * if _PYTYPE_DICT.get(self.name) is self:
11372 * del _PYTYPE_DICT[self.name]
11373 * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()): # <<<<<<<<<<<<<<
11374 * if pytype is self:
11375 * del _SCHEMA_TYPE_DICT[xs_type]
11377 __pyx_t_3 = PyDict_Items(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11378 __Pyx_GOTREF(__pyx_t_3);
11379 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11380 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
11381 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
11382 __Pyx_GIVEREF(__pyx_t_3);
11384 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11385 __Pyx_GOTREF(__pyx_t_3);
11386 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11387 if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
11388 __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
11390 __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11391 __Pyx_GOTREF(__pyx_t_2);
11393 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11395 if (likely(PyList_CheckExact(__pyx_t_2))) {
11396 if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
11397 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
11398 } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
11399 if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
11400 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
11402 __pyx_t_3 = PyIter_Next(__pyx_t_2);
11404 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11407 __Pyx_GOTREF(__pyx_t_3);
11409 if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
11410 PyObject* tuple = __pyx_t_3;
11411 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
11412 __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
11413 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11414 __Pyx_DECREF(__pyx_v_xs_type);
11415 __pyx_v_xs_type = __pyx_t_1;
11417 __Pyx_DECREF(__pyx_v_pytype);
11418 __pyx_v_pytype = __pyx_t_6;
11421 __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11422 __Pyx_GOTREF(__pyx_t_7);
11423 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11424 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11425 __Pyx_GOTREF(__pyx_t_1);
11426 __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11427 __Pyx_GOTREF(__pyx_t_6);
11428 if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11429 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11430 __Pyx_DECREF(__pyx_v_xs_type);
11431 __pyx_v_xs_type = __pyx_t_1;
11433 __Pyx_DECREF(__pyx_v_pytype);
11434 __pyx_v_pytype = __pyx_t_6;
11438 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1019
11439 * del _PYTYPE_DICT[self.name]
11440 * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11441 * if pytype is self: # <<<<<<<<<<<<<<
11442 * del _SCHEMA_TYPE_DICT[xs_type]
11443 * if self.type_check is None:
11445 __pyx_t_4 = (__pyx_v_pytype == __pyx_v_self);
11448 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1020
11449 * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()):
11450 * if pytype is self:
11451 * del _SCHEMA_TYPE_DICT[xs_type] # <<<<<<<<<<<<<<
11452 * if self.type_check is None:
11455 if (PyDict_DelItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_xs_type) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11460 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11462 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1021
11463 * if pytype is self:
11464 * del _SCHEMA_TYPE_DICT[xs_type]
11465 * if self.type_check is None: # <<<<<<<<<<<<<<
11469 __pyx_t_4 = (((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check == Py_None);
11472 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1022
11473 * del _SCHEMA_TYPE_DICT[xs_type]
11474 * if self.type_check is None:
11475 * return # <<<<<<<<<<<<<<
11477 * _TYPE_CHECKS.remove( (self.type_check, self) )
11479 __Pyx_XDECREF(__pyx_r);
11480 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11486 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1023
11487 * if self.type_check is None:
11489 * try: # <<<<<<<<<<<<<<
11490 * _TYPE_CHECKS.remove( (self.type_check, self) )
11491 * except ValueError:
11494 PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
11495 __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
11496 __Pyx_XGOTREF(__pyx_save_exc_type);
11497 __Pyx_XGOTREF(__pyx_save_exc_value);
11498 __Pyx_XGOTREF(__pyx_save_exc_tb);
11501 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1024
11504 * _TYPE_CHECKS.remove( (self.type_check, self) ) # <<<<<<<<<<<<<<
11505 * except ValueError:
11508 __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS), __pyx_n_ui_remove); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11509 __Pyx_GOTREF(__pyx_t_2);
11510 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11511 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
11512 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
11513 PyTuple_SET_ITEM(__pyx_t_3, 0, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
11514 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->type_check);
11515 __Pyx_INCREF(__pyx_v_self);
11516 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
11517 __Pyx_GIVEREF(__pyx_v_self);
11518 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11519 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
11520 PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_3));
11521 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
11523 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
11524 __Pyx_GOTREF(__pyx_t_3);
11525 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11526 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
11527 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11529 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
11530 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
11531 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
11532 goto __pyx_L17_try_end;
11534 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
11535 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
11536 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
11537 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
11538 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11540 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1025
11542 * _TYPE_CHECKS.remove( (self.type_check, self) )
11543 * except ValueError: # <<<<<<<<<<<<<<
11547 __pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
11549 PyErr_Restore(0,0,0);
11550 goto __pyx_L11_exception_handled;
11552 __Pyx_XDECREF(__pyx_save_exc_type);
11553 __Pyx_XDECREF(__pyx_save_exc_value);
11554 __Pyx_XDECREF(__pyx_save_exc_tb);
11555 goto __pyx_L1_error;
11556 __pyx_L11_exception_handled:;
11557 __Pyx_XGIVEREF(__pyx_save_exc_type);
11558 __Pyx_XGIVEREF(__pyx_save_exc_value);
11559 __Pyx_XGIVEREF(__pyx_save_exc_tb);
11560 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
11561 __pyx_L17_try_end:;
11564 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11567 __Pyx_XDECREF(__pyx_t_1);
11568 __Pyx_XDECREF(__pyx_t_2);
11569 __Pyx_XDECREF(__pyx_t_3);
11570 __Pyx_XDECREF(__pyx_t_6);
11571 __Pyx_XDECREF(__pyx_t_7);
11572 __Pyx_AddTraceback("lxml.objectify.PyType.unregister");
11575 __Pyx_DECREF(__pyx_v_xs_type);
11576 __Pyx_DECREF(__pyx_v_pytype);
11577 __Pyx_DECREF((PyObject *)__pyx_v_self);
11578 __Pyx_XGIVEREF(__pyx_r);
11579 __Pyx_FinishRefcountContext();
11583 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1033
11584 * Note that this must be set before registering the type!
11586 * def __get__(self): # <<<<<<<<<<<<<<
11587 * return self._schema_types
11588 * def __set__(self, types):
11591 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(PyObject *__pyx_v_self); /*proto*/
11592 static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(PyObject *__pyx_v_self) {
11593 PyObject *__pyx_r = NULL;
11594 __Pyx_SetupRefcountContext("__get__");
11596 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1034
11598 * def __get__(self):
11599 * return self._schema_types # <<<<<<<<<<<<<<
11600 * def __set__(self, types):
11601 * self._schema_types = list(map(unicode, types))
11603 __Pyx_XDECREF(__pyx_r);
11604 __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
11605 __pyx_r = ((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
11608 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11610 __Pyx_XGIVEREF(__pyx_r);
11611 __Pyx_FinishRefcountContext();
11615 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1035
11616 * def __get__(self):
11617 * return self._schema_types
11618 * def __set__(self, types): # <<<<<<<<<<<<<<
11619 * self._schema_types = list(map(unicode, types))
11623 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types); /*proto*/
11624 static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
11626 PyObject *__pyx_t_1 = NULL;
11627 PyObject *__pyx_t_2 = NULL;
11628 __Pyx_SetupRefcountContext("__set__");
11630 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1036
11631 * return self._schema_types
11632 * def __set__(self, types):
11633 * self._schema_types = list(map(unicode, types)) # <<<<<<<<<<<<<<
11637 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11638 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
11639 __Pyx_INCREF(((PyObject *)((PyObject*)&PyUnicode_Type)));
11640 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)&PyUnicode_Type)));
11641 __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyUnicode_Type)));
11642 __Pyx_INCREF(__pyx_v_types);
11643 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_types);
11644 __Pyx_GIVEREF(__pyx_v_types);
11645 __pyx_t_2 = PyObject_Call(__pyx_builtin_map, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11646 __Pyx_GOTREF(__pyx_t_2);
11647 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11648 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11649 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
11650 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
11651 __Pyx_GIVEREF(__pyx_t_2);
11653 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyList_Type)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11654 __Pyx_GOTREF(__pyx_t_2);
11655 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11656 if (!(likely(PyList_CheckExact(__pyx_t_2)) || (__pyx_t_2) == Py_None || (PyErr_Format(PyExc_TypeError, "Expected list, got %s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11657 __Pyx_GIVEREF(__pyx_t_2);
11658 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types);
11659 __Pyx_DECREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types));
11660 ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_self)->_schema_types = ((PyObject *)__pyx_t_2);
11666 __Pyx_XDECREF(__pyx_t_1);
11667 __Pyx_XDECREF(__pyx_t_2);
11668 __Pyx_AddTraceback("lxml.objectify.PyType.xmlSchemaTypes.__set__");
11671 __Pyx_FinishRefcountContext();
11675 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1048
11676 * _TYPE_CHECKS = []
11678 * cdef _lower_bool(b): # <<<<<<<<<<<<<<
11683 static PyObject *__pyx_f_4lxml_9objectify__lower_bool(PyObject *__pyx_v_b) {
11684 PyObject *__pyx_r = NULL;
11686 __Pyx_SetupRefcountContext("_lower_bool");
11687 __Pyx_INCREF(__pyx_v_b);
11689 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1049
11691 * cdef _lower_bool(b):
11692 * if b: # <<<<<<<<<<<<<<
11696 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11699 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1050
11700 * cdef _lower_bool(b):
11702 * return u"true" # <<<<<<<<<<<<<<
11706 __Pyx_XDECREF(__pyx_r);
11707 __Pyx_INCREF(((PyObject *)__pyx_n_u_true));
11708 __pyx_r = ((PyObject *)__pyx_n_u_true);
11714 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1052
11717 * return u"false" # <<<<<<<<<<<<<<
11719 * def __lower_bool(b):
11721 __Pyx_XDECREF(__pyx_r);
11722 __Pyx_INCREF(((PyObject *)__pyx_n_u_false));
11723 __pyx_r = ((PyObject *)__pyx_n_u_false);
11728 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11731 __Pyx_AddTraceback("lxml.objectify._lower_bool");
11734 __Pyx_DECREF(__pyx_v_b);
11735 __Pyx_XGIVEREF(__pyx_r);
11736 __Pyx_FinishRefcountContext();
11740 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1054
11743 * def __lower_bool(b): # <<<<<<<<<<<<<<
11744 * return _lower_bool(b)
11748 static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b); /*proto*/
11749 static PyObject *__pyx_pf_4lxml_9objectify___lower_bool(PyObject *__pyx_self, PyObject *__pyx_v_b) {
11750 PyObject *__pyx_r = NULL;
11751 PyObject *__pyx_t_1 = NULL;
11752 __Pyx_SetupRefcountContext("__lower_bool");
11753 __pyx_self = __pyx_self;
11755 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1055
11757 * def __lower_bool(b):
11758 * return _lower_bool(b) # <<<<<<<<<<<<<<
11760 * cdef _pytypename(obj):
11762 __Pyx_XDECREF(__pyx_r);
11763 __pyx_t_1 = __pyx_f_4lxml_9objectify__lower_bool(__pyx_v_b); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11764 __Pyx_GOTREF(__pyx_t_1);
11765 __pyx_r = __pyx_t_1;
11769 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11772 __Pyx_XDECREF(__pyx_t_1);
11773 __Pyx_AddTraceback("lxml.objectify.__lower_bool");
11776 __Pyx_XGIVEREF(__pyx_r);
11777 __Pyx_FinishRefcountContext();
11781 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1057
11782 * return _lower_bool(b)
11784 * cdef _pytypename(obj): # <<<<<<<<<<<<<<
11785 * if python._isString(obj):
11789 static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) {
11790 PyObject *__pyx_r = NULL;
11792 PyObject *__pyx_t_2 = NULL;
11793 __Pyx_SetupRefcountContext("_pytypename");
11794 __Pyx_INCREF(__pyx_v_obj);
11796 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1058
11798 * cdef _pytypename(obj):
11799 * if python._isString(obj): # <<<<<<<<<<<<<<
11803 __pyx_t_1 = _isString(__pyx_v_obj);
11806 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1059
11807 * cdef _pytypename(obj):
11808 * if python._isString(obj):
11809 * return u"str" # <<<<<<<<<<<<<<
11811 * return _typename(obj)
11813 __Pyx_XDECREF(__pyx_r);
11814 __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
11815 __pyx_r = ((PyObject *)__pyx_n_u_str);
11821 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1061
11824 * return _typename(obj) # <<<<<<<<<<<<<<
11826 * def pytypename(obj):
11828 __Pyx_XDECREF(__pyx_r);
11829 __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11830 __Pyx_GOTREF(__pyx_t_2);
11831 __pyx_r = __pyx_t_2;
11837 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11840 __Pyx_XDECREF(__pyx_t_2);
11841 __Pyx_AddTraceback("lxml.objectify._pytypename");
11844 __Pyx_DECREF(__pyx_v_obj);
11845 __Pyx_XGIVEREF(__pyx_r);
11846 __Pyx_FinishRefcountContext();
11850 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1063
11851 * return _typename(obj)
11853 * def pytypename(obj): # <<<<<<<<<<<<<<
11854 * u"""pytypename(obj)
11858 static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
11859 static char __pyx_doc_4lxml_9objectify_pytypename[] = "pytypename(obj)\n\n Find the name of the corresponding PyType for a Python object.\n ";
11860 static PyObject *__pyx_pf_4lxml_9objectify_pytypename(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
11861 PyObject *__pyx_r = NULL;
11862 PyObject *__pyx_t_1 = NULL;
11863 __Pyx_SetupRefcountContext("pytypename");
11864 __pyx_self = __pyx_self;
11866 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1068
11867 * Find the name of the corresponding PyType for a Python object.
11869 * return _pytypename(obj) # <<<<<<<<<<<<<<
11871 * cdef _registerPyTypes():
11873 __Pyx_XDECREF(__pyx_r);
11874 __pyx_t_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11875 __Pyx_GOTREF(__pyx_t_1);
11876 __pyx_r = __pyx_t_1;
11880 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
11883 __Pyx_XDECREF(__pyx_t_1);
11884 __Pyx_AddTraceback("lxml.objectify.pytypename");
11887 __Pyx_XGIVEREF(__pyx_r);
11888 __Pyx_FinishRefcountContext();
11892 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1070
11893 * return _pytypename(obj)
11895 * cdef _registerPyTypes(): # <<<<<<<<<<<<<<
11896 * pytype = PyType(u'int', int, IntElement)
11897 * pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
11900 static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) {
11901 PyObject *__pyx_v_pytype;
11902 PyObject *__pyx_r = NULL;
11903 PyObject *__pyx_t_1 = NULL;
11904 PyObject *__pyx_t_2 = NULL;
11905 PyObject *__pyx_t_3 = NULL;
11906 __Pyx_SetupRefcountContext("_registerPyTypes");
11907 __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
11909 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1071
11911 * cdef _registerPyTypes():
11912 * pytype = PyType(u'int', int, IntElement) # <<<<<<<<<<<<<<
11913 * pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort",
11914 * u"unsignedByte", u"nonPositiveInteger",
11916 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11917 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
11918 __Pyx_INCREF(((PyObject *)__pyx_n_u_int));
11919 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_int));
11920 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_int));
11921 __Pyx_INCREF(((PyObject *)((PyObject*)&PyInt_Type)));
11922 PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)&PyInt_Type)));
11923 __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyInt_Type)));
11924 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
11925 PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
11926 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
11927 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11928 __Pyx_GOTREF(__pyx_t_2);
11929 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
11930 __Pyx_DECREF(__pyx_v_pytype);
11931 __pyx_v_pytype = __pyx_t_2;
11934 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1072
11935 * cdef _registerPyTypes():
11936 * pytype = PyType(u'int', int, IntElement)
11937 * pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort", # <<<<<<<<<<<<<<
11938 * u"unsignedByte", u"nonPositiveInteger",
11939 * u"negativeInteger", u"long", u"nonNegativeInteger",
11941 __pyx_t_2 = PyTuple_New(13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11942 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
11943 __Pyx_INCREF(((PyObject *)__pyx_n_u_integer));
11944 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_integer));
11945 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_integer));
11946 __Pyx_INCREF(((PyObject *)__pyx_n_u_int));
11947 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_u_int));
11948 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_int));
11949 __Pyx_INCREF(((PyObject *)__pyx_n_u_short));
11950 PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_u_short));
11951 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_short));
11952 __Pyx_INCREF(((PyObject *)__pyx_n_u_byte));
11953 PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_u_byte));
11954 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_byte));
11955 __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedShort));
11956 PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_u_unsignedShort));
11957 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedShort));
11958 __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedByte));
11959 PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_u_unsignedByte));
11960 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedByte));
11961 __Pyx_INCREF(((PyObject *)__pyx_n_u_nonPositiveInteger));
11962 PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_u_nonPositiveInteger));
11963 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_nonPositiveInteger));
11964 __Pyx_INCREF(((PyObject *)__pyx_n_u_negativeInteger));
11965 PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_u_negativeInteger));
11966 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_negativeInteger));
11967 __Pyx_INCREF(((PyObject *)__pyx_n_u_long));
11968 PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_u_long));
11969 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_long));
11970 __Pyx_INCREF(((PyObject *)__pyx_n_u_nonNegativeInteger));
11971 PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_u_nonNegativeInteger));
11972 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_nonNegativeInteger));
11973 __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedLong));
11974 PyTuple_SET_ITEM(__pyx_t_2, 10, ((PyObject *)__pyx_n_u_unsignedLong));
11975 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedLong));
11976 __Pyx_INCREF(((PyObject *)__pyx_n_u_unsignedInt));
11977 PyTuple_SET_ITEM(__pyx_t_2, 11, ((PyObject *)__pyx_n_u_unsignedInt));
11978 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_unsignedInt));
11979 __Pyx_INCREF(((PyObject *)__pyx_n_u_positiveInteger));
11980 PyTuple_SET_ITEM(__pyx_t_2, 12, ((PyObject *)__pyx_n_u_positiveInteger));
11981 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_positiveInteger));
11982 if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11983 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
11985 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1076
11986 * u"negativeInteger", u"long", u"nonNegativeInteger",
11987 * u"unsignedLong", u"unsignedInt", u"positiveInteger",)
11988 * pytype.register() # <<<<<<<<<<<<<<
11990 * # 'long' type just for backwards compatibility
11992 __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11993 __Pyx_GOTREF(__pyx_t_2);
11994 __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
11995 __Pyx_GOTREF(__pyx_t_1);
11996 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11997 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11999 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1079
12001 * # 'long' type just for backwards compatibility
12002 * pytype = PyType(u'long', None, IntElement) # <<<<<<<<<<<<<<
12003 * pytype.register()
12006 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12007 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12008 __Pyx_INCREF(((PyObject *)__pyx_n_u_long));
12009 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_long));
12010 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_long));
12011 __Pyx_INCREF(Py_None);
12012 PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
12013 __Pyx_GIVEREF(Py_None);
12014 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
12015 PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
12016 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_IntElement)));
12017 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12018 __Pyx_GOTREF(__pyx_t_2);
12019 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
12020 __Pyx_DECREF(__pyx_v_pytype);
12021 __pyx_v_pytype = __pyx_t_2;
12024 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1080
12025 * # 'long' type just for backwards compatibility
12026 * pytype = PyType(u'long', None, IntElement)
12027 * pytype.register() # <<<<<<<<<<<<<<
12029 * pytype = PyType(u'float', float, FloatElement)
12031 __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12032 __Pyx_GOTREF(__pyx_t_2);
12033 __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12034 __Pyx_GOTREF(__pyx_t_1);
12035 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12036 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12038 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1082
12039 * pytype.register()
12041 * pytype = PyType(u'float', float, FloatElement) # <<<<<<<<<<<<<<
12042 * pytype.xmlSchemaTypes = (u"double", u"float")
12043 * pytype.register()
12045 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12046 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12047 __Pyx_INCREF(((PyObject *)__pyx_n_u_float));
12048 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_float));
12049 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_float));
12050 __Pyx_INCREF(((PyObject *)((PyObject*)&PyFloat_Type)));
12051 PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)((PyObject*)&PyFloat_Type)));
12052 __Pyx_GIVEREF(((PyObject *)((PyObject*)&PyFloat_Type)));
12053 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
12054 PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
12055 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_FloatElement)));
12056 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1082; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12057 __Pyx_GOTREF(__pyx_t_2);
12058 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
12059 __Pyx_DECREF(__pyx_v_pytype);
12060 __pyx_v_pytype = __pyx_t_2;
12063 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1083
12065 * pytype = PyType(u'float', float, FloatElement)
12066 * pytype.xmlSchemaTypes = (u"double", u"float") # <<<<<<<<<<<<<<
12067 * pytype.register()
12070 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12071 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
12072 __Pyx_INCREF(((PyObject *)__pyx_n_u_double));
12073 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_double));
12074 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_double));
12075 __Pyx_INCREF(((PyObject *)__pyx_n_u_float));
12076 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_u_float));
12077 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_float));
12078 if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12079 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12081 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1084
12082 * pytype = PyType(u'float', float, FloatElement)
12083 * pytype.xmlSchemaTypes = (u"double", u"float")
12084 * pytype.register() # <<<<<<<<<<<<<<
12086 * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
12088 __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12089 __Pyx_GOTREF(__pyx_t_2);
12090 __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12091 __Pyx_GOTREF(__pyx_t_1);
12092 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12093 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12095 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1086
12096 * pytype.register()
12098 * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool) # <<<<<<<<<<<<<<
12099 * pytype.xmlSchemaTypes = (u"boolean",)
12100 * pytype.register()
12102 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui___checkBool); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12103 __Pyx_GOTREF(__pyx_t_1);
12104 __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui___lower_bool); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12105 __Pyx_GOTREF(__pyx_t_2);
12106 __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12107 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12108 __Pyx_INCREF(((PyObject *)__pyx_n_u_bool));
12109 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_bool));
12110 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_bool));
12111 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
12112 __Pyx_GIVEREF(__pyx_t_1);
12113 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
12114 PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
12115 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_BoolElement)));
12116 PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
12117 __Pyx_GIVEREF(__pyx_t_2);
12120 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12121 __Pyx_GOTREF(__pyx_t_2);
12122 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12123 __Pyx_DECREF(__pyx_v_pytype);
12124 __pyx_v_pytype = __pyx_t_2;
12127 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1087
12129 * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
12130 * pytype.xmlSchemaTypes = (u"boolean",) # <<<<<<<<<<<<<<
12131 * pytype.register()
12134 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12135 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
12136 __Pyx_INCREF(((PyObject *)__pyx_n_u_boolean));
12137 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_boolean));
12138 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_boolean));
12139 if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12140 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12142 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1088
12143 * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool)
12144 * pytype.xmlSchemaTypes = (u"boolean",)
12145 * pytype.register() # <<<<<<<<<<<<<<
12147 * pytype = PyType(u'str', None, StringElement)
12149 __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12150 __Pyx_GOTREF(__pyx_t_2);
12151 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12152 __Pyx_GOTREF(__pyx_t_3);
12153 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12154 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12156 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1090
12157 * pytype.register()
12159 * pytype = PyType(u'str', None, StringElement) # <<<<<<<<<<<<<<
12160 * pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language",
12161 * u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
12163 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12164 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12165 __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
12166 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_str));
12167 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_str));
12168 __Pyx_INCREF(Py_None);
12169 PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
12170 __Pyx_GIVEREF(Py_None);
12171 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12172 PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12173 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12174 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12175 __Pyx_GOTREF(__pyx_t_2);
12176 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12177 __Pyx_DECREF(__pyx_v_pytype);
12178 __pyx_v_pytype = __pyx_t_2;
12181 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1091
12183 * pytype = PyType(u'str', None, StringElement)
12184 * pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language", # <<<<<<<<<<<<<<
12185 * u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
12188 __pyx_t_2 = PyTuple_New(10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12189 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
12190 __Pyx_INCREF(((PyObject *)__pyx_n_u_string));
12191 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_u_string));
12192 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_string));
12193 __Pyx_INCREF(((PyObject *)__pyx_n_u_normalizedString));
12194 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_u_normalizedString));
12195 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_normalizedString));
12196 __Pyx_INCREF(((PyObject *)__pyx_n_u_token));
12197 PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_n_u_token));
12198 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_token));
12199 __Pyx_INCREF(((PyObject *)__pyx_n_u_language));
12200 PyTuple_SET_ITEM(__pyx_t_2, 3, ((PyObject *)__pyx_n_u_language));
12201 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_language));
12202 __Pyx_INCREF(((PyObject *)__pyx_n_u_Name));
12203 PyTuple_SET_ITEM(__pyx_t_2, 4, ((PyObject *)__pyx_n_u_Name));
12204 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_Name));
12205 __Pyx_INCREF(((PyObject *)__pyx_n_u_NCName));
12206 PyTuple_SET_ITEM(__pyx_t_2, 5, ((PyObject *)__pyx_n_u_NCName));
12207 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NCName));
12208 __Pyx_INCREF(((PyObject *)__pyx_n_u_ID));
12209 PyTuple_SET_ITEM(__pyx_t_2, 6, ((PyObject *)__pyx_n_u_ID));
12210 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ID));
12211 __Pyx_INCREF(((PyObject *)__pyx_n_u_IDREF));
12212 PyTuple_SET_ITEM(__pyx_t_2, 7, ((PyObject *)__pyx_n_u_IDREF));
12213 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_IDREF));
12214 __Pyx_INCREF(((PyObject *)__pyx_n_u_ENTITY));
12215 PyTuple_SET_ITEM(__pyx_t_2, 8, ((PyObject *)__pyx_n_u_ENTITY));
12216 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ENTITY));
12217 __Pyx_INCREF(((PyObject *)__pyx_n_u_NMTOKEN));
12218 PyTuple_SET_ITEM(__pyx_t_2, 9, ((PyObject *)__pyx_n_u_NMTOKEN));
12219 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NMTOKEN));
12220 if (PyObject_SetAttr(__pyx_v_pytype, __pyx_n_ui_xmlSchemaTypes, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12221 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
12223 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1094
12224 * u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY",
12226 * pytype.register() # <<<<<<<<<<<<<<
12230 __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12231 __Pyx_GOTREF(__pyx_t_2);
12232 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12233 __Pyx_GOTREF(__pyx_t_3);
12234 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12235 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12237 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1097
12240 * pytype = PyType(u'NoneType', None, NoneElement) # <<<<<<<<<<<<<<
12241 * pytype.register()
12244 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12245 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12246 __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
12247 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_NoneType));
12248 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NoneType));
12249 __Pyx_INCREF(Py_None);
12250 PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
12251 __Pyx_GIVEREF(Py_None);
12252 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12253 PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12254 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12255 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12256 __Pyx_GOTREF(__pyx_t_2);
12257 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12258 __Pyx_DECREF(__pyx_v_pytype);
12259 __pyx_v_pytype = __pyx_t_2;
12262 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1098
12264 * pytype = PyType(u'NoneType', None, NoneElement)
12265 * pytype.register() # <<<<<<<<<<<<<<
12267 * # backwards compatibility
12269 __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12270 __Pyx_GOTREF(__pyx_t_2);
12271 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12272 __Pyx_GOTREF(__pyx_t_3);
12273 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12274 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12276 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1101
12278 * # backwards compatibility
12279 * pytype = PyType(u'none', None, NoneElement) # <<<<<<<<<<<<<<
12280 * pytype.register()
12283 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12284 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
12285 __Pyx_INCREF(((PyObject *)__pyx_n_u_none));
12286 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_none));
12287 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_none));
12288 __Pyx_INCREF(Py_None);
12289 PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
12290 __Pyx_GIVEREF(Py_None);
12291 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12292 PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12293 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
12294 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12295 __Pyx_GOTREF(__pyx_t_2);
12296 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
12297 __Pyx_DECREF(__pyx_v_pytype);
12298 __pyx_v_pytype = __pyx_t_2;
12301 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1102
12302 * # backwards compatibility
12303 * pytype = PyType(u'none', None, NoneElement)
12304 * pytype.register() # <<<<<<<<<<<<<<
12306 * # non-registered PyType for inner tree elements
12308 __pyx_t_2 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_register); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12309 __Pyx_GOTREF(__pyx_t_2);
12310 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12311 __Pyx_GOTREF(__pyx_t_3);
12312 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12313 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12315 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12318 __Pyx_XDECREF(__pyx_t_1);
12319 __Pyx_XDECREF(__pyx_t_2);
12320 __Pyx_XDECREF(__pyx_t_3);
12321 __Pyx_AddTraceback("lxml.objectify._registerPyTypes");
12324 __Pyx_DECREF(__pyx_v_pytype);
12325 __Pyx_XGIVEREF(__pyx_r);
12326 __Pyx_FinishRefcountContext();
12330 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1110
12331 * _registerPyTypes()
12333 * def getRegisteredTypes(): # <<<<<<<<<<<<<<
12334 * u"""getRegisteredTypes()
12338 static PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused); /*proto*/
12339 static char __pyx_doc_4lxml_9objectify_getRegisteredTypes[] = "getRegisteredTypes()\n\n Returns a list of the currently registered PyType objects.\n\n To add a new type, retrieve this list and call unregister() for all\n entries. Then add the new type at a suitable position (possibly replacing\n an existing one) and call register() for all entries.\n\n This is necessary if the new type interferes with the type check functions\n of existing ones (normally only int/float/bool) and must the tried before\n other types. To add a type that is not yet parsable by the current type\n check functions, you can simply register() it, which will append it to the\n end of the type list.\n ";
12340 static PyObject *__pyx_pf_4lxml_9objectify_getRegisteredTypes(PyObject *__pyx_self, PyObject *unused) {
12341 PyObject *__pyx_v_types = 0;
12342 PyObject *__pyx_v_known = 0;
12343 PyObject *__pyx_v_check;
12344 PyObject *__pyx_v_pytype;
12345 PyObject *__pyx_v_name;
12346 PyObject *__pyx_r = NULL;
12347 PyObject *__pyx_t_1 = NULL;
12348 Py_ssize_t __pyx_t_2;
12349 PyObject *__pyx_t_3 = NULL;
12350 PyObject *__pyx_t_4 = NULL;
12351 PyObject *__pyx_t_5 = NULL;
12352 PyObject *__pyx_t_6 = NULL;
12355 __Pyx_SetupRefcountContext("getRegisteredTypes");
12356 __pyx_self = __pyx_self;
12357 __pyx_v_check = Py_None; __Pyx_INCREF(Py_None);
12358 __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
12359 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
12361 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1125
12362 * end of the type list.
12364 * cdef list types = [] # <<<<<<<<<<<<<<
12365 * cdef set known = set()
12366 * for check, pytype in _TYPE_CHECKS:
12368 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12369 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12370 __pyx_v_types = __pyx_t_1;
12373 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1126
12375 * cdef list types = []
12376 * cdef set known = set() # <<<<<<<<<<<<<<
12377 * for check, pytype in _TYPE_CHECKS:
12378 * name = pytype.name
12380 __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12381 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
12382 __pyx_v_known = __pyx_t_1;
12385 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1127
12386 * cdef list types = []
12387 * cdef set known = set()
12388 * for check, pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<<
12389 * name = pytype.name
12390 * if name not in known:
12392 if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
12393 __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
12395 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12398 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
12399 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
12400 if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
12401 PyObject* tuple = __pyx_t_3;
12402 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
12403 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
12404 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12405 __Pyx_DECREF(__pyx_v_check);
12406 __pyx_v_check = __pyx_t_4;
12408 __Pyx_DECREF(__pyx_v_pytype);
12409 __pyx_v_pytype = __pyx_t_5;
12412 __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12413 __Pyx_GOTREF(__pyx_t_6);
12414 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12415 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12416 __Pyx_GOTREF(__pyx_t_4);
12417 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12418 __Pyx_GOTREF(__pyx_t_5);
12419 if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12420 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12421 __Pyx_DECREF(__pyx_v_check);
12422 __pyx_v_check = __pyx_t_4;
12424 __Pyx_DECREF(__pyx_v_pytype);
12425 __pyx_v_pytype = __pyx_t_5;
12429 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1128
12430 * cdef set known = set()
12431 * for check, pytype in _TYPE_CHECKS:
12432 * name = pytype.name # <<<<<<<<<<<<<<
12433 * if name not in known:
12436 __pyx_t_3 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12437 __Pyx_GOTREF(__pyx_t_3);
12438 __Pyx_DECREF(__pyx_v_name);
12439 __pyx_v_name = __pyx_t_3;
12442 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1129
12443 * for check, pytype in _TYPE_CHECKS:
12444 * name = pytype.name
12445 * if name not in known: # <<<<<<<<<<<<<<
12447 * types.append(pytype)
12449 __pyx_t_7 = (!PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12452 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1130
12453 * name = pytype.name
12454 * if name not in known:
12455 * known.add(name) # <<<<<<<<<<<<<<
12456 * types.append(pytype)
12457 * for pytype in _PYTYPE_DICT.values():
12459 __pyx_t_8 = PySet_Add(((PyObject *)__pyx_v_known), __pyx_v_name); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12461 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1131
12462 * if name not in known:
12464 * types.append(pytype) # <<<<<<<<<<<<<<
12465 * for pytype in _PYTYPE_DICT.values():
12466 * name = pytype.name
12468 if (unlikely(__pyx_v_types == Py_None)) {
12469 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12471 __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_types), __pyx_v_pytype); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12476 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12478 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1132
12480 * types.append(pytype)
12481 * for pytype in _PYTYPE_DICT.values(): # <<<<<<<<<<<<<<
12482 * name = pytype.name
12483 * if name not in known:
12485 __pyx_t_1 = PyDict_Values(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12486 __Pyx_GOTREF(__pyx_t_1);
12487 if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
12488 __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
12490 __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12491 __Pyx_GOTREF(__pyx_t_3);
12493 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12495 if (likely(PyList_CheckExact(__pyx_t_3))) {
12496 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
12497 __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
12498 } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
12499 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
12500 __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++;
12502 __pyx_t_1 = PyIter_Next(__pyx_t_3);
12504 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12507 __Pyx_GOTREF(__pyx_t_1);
12509 __Pyx_DECREF(__pyx_v_pytype);
12510 __pyx_v_pytype = __pyx_t_1;
12513 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1133
12514 * types.append(pytype)
12515 * for pytype in _PYTYPE_DICT.values():
12516 * name = pytype.name # <<<<<<<<<<<<<<
12517 * if name not in known:
12520 __pyx_t_1 = PyObject_GetAttr(__pyx_v_pytype, __pyx_n_ui_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12521 __Pyx_GOTREF(__pyx_t_1);
12522 __Pyx_DECREF(__pyx_v_name);
12523 __pyx_v_name = __pyx_t_1;
12526 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1134
12527 * for pytype in _PYTYPE_DICT.values():
12528 * name = pytype.name
12529 * if name not in known: # <<<<<<<<<<<<<<
12531 * types.append(pytype)
12533 __pyx_t_7 = (!PySequence_Contains(((PyObject *)__pyx_v_known), __pyx_v_name)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12536 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1135
12537 * name = pytype.name
12538 * if name not in known:
12539 * known.add(name) # <<<<<<<<<<<<<<
12540 * types.append(pytype)
12543 __pyx_t_8 = PySet_Add(((PyObject *)__pyx_v_known), __pyx_v_name); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12545 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1136
12546 * if name not in known:
12548 * types.append(pytype) # <<<<<<<<<<<<<<
12552 if (unlikely(__pyx_v_types == Py_None)) {
12553 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12555 __pyx_t_8 = PyList_Append(((PyObject *)__pyx_v_types), __pyx_v_pytype); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12560 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12562 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1137
12564 * types.append(pytype)
12565 * return types # <<<<<<<<<<<<<<
12567 * cdef PyType _guessPyType(value, PyType defaulttype):
12569 __Pyx_XDECREF(__pyx_r);
12570 __Pyx_INCREF(((PyObject *)__pyx_v_types));
12571 __pyx_r = ((PyObject *)__pyx_v_types);
12574 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12577 __Pyx_XDECREF(__pyx_t_1);
12578 __Pyx_XDECREF(__pyx_t_3);
12579 __Pyx_XDECREF(__pyx_t_4);
12580 __Pyx_XDECREF(__pyx_t_5);
12581 __Pyx_XDECREF(__pyx_t_6);
12582 __Pyx_AddTraceback("lxml.objectify.getRegisteredTypes");
12585 __Pyx_XDECREF(__pyx_v_types);
12586 __Pyx_XDECREF(__pyx_v_known);
12587 __Pyx_DECREF(__pyx_v_check);
12588 __Pyx_DECREF(__pyx_v_pytype);
12589 __Pyx_DECREF(__pyx_v_name);
12590 __Pyx_XGIVEREF(__pyx_r);
12591 __Pyx_FinishRefcountContext();
12595 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1139
12598 * cdef PyType _guessPyType(value, PyType defaulttype): # <<<<<<<<<<<<<<
12599 * if value is None:
12603 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guessPyType(PyObject *__pyx_v_value, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_defaulttype) {
12604 PyObject *__pyx_v_type_check;
12605 PyObject *__pyx_v_tested_pytype;
12606 struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
12608 Py_ssize_t __pyx_t_2;
12609 PyObject *__pyx_t_3 = NULL;
12610 PyObject *__pyx_t_4 = NULL;
12611 PyObject *__pyx_t_5 = NULL;
12612 PyObject *__pyx_t_6 = NULL;
12613 PyObject *__pyx_t_7 = NULL;
12615 __Pyx_SetupRefcountContext("_guessPyType");
12616 __Pyx_INCREF(__pyx_v_value);
12617 __Pyx_INCREF((PyObject *)__pyx_v_defaulttype);
12618 __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
12619 __pyx_v_tested_pytype = Py_None; __Pyx_INCREF(Py_None);
12621 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1140
12623 * cdef PyType _guessPyType(value, PyType defaulttype):
12624 * if value is None: # <<<<<<<<<<<<<<
12626 * for type_check, tested_pytype in _TYPE_CHECKS:
12628 __pyx_t_1 = (__pyx_v_value == Py_None);
12631 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1141
12632 * cdef PyType _guessPyType(value, PyType defaulttype):
12633 * if value is None:
12634 * return None # <<<<<<<<<<<<<<
12635 * for type_check, tested_pytype in _TYPE_CHECKS:
12638 __Pyx_XDECREF(((PyObject *)__pyx_r));
12639 __Pyx_INCREF(Py_None);
12640 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
12646 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1142
12647 * if value is None:
12649 * for type_check, tested_pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<<
12651 * type_check(value)
12653 if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
12654 __pyx_t_2 = 0; __pyx_t_3 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_3);
12656 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12659 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
12660 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
12661 if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
12662 PyObject* tuple = __pyx_t_4;
12663 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
12664 __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
12665 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12666 __Pyx_DECREF(__pyx_v_type_check);
12667 __pyx_v_type_check = __pyx_t_5;
12669 __Pyx_DECREF(__pyx_v_tested_pytype);
12670 __pyx_v_tested_pytype = __pyx_t_6;
12673 __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12674 __Pyx_GOTREF(__pyx_t_7);
12675 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12676 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12677 __Pyx_GOTREF(__pyx_t_5);
12678 __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12679 __Pyx_GOTREF(__pyx_t_6);
12680 if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12681 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12682 __Pyx_DECREF(__pyx_v_type_check);
12683 __pyx_v_type_check = __pyx_t_5;
12685 __Pyx_DECREF(__pyx_v_tested_pytype);
12686 __pyx_v_tested_pytype = __pyx_t_6;
12690 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1143
12692 * for type_check, tested_pytype in _TYPE_CHECKS:
12693 * try: # <<<<<<<<<<<<<<
12694 * type_check(value)
12695 * return <PyType>tested_pytype
12698 PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
12699 __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
12700 __Pyx_XGOTREF(__pyx_save_exc_type);
12701 __Pyx_XGOTREF(__pyx_save_exc_value);
12702 __Pyx_XGOTREF(__pyx_save_exc_tb);
12705 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1144
12706 * for type_check, tested_pytype in _TYPE_CHECKS:
12708 * type_check(value) # <<<<<<<<<<<<<<
12709 * return <PyType>tested_pytype
12710 * except IGNORABLE_ERRORS:
12712 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
12713 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
12714 __Pyx_INCREF(__pyx_v_value);
12715 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
12716 __Pyx_GIVEREF(__pyx_v_value);
12717 __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
12718 __Pyx_GOTREF(__pyx_t_6);
12719 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
12720 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12722 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1145
12724 * type_check(value)
12725 * return <PyType>tested_pytype # <<<<<<<<<<<<<<
12726 * except IGNORABLE_ERRORS:
12727 * # could not be parsed as the specififed type => ignore
12729 __Pyx_XDECREF(((PyObject *)__pyx_r));
12730 __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype)));
12731 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_tested_pytype);
12732 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12733 goto __pyx_L10_try_return;
12735 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12736 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12737 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12738 goto __pyx_L13_try_end;
12739 __pyx_L10_try_return:;
12740 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12741 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12742 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12745 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12746 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
12747 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12748 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12750 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1146
12751 * type_check(value)
12752 * return <PyType>tested_pytype
12753 * except IGNORABLE_ERRORS: # <<<<<<<<<<<<<<
12754 * # could not be parsed as the specififed type => ignore
12757 __pyx_t_8 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
12759 PyErr_Restore(0,0,0);
12760 goto __pyx_L7_exception_handled;
12762 __Pyx_XDECREF(__pyx_save_exc_type);
12763 __Pyx_XDECREF(__pyx_save_exc_value);
12764 __Pyx_XDECREF(__pyx_save_exc_tb);
12765 goto __pyx_L1_error;
12766 __pyx_L7_exception_handled:;
12767 __Pyx_XGIVEREF(__pyx_save_exc_type);
12768 __Pyx_XGIVEREF(__pyx_save_exc_value);
12769 __Pyx_XGIVEREF(__pyx_save_exc_tb);
12770 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
12771 __pyx_L13_try_end:;
12774 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12776 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1149
12777 * # could not be parsed as the specififed type => ignore
12779 * return defaulttype # <<<<<<<<<<<<<<
12781 * cdef object _guessElementClass(tree.xmlNode* c_node):
12783 __Pyx_XDECREF(((PyObject *)__pyx_r));
12784 __Pyx_INCREF(((PyObject *)__pyx_v_defaulttype));
12785 __pyx_r = __pyx_v_defaulttype;
12788 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
12791 __Pyx_XDECREF(__pyx_t_3);
12792 __Pyx_XDECREF(__pyx_t_4);
12793 __Pyx_XDECREF(__pyx_t_5);
12794 __Pyx_XDECREF(__pyx_t_6);
12795 __Pyx_XDECREF(__pyx_t_7);
12796 __Pyx_AddTraceback("lxml.objectify._guessPyType");
12799 __Pyx_DECREF(__pyx_v_type_check);
12800 __Pyx_DECREF(__pyx_v_tested_pytype);
12801 __Pyx_DECREF(__pyx_v_value);
12802 __Pyx_DECREF((PyObject *)__pyx_v_defaulttype);
12803 __Pyx_XGIVEREF((PyObject *)__pyx_r);
12804 __Pyx_FinishRefcountContext();
12808 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1151
12809 * return defaulttype
12811 * cdef object _guessElementClass(tree.xmlNode* c_node): # <<<<<<<<<<<<<<
12812 * value = textOf(c_node)
12813 * if value is None:
12816 static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_node) {
12817 PyObject *__pyx_v_value;
12818 PyObject *__pyx_v_type_check;
12819 PyObject *__pyx_v_pytype;
12820 PyObject *__pyx_r = NULL;
12821 PyObject *__pyx_t_1 = NULL;
12823 Py_ssize_t __pyx_t_3;
12824 PyObject *__pyx_t_4 = NULL;
12825 PyObject *__pyx_t_5 = NULL;
12826 PyObject *__pyx_t_6 = NULL;
12827 PyObject *__pyx_t_7 = NULL;
12829 __Pyx_SetupRefcountContext("_guessElementClass");
12830 __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
12831 __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
12832 __pyx_v_pytype = Py_None; __Pyx_INCREF(Py_None);
12834 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1152
12836 * cdef object _guessElementClass(tree.xmlNode* c_node):
12837 * value = textOf(c_node) # <<<<<<<<<<<<<<
12838 * if value is None:
12841 __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12842 __Pyx_GOTREF(__pyx_t_1);
12843 __Pyx_DECREF(__pyx_v_value);
12844 __pyx_v_value = __pyx_t_1;
12847 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1153
12848 * cdef object _guessElementClass(tree.xmlNode* c_node):
12849 * value = textOf(c_node)
12850 * if value is None: # <<<<<<<<<<<<<<
12854 __pyx_t_2 = (__pyx_v_value == Py_None);
12857 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1154
12858 * value = textOf(c_node)
12859 * if value is None:
12860 * return None # <<<<<<<<<<<<<<
12862 * return StringElement
12864 __Pyx_XDECREF(__pyx_r);
12865 __Pyx_INCREF(Py_None);
12872 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1155
12873 * if value is None:
12875 * if value == u'': # <<<<<<<<<<<<<<
12876 * return StringElement
12879 __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, ((PyObject *)__pyx_kp_u_4), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12880 __Pyx_GOTREF(__pyx_t_1);
12881 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12882 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12885 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1156
12888 * return StringElement # <<<<<<<<<<<<<<
12890 * for type_check, pytype in _TYPE_CHECKS:
12892 __Pyx_XDECREF(__pyx_r);
12893 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
12894 __pyx_r = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
12900 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1158
12901 * return StringElement
12903 * for type_check, pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<<
12905 * type_check(value)
12907 if (likely(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS) != Py_None)) {
12908 __pyx_t_3 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_INCREF(__pyx_t_1);
12910 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12913 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
12914 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
12915 if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
12916 PyObject* tuple = __pyx_t_4;
12917 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
12918 __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
12919 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12920 __Pyx_DECREF(__pyx_v_type_check);
12921 __pyx_v_type_check = __pyx_t_5;
12923 __Pyx_DECREF(__pyx_v_pytype);
12924 __pyx_v_pytype = __pyx_t_6;
12927 __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12928 __Pyx_GOTREF(__pyx_t_7);
12929 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12930 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12931 __Pyx_GOTREF(__pyx_t_5);
12932 __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12933 __Pyx_GOTREF(__pyx_t_6);
12934 if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
12935 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
12936 __Pyx_DECREF(__pyx_v_type_check);
12937 __pyx_v_type_check = __pyx_t_5;
12939 __Pyx_DECREF(__pyx_v_pytype);
12940 __pyx_v_pytype = __pyx_t_6;
12944 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1159
12946 * for type_check, pytype in _TYPE_CHECKS:
12947 * try: # <<<<<<<<<<<<<<
12948 * type_check(value)
12949 * return (<PyType>pytype)._type
12952 PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
12953 __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
12954 __Pyx_XGOTREF(__pyx_save_exc_type);
12955 __Pyx_XGOTREF(__pyx_save_exc_value);
12956 __Pyx_XGOTREF(__pyx_save_exc_tb);
12959 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1160
12960 * for type_check, pytype in _TYPE_CHECKS:
12962 * type_check(value) # <<<<<<<<<<<<<<
12963 * return (<PyType>pytype)._type
12964 * except IGNORABLE_ERRORS:
12966 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
12967 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
12968 __Pyx_INCREF(__pyx_v_value);
12969 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_value);
12970 __Pyx_GIVEREF(__pyx_v_value);
12971 __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
12972 __Pyx_GOTREF(__pyx_t_6);
12973 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
12974 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12976 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1161
12978 * type_check(value)
12979 * return (<PyType>pytype)._type # <<<<<<<<<<<<<<
12980 * except IGNORABLE_ERRORS:
12983 __Pyx_XDECREF(__pyx_r);
12984 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type);
12985 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->_type;
12986 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12987 goto __pyx_L11_try_return;
12989 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12990 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12991 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12992 goto __pyx_L14_try_end;
12993 __pyx_L11_try_return:;
12994 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
12995 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
12996 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
12999 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13000 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
13001 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13002 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13004 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1162
13005 * type_check(value)
13006 * return (<PyType>pytype)._type
13007 * except IGNORABLE_ERRORS: # <<<<<<<<<<<<<<
13011 __pyx_t_8 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
13013 PyErr_Restore(0,0,0);
13014 goto __pyx_L8_exception_handled;
13016 __Pyx_XDECREF(__pyx_save_exc_type);
13017 __Pyx_XDECREF(__pyx_save_exc_value);
13018 __Pyx_XDECREF(__pyx_save_exc_tb);
13019 goto __pyx_L1_error;
13020 __pyx_L8_exception_handled:;
13021 __Pyx_XGIVEREF(__pyx_save_exc_type);
13022 __Pyx_XGIVEREF(__pyx_save_exc_value);
13023 __Pyx_XGIVEREF(__pyx_save_exc_tb);
13024 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
13025 __pyx_L14_try_end:;
13028 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13030 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1164
13031 * except IGNORABLE_ERRORS:
13033 * return None # <<<<<<<<<<<<<<
13035 * ################################################################################
13037 __Pyx_XDECREF(__pyx_r);
13038 __Pyx_INCREF(Py_None);
13042 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13045 __Pyx_XDECREF(__pyx_t_1);
13046 __Pyx_XDECREF(__pyx_t_4);
13047 __Pyx_XDECREF(__pyx_t_5);
13048 __Pyx_XDECREF(__pyx_t_6);
13049 __Pyx_XDECREF(__pyx_t_7);
13050 __Pyx_AddTraceback("lxml.objectify._guessElementClass");
13053 __Pyx_DECREF(__pyx_v_value);
13054 __Pyx_DECREF(__pyx_v_type_check);
13055 __Pyx_DECREF(__pyx_v_pytype);
13056 __Pyx_XGIVEREF(__pyx_r);
13057 __Pyx_FinishRefcountContext();
13061 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1175
13062 * cdef bint _annotate
13064 * def __call__(self, *children, **attrib): # <<<<<<<<<<<<<<
13065 * u"__call__(self, *children, **attrib)"
13066 * cdef _ObjectifyElementMakerCaller elementMaker
13069 static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13070 static char __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__[] = "__call__(self, *children, **attrib)";
13071 static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13072 PyObject *__pyx_v_children = 0;
13073 PyObject *__pyx_v_attrib = 0;
13074 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_elementMaker;
13075 PyObject *__pyx_v_pytype;
13076 struct LxmlElement *__pyx_v_element;
13077 struct LxmlElement *__pyx_v_childElement;
13078 int __pyx_v_has_children;
13079 int __pyx_v_has_string_value;
13080 PyObject *__pyx_v_pytype_name;
13081 PyObject *__pyx_v_child;
13082 PyObject *__pyx_r = NULL;
13084 PyObject *__pyx_t_2 = NULL;
13085 PyObject *__pyx_t_3 = NULL;
13086 Py_ssize_t __pyx_t_4;
13088 PyObject *__pyx_t_6 = NULL;
13089 __Pyx_SetupRefcountContext("__call__");
13090 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 1))) return NULL;
13091 __pyx_v_attrib = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
13092 if (unlikely(!__pyx_v_attrib)) return NULL;
13093 __Pyx_GOTREF(__pyx_v_attrib);
13094 __Pyx_INCREF(__pyx_args);
13095 __pyx_v_children = __pyx_args;
13096 __Pyx_INCREF((PyObject *)__pyx_v_self);
13097 __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); __Pyx_INCREF(Py_None);
13098 __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
13099 __pyx_v_childElement = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
13100 __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);
13101 __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);
13103 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1183
13104 * cdef bint has_children
13105 * cdef bint has_string_value
13106 * if self._element_factory is None: # <<<<<<<<<<<<<<
13107 * element = _makeElement(self._tag, None, attrib, self._nsmap)
13110 __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory == Py_None);
13113 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1184
13114 * cdef bint has_string_value
13115 * if self._element_factory is None:
13116 * element = _makeElement(self._tag, None, attrib, self._nsmap) # <<<<<<<<<<<<<<
13118 * element = self._element_factory(self._tag, attrib, self._nsmap)
13120 __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag, Py_None, __pyx_v_attrib, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13121 __Pyx_GOTREF(__pyx_t_2);
13122 __Pyx_DECREF(((PyObject *)__pyx_v_element));
13123 __pyx_v_element = ((struct LxmlElement *)__pyx_t_2);
13129 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1186
13130 * element = _makeElement(self._tag, None, attrib, self._nsmap)
13132 * element = self._element_factory(self._tag, attrib, self._nsmap) # <<<<<<<<<<<<<<
13134 * pytype_name = None
13136 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13137 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
13138 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
13139 PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
13140 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_tag);
13141 __Pyx_INCREF(__pyx_v_attrib);
13142 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_attrib);
13143 __Pyx_GIVEREF(__pyx_v_attrib);
13144 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
13145 PyTuple_SET_ITEM(__pyx_t_2, 2, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
13146 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_nsmap);
13147 __pyx_t_3 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_element_factory, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13148 __Pyx_GOTREF(__pyx_t_3);
13149 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13150 if (!(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13151 __Pyx_DECREF(((PyObject *)__pyx_v_element));
13152 __pyx_v_element = ((struct LxmlElement *)__pyx_t_3);
13157 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1188
13158 * element = self._element_factory(self._tag, attrib, self._nsmap)
13160 * pytype_name = None # <<<<<<<<<<<<<<
13162 * has_string_value = 0
13164 __Pyx_INCREF(Py_None);
13165 __Pyx_DECREF(__pyx_v_pytype_name);
13166 __pyx_v_pytype_name = Py_None;
13168 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1189
13170 * pytype_name = None
13171 * has_children = 0 # <<<<<<<<<<<<<<
13172 * has_string_value = 0
13173 * for child in children:
13175 __pyx_v_has_children = 0;
13177 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1190
13178 * pytype_name = None
13180 * has_string_value = 0 # <<<<<<<<<<<<<<
13181 * for child in children:
13182 * if child is None:
13184 __pyx_v_has_string_value = 0;
13186 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1191
13188 * has_string_value = 0
13189 * for child in children: # <<<<<<<<<<<<<<
13190 * if child is None:
13191 * if python.PyTuple_GET_SIZE(children) == 1:
13193 if (PyList_CheckExact(__pyx_v_children) || PyTuple_CheckExact(__pyx_v_children)) {
13194 __pyx_t_4 = 0; __pyx_t_3 = __pyx_v_children; __Pyx_INCREF(__pyx_t_3);
13196 __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_children); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13197 __Pyx_GOTREF(__pyx_t_3);
13200 if (likely(PyList_CheckExact(__pyx_t_3))) {
13201 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
13202 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
13203 } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
13204 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
13205 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
13207 __pyx_t_2 = PyIter_Next(__pyx_t_3);
13209 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13212 __Pyx_GOTREF(__pyx_t_2);
13214 __Pyx_DECREF(__pyx_v_child);
13215 __pyx_v_child = __pyx_t_2;
13218 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1192
13219 * has_string_value = 0
13220 * for child in children:
13221 * if child is None: # <<<<<<<<<<<<<<
13222 * if python.PyTuple_GET_SIZE(children) == 1:
13223 * cetree.setAttributeValue(
13225 __pyx_t_1 = (__pyx_v_child == Py_None);
13228 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1193
13229 * for child in children:
13230 * if child is None:
13231 * if python.PyTuple_GET_SIZE(children) == 1: # <<<<<<<<<<<<<<
13232 * cetree.setAttributeValue(
13233 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
13235 __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_v_children) == 1);
13238 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1195
13239 * if python.PyTuple_GET_SIZE(children) == 1:
13240 * cetree.setAttributeValue(
13241 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") # <<<<<<<<<<<<<<
13242 * elif python._isString(child):
13243 * _add_text(element, child)
13245 __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_n_u_true)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13252 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1196
13253 * cetree.setAttributeValue(
13254 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
13255 * elif python._isString(child): # <<<<<<<<<<<<<<
13256 * _add_text(element, child)
13257 * has_string_value = 1
13259 __pyx_t_1 = _isString(__pyx_v_child);
13262 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1197
13263 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true")
13264 * elif python._isString(child):
13265 * _add_text(element, child) # <<<<<<<<<<<<<<
13266 * has_string_value = 1
13267 * elif isinstance(child, _Element):
13269 __pyx_t_2 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13270 __Pyx_GOTREF(__pyx_t_2);
13271 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13273 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1198
13274 * elif python._isString(child):
13275 * _add_text(element, child)
13276 * has_string_value = 1 # <<<<<<<<<<<<<<
13277 * elif isinstance(child, _Element):
13278 * cetree.appendChild(element, <_Element>child)
13280 __pyx_v_has_string_value = 1;
13284 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1199
13285 * _add_text(element, child)
13286 * has_string_value = 1
13287 * elif isinstance(child, _Element): # <<<<<<<<<<<<<<
13288 * cetree.appendChild(element, <_Element>child)
13291 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_child, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_11etreepublic__Element)));
13294 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1200
13295 * has_string_value = 1
13296 * elif isinstance(child, _Element):
13297 * cetree.appendChild(element, <_Element>child) # <<<<<<<<<<<<<<
13299 * elif isinstance(child, _ObjectifyElementMakerCaller):
13301 appendChild(__pyx_v_element, ((struct LxmlElement *)__pyx_v_child));
13303 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1201
13304 * elif isinstance(child, _Element):
13305 * cetree.appendChild(element, <_Element>child)
13306 * has_children = 1 # <<<<<<<<<<<<<<
13307 * elif isinstance(child, _ObjectifyElementMakerCaller):
13308 * elementMaker = <_ObjectifyElementMakerCaller>child
13310 __pyx_v_has_children = 1;
13314 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1202
13315 * cetree.appendChild(element, <_Element>child)
13317 * elif isinstance(child, _ObjectifyElementMakerCaller): # <<<<<<<<<<<<<<
13318 * elementMaker = <_ObjectifyElementMakerCaller>child
13319 * if elementMaker._element_factory is None:
13321 __pyx_t_1 = PyObject_TypeCheck(__pyx_v_child, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller)));
13324 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1203
13326 * elif isinstance(child, _ObjectifyElementMakerCaller):
13327 * elementMaker = <_ObjectifyElementMakerCaller>child # <<<<<<<<<<<<<<
13328 * if elementMaker._element_factory is None:
13329 * cetree.makeSubElement(element, elementMaker._tag,
13331 __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child)));
13332 __Pyx_DECREF(((PyObject *)__pyx_v_elementMaker));
13333 __pyx_v_elementMaker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_child);
13335 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1204
13336 * elif isinstance(child, _ObjectifyElementMakerCaller):
13337 * elementMaker = <_ObjectifyElementMakerCaller>child
13338 * if elementMaker._element_factory is None: # <<<<<<<<<<<<<<
13339 * cetree.makeSubElement(element, elementMaker._tag,
13340 * None, None, None, None)
13342 __pyx_t_1 = (__pyx_v_elementMaker->_element_factory == Py_None);
13345 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1206
13346 * if elementMaker._element_factory is None:
13347 * cetree.makeSubElement(element, elementMaker._tag,
13348 * None, None, None, None) # <<<<<<<<<<<<<<
13350 * childElement = elementMaker._element_factory(
13352 __pyx_t_2 = ((PyObject *)makeSubElement(__pyx_v_element, __pyx_v_elementMaker->_tag, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13353 __Pyx_GOTREF(__pyx_t_2);
13354 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13359 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1209
13361 * childElement = elementMaker._element_factory(
13362 * elementMaker._tag) # <<<<<<<<<<<<<<
13363 * cetree.appendChild(element, childElement)
13366 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13367 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
13368 __Pyx_INCREF(__pyx_v_elementMaker->_tag);
13369 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_elementMaker->_tag);
13370 __Pyx_GIVEREF(__pyx_v_elementMaker->_tag);
13371 __pyx_t_6 = PyObject_Call(__pyx_v_elementMaker->_element_factory, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13372 __Pyx_GOTREF(__pyx_t_6);
13373 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
13374 if (!(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13375 __Pyx_DECREF(((PyObject *)__pyx_v_childElement));
13376 __pyx_v_childElement = ((struct LxmlElement *)__pyx_t_6);
13379 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1210
13380 * childElement = elementMaker._element_factory(
13381 * elementMaker._tag)
13382 * cetree.appendChild(element, childElement) # <<<<<<<<<<<<<<
13386 appendChild(__pyx_v_element, __pyx_v_childElement);
13390 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1211
13391 * elementMaker._tag)
13392 * cetree.appendChild(element, childElement)
13393 * has_children = 1 # <<<<<<<<<<<<<<
13395 * if pytype_name is not None:
13397 __pyx_v_has_children = 1;
13402 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1213
13405 * if pytype_name is not None: # <<<<<<<<<<<<<<
13406 * # concatenation always makes the result a string
13407 * has_string_value = 1
13409 __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
13412 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1215
13413 * if pytype_name is not None:
13414 * # concatenation always makes the result a string
13415 * has_string_value = 1 # <<<<<<<<<<<<<<
13416 * pytype_name = _typename(child)
13417 * pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13419 __pyx_v_has_string_value = 1;
13424 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1216
13425 * # concatenation always makes the result a string
13426 * has_string_value = 1
13427 * pytype_name = _typename(child) # <<<<<<<<<<<<<<
13428 * pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13429 * if pytype is not NULL:
13431 __pyx_t_6 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13432 __Pyx_GOTREF(__pyx_t_6);
13433 __Pyx_DECREF(__pyx_v_pytype_name);
13434 __pyx_v_pytype_name = __pyx_t_6;
13437 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1217
13438 * has_string_value = 1
13439 * pytype_name = _typename(child)
13440 * pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name) # <<<<<<<<<<<<<<
13441 * if pytype is not NULL:
13442 * _add_text(element, (<PyType>pytype).stringify(child))
13444 __pyx_v_pytype = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_pytype_name);
13446 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1218
13447 * pytype_name = _typename(child)
13448 * pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13449 * if pytype is not NULL: # <<<<<<<<<<<<<<
13450 * _add_text(element, (<PyType>pytype).stringify(child))
13453 __pyx_t_1 = (__pyx_v_pytype != NULL);
13456 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1219
13457 * pytype = python.PyDict_GetItem(_PYTYPE_DICT, pytype_name)
13458 * if pytype is not NULL:
13459 * _add_text(element, (<PyType>pytype).stringify(child)) # <<<<<<<<<<<<<<
13461 * has_string_value = 1
13463 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13464 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
13465 __Pyx_INCREF(__pyx_v_child);
13466 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_child);
13467 __Pyx_GIVEREF(__pyx_v_child);
13468 __pyx_t_2 = PyObject_Call(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_pytype)->stringify, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13469 __Pyx_GOTREF(__pyx_t_2);
13470 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
13471 __pyx_t_6 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13472 __Pyx_GOTREF(__pyx_t_6);
13473 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13474 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13479 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1221
13480 * _add_text(element, (<PyType>pytype).stringify(child))
13482 * has_string_value = 1 # <<<<<<<<<<<<<<
13483 * child = unicode(child)
13484 * _add_text(element, child)
13486 __pyx_v_has_string_value = 1;
13488 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1222
13490 * has_string_value = 1
13491 * child = unicode(child) # <<<<<<<<<<<<<<
13492 * _add_text(element, child)
13495 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13496 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
13497 __Pyx_INCREF(__pyx_v_child);
13498 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_child);
13499 __Pyx_GIVEREF(__pyx_v_child);
13500 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13501 __Pyx_GOTREF(__pyx_t_2);
13502 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
13503 __Pyx_DECREF(__pyx_v_child);
13504 __pyx_v_child = __pyx_t_2;
13507 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1223
13508 * has_string_value = 1
13509 * child = unicode(child)
13510 * _add_text(element, child) # <<<<<<<<<<<<<<
13512 * if self._annotate and not has_children:
13514 __pyx_t_2 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13515 __Pyx_GOTREF(__pyx_t_2);
13516 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13522 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13524 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1225
13525 * _add_text(element, child)
13527 * if self._annotate and not has_children: # <<<<<<<<<<<<<<
13528 * if has_string_value:
13529 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13531 if (((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_annotate) {
13532 __pyx_t_1 = (!__pyx_v_has_children);
13534 __pyx_t_1 = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_v_self)->_annotate;
13538 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1226
13540 * if self._annotate and not has_children:
13541 * if has_string_value: # <<<<<<<<<<<<<<
13542 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13543 * elif pytype_name is not None:
13545 __pyx_t_1 = __pyx_v_has_string_value;
13548 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1227
13549 * if self._annotate and not has_children:
13550 * if has_string_value:
13551 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str") # <<<<<<<<<<<<<<
13552 * elif pytype_name is not None:
13553 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
13555 __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13556 __Pyx_GOTREF(__pyx_t_3);
13557 __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_t_3, ((PyObject *)__pyx_n_u_str)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13558 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13562 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1228
13563 * if has_string_value:
13564 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13565 * elif pytype_name is not None: # <<<<<<<<<<<<<<
13566 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
13569 __pyx_t_1 = (__pyx_v_pytype_name != Py_None);
13572 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1229
13573 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str")
13574 * elif pytype_name is not None:
13575 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name) # <<<<<<<<<<<<<<
13579 __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13580 __Pyx_GOTREF(__pyx_t_3);
13581 __pyx_t_5 = setAttributeValue(__pyx_v_element, __pyx_t_3, __pyx_v_pytype_name); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13582 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13590 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1231
13591 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name)
13593 * return element # <<<<<<<<<<<<<<
13595 * cdef _add_text(_Element elem, text):
13597 __Pyx_XDECREF(__pyx_r);
13598 __Pyx_INCREF(((PyObject *)__pyx_v_element));
13599 __pyx_r = ((PyObject *)__pyx_v_element);
13602 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13605 __Pyx_XDECREF(__pyx_t_2);
13606 __Pyx_XDECREF(__pyx_t_3);
13607 __Pyx_XDECREF(__pyx_t_6);
13608 __Pyx_AddTraceback("lxml.objectify._ObjectifyElementMakerCaller.__call__");
13611 __Pyx_DECREF(__pyx_v_children);
13612 __Pyx_DECREF(__pyx_v_attrib);
13613 __Pyx_DECREF((PyObject *)__pyx_v_elementMaker);
13614 __Pyx_DECREF((PyObject *)__pyx_v_element);
13615 __Pyx_DECREF((PyObject *)__pyx_v_childElement);
13616 __Pyx_DECREF(__pyx_v_pytype_name);
13617 __Pyx_DECREF(__pyx_v_child);
13618 __Pyx_DECREF((PyObject *)__pyx_v_self);
13619 __Pyx_XGIVEREF(__pyx_r);
13620 __Pyx_FinishRefcountContext();
13624 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1233
13627 * cdef _add_text(_Element elem, text): # <<<<<<<<<<<<<<
13628 * # add text to the tree in construction, either as element text or
13629 * # tail text, depending on the current tree state
13632 static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_elem, PyObject *__pyx_v_text) {
13633 xmlNode *__pyx_v_c_child;
13634 PyObject *__pyx_v_old;
13635 PyObject *__pyx_r = NULL;
13637 PyObject *__pyx_t_2 = NULL;
13639 __Pyx_SetupRefcountContext("_add_text");
13640 __Pyx_INCREF((PyObject *)__pyx_v_elem);
13641 __Pyx_INCREF(__pyx_v_text);
13642 __pyx_v_old = Py_None; __Pyx_INCREF(Py_None);
13644 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1237
13645 * # tail text, depending on the current tree state
13646 * cdef tree.xmlNode* c_child
13647 * c_child = cetree.findChildBackwards(elem._c_node, 0) # <<<<<<<<<<<<<<
13648 * if c_child is not NULL:
13649 * old = cetree.tailOf(c_child)
13651 __pyx_v_c_child = findChildBackwards(__pyx_v_elem->_c_node, 0);
13653 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1238
13654 * cdef tree.xmlNode* c_child
13655 * c_child = cetree.findChildBackwards(elem._c_node, 0)
13656 * if c_child is not NULL: # <<<<<<<<<<<<<<
13657 * old = cetree.tailOf(c_child)
13658 * if old is not None:
13660 __pyx_t_1 = (__pyx_v_c_child != NULL);
13663 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1239
13664 * c_child = cetree.findChildBackwards(elem._c_node, 0)
13665 * if c_child is not NULL:
13666 * old = cetree.tailOf(c_child) # <<<<<<<<<<<<<<
13667 * if old is not None:
13668 * text = old + text
13670 __pyx_t_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13671 __Pyx_GOTREF(__pyx_t_2);
13672 __Pyx_DECREF(__pyx_v_old);
13673 __pyx_v_old = __pyx_t_2;
13676 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1240
13677 * if c_child is not NULL:
13678 * old = cetree.tailOf(c_child)
13679 * if old is not None: # <<<<<<<<<<<<<<
13680 * text = old + text
13681 * cetree.setTailText(c_child, text)
13683 __pyx_t_1 = (__pyx_v_old != Py_None);
13686 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1241
13687 * old = cetree.tailOf(c_child)
13688 * if old is not None:
13689 * text = old + text # <<<<<<<<<<<<<<
13690 * cetree.setTailText(c_child, text)
13693 __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13694 __Pyx_GOTREF(__pyx_t_2);
13695 __Pyx_DECREF(__pyx_v_text);
13696 __pyx_v_text = __pyx_t_2;
13702 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1242
13703 * if old is not None:
13704 * text = old + text
13705 * cetree.setTailText(c_child, text) # <<<<<<<<<<<<<<
13707 * old = cetree.textOf(elem._c_node)
13709 __pyx_t_3 = setTailText(__pyx_v_c_child, __pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13714 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1244
13715 * cetree.setTailText(c_child, text)
13717 * old = cetree.textOf(elem._c_node) # <<<<<<<<<<<<<<
13718 * if old is not None:
13719 * text = old + text
13721 __pyx_t_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13722 __Pyx_GOTREF(__pyx_t_2);
13723 __Pyx_DECREF(__pyx_v_old);
13724 __pyx_v_old = __pyx_t_2;
13727 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1245
13729 * old = cetree.textOf(elem._c_node)
13730 * if old is not None: # <<<<<<<<<<<<<<
13731 * text = old + text
13732 * cetree.setNodeText(elem._c_node, text)
13734 __pyx_t_1 = (__pyx_v_old != Py_None);
13737 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1246
13738 * old = cetree.textOf(elem._c_node)
13739 * if old is not None:
13740 * text = old + text # <<<<<<<<<<<<<<
13741 * cetree.setNodeText(elem._c_node, text)
13744 __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13745 __Pyx_GOTREF(__pyx_t_2);
13746 __Pyx_DECREF(__pyx_v_text);
13747 __pyx_v_text = __pyx_t_2;
13753 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1247
13754 * if old is not None:
13755 * text = old + text
13756 * cetree.setNodeText(elem._c_node, text) # <<<<<<<<<<<<<<
13758 * cdef extern from "etree_defs.h":
13760 __pyx_t_3 = setNodeText(__pyx_v_elem->_c_node, __pyx_v_text); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1247; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13764 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13767 __Pyx_XDECREF(__pyx_t_2);
13768 __Pyx_AddTraceback("lxml.objectify._add_text");
13771 __Pyx_DECREF(__pyx_v_old);
13772 __Pyx_DECREF((PyObject *)__pyx_v_elem);
13773 __Pyx_DECREF(__pyx_v_text);
13774 __Pyx_XGIVEREF(__pyx_r);
13775 __Pyx_FinishRefcountContext();
13779 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1273
13780 * cdef object _nsmap
13781 * cdef bint _annotate
13782 * def __init__(self, *, namespace=None, nsmap=None, annotate=True, # <<<<<<<<<<<<<<
13783 * makeelement=None):
13784 * if nsmap is None:
13787 static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13788 static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13789 PyObject *__pyx_v_namespace = 0;
13790 PyObject *__pyx_v_nsmap = 0;
13791 PyObject *__pyx_v_annotate = 0;
13792 PyObject *__pyx_v_makeelement = 0;
13795 PyObject *__pyx_t_2 = NULL;
13796 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_namespace,&__pyx_n_ui_nsmap,&__pyx_n_ui_annotate,&__pyx_n_ui_makeelement,0};
13797 __Pyx_SetupRefcountContext("__init__");
13798 if (unlikely(__pyx_kwds)) {
13800 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1274
13801 * cdef bint _annotate
13802 * def __init__(self, *, namespace=None, nsmap=None, annotate=True,
13803 * makeelement=None): # <<<<<<<<<<<<<<
13804 * if nsmap is None:
13807 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
13808 PyObject* values[4] = {0,0,0,0};
13809 values[0] = ((PyObject *)Py_None);
13810 values[1] = ((PyObject *)Py_None);
13811 values[2] = __pyx_k_22;
13812 values[3] = ((PyObject *)Py_None);
13813 switch (PyTuple_GET_SIZE(__pyx_args)) {
13815 default: goto __pyx_L5_argtuple_error;
13817 while (kw_args > 0) {
13819 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_namespace);
13820 if (value) { values[0] = value; if (!(--kw_args)) break; }
13821 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_nsmap);
13822 if (value) { values[1] = value; if (!(--kw_args)) break; }
13823 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_annotate);
13824 if (value) { values[2] = value; if (!(--kw_args)) break; }
13825 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_makeelement);
13826 if (value) { values[3] = value; if (!(--kw_args)) break; }
13829 if (unlikely(kw_args > 0)) {
13830 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13832 __pyx_v_namespace = values[0];
13833 __pyx_v_nsmap = values[1];
13834 __pyx_v_annotate = values[2];
13835 __pyx_v_makeelement = values[3];
13836 } else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
13837 goto __pyx_L5_argtuple_error;
13840 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1273
13841 * cdef object _nsmap
13842 * cdef bint _annotate
13843 * def __init__(self, *, namespace=None, nsmap=None, annotate=True, # <<<<<<<<<<<<<<
13844 * makeelement=None):
13845 * if nsmap is None:
13847 __pyx_v_namespace = ((PyObject *)Py_None);
13848 __pyx_v_nsmap = ((PyObject *)Py_None);
13849 __pyx_v_annotate = __pyx_k_22;
13851 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1274
13852 * cdef bint _annotate
13853 * def __init__(self, *, namespace=None, nsmap=None, annotate=True,
13854 * makeelement=None): # <<<<<<<<<<<<<<
13855 * if nsmap is None:
13858 __pyx_v_makeelement = ((PyObject *)Py_None);
13860 goto __pyx_L4_argument_unpacking_done;
13861 __pyx_L5_argtuple_error:;
13862 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
13864 __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__");
13866 __pyx_L4_argument_unpacking_done:;
13867 __Pyx_INCREF((PyObject *)__pyx_v_self);
13868 __Pyx_INCREF(__pyx_v_namespace);
13869 __Pyx_INCREF(__pyx_v_nsmap);
13870 __Pyx_INCREF(__pyx_v_annotate);
13871 __Pyx_INCREF(__pyx_v_makeelement);
13873 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1275
13874 * def __init__(self, *, namespace=None, nsmap=None, annotate=True,
13875 * makeelement=None):
13876 * if nsmap is None: # <<<<<<<<<<<<<<
13878 * nsmap = _DEFAULT_NSMAP
13880 __pyx_t_1 = (__pyx_v_nsmap == Py_None);
13883 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1276
13884 * makeelement=None):
13885 * if nsmap is None:
13886 * if annotate: # <<<<<<<<<<<<<<
13887 * nsmap = _DEFAULT_NSMAP
13890 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13893 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1277
13894 * if nsmap is None:
13896 * nsmap = _DEFAULT_NSMAP # <<<<<<<<<<<<<<
13900 __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
13901 __Pyx_DECREF(__pyx_v_nsmap);
13902 __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
13907 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1279
13908 * nsmap = _DEFAULT_NSMAP
13910 * nsmap = {} # <<<<<<<<<<<<<<
13911 * self._nsmap = nsmap
13912 * if namespace is None:
13914 __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13915 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
13916 __Pyx_DECREF(__pyx_v_nsmap);
13917 __pyx_v_nsmap = ((PyObject *)__pyx_t_2);
13925 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1280
13928 * self._nsmap = nsmap # <<<<<<<<<<<<<<
13929 * if namespace is None:
13930 * self._namespace = None
13932 __Pyx_INCREF(__pyx_v_nsmap);
13933 __Pyx_GIVEREF(__pyx_v_nsmap);
13934 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
13935 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
13936 ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap = __pyx_v_nsmap;
13938 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1281
13940 * self._nsmap = nsmap
13941 * if namespace is None: # <<<<<<<<<<<<<<
13942 * self._namespace = None
13945 __pyx_t_1 = (__pyx_v_namespace == Py_None);
13948 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1282
13949 * self._nsmap = nsmap
13950 * if namespace is None:
13951 * self._namespace = None # <<<<<<<<<<<<<<
13953 * self._namespace = u"{%s}" % namespace
13955 __Pyx_INCREF(Py_None);
13956 __Pyx_GIVEREF(Py_None);
13957 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13958 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13959 ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = Py_None;
13964 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1284
13965 * self._namespace = None
13967 * self._namespace = u"{%s}" % namespace # <<<<<<<<<<<<<<
13968 * self._annotate = annotate
13969 * if makeelement is not None:
13971 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_v_namespace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1284; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13972 __Pyx_GOTREF(__pyx_t_2);
13973 __Pyx_GIVEREF(__pyx_t_2);
13974 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13975 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace);
13976 ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace = __pyx_t_2;
13981 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1285
13983 * self._namespace = u"{%s}" % namespace
13984 * self._annotate = annotate # <<<<<<<<<<<<<<
13985 * if makeelement is not None:
13986 * assert callable(makeelement)
13988 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely((__pyx_t_1 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1285; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
13989 ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate = __pyx_t_1;
13991 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1286
13992 * self._namespace = u"{%s}" % namespace
13993 * self._annotate = annotate
13994 * if makeelement is not None: # <<<<<<<<<<<<<<
13995 * assert callable(makeelement)
13996 * self._makeelement = makeelement
13998 __pyx_t_1 = (__pyx_v_makeelement != Py_None);
14001 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1287
14002 * self._annotate = annotate
14003 * if makeelement is not None:
14004 * assert callable(makeelement) # <<<<<<<<<<<<<<
14005 * self._makeelement = makeelement
14008 #ifndef PYREX_WITHOUT_ASSERTIONS
14009 if (unlikely(!PyCallable_Check(__pyx_v_makeelement))) {
14010 PyErr_SetNone(PyExc_AssertionError);
14011 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14015 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1288
14016 * if makeelement is not None:
14017 * assert callable(makeelement)
14018 * self._makeelement = makeelement # <<<<<<<<<<<<<<
14020 * self._makeelement = None
14022 __Pyx_INCREF(__pyx_v_makeelement);
14023 __Pyx_GIVEREF(__pyx_v_makeelement);
14024 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14025 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14026 ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = __pyx_v_makeelement;
14031 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1290
14032 * self._makeelement = makeelement
14034 * self._makeelement = None # <<<<<<<<<<<<<<
14036 * def __getattr__(self, tag):
14038 __Pyx_INCREF(Py_None);
14039 __Pyx_GIVEREF(Py_None);
14040 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14041 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14042 ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement = Py_None;
14049 __Pyx_XDECREF(__pyx_t_2);
14050 __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__");
14053 __Pyx_DECREF((PyObject *)__pyx_v_self);
14054 __Pyx_DECREF(__pyx_v_namespace);
14055 __Pyx_DECREF(__pyx_v_nsmap);
14056 __Pyx_DECREF(__pyx_v_annotate);
14057 __Pyx_DECREF(__pyx_v_makeelement);
14058 __Pyx_FinishRefcountContext();
14062 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1292
14063 * self._makeelement = None
14065 * def __getattr__(self, tag): # <<<<<<<<<<<<<<
14066 * cdef _ObjectifyElementMakerCaller element_maker
14067 * if is_special_method(tag):
14070 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag); /*proto*/
14071 static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_tag) {
14072 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *__pyx_v_element_maker;
14073 PyObject *__pyx_r = NULL;
14074 PyObject *__pyx_t_1 = NULL;
14075 PyObject *__pyx_t_2 = NULL;
14077 PyObject *__pyx_t_4 = NULL;
14080 __Pyx_SetupRefcountContext("__getattr__");
14081 __Pyx_INCREF((PyObject *)__pyx_v_self);
14082 __Pyx_INCREF(__pyx_v_tag);
14083 __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)Py_None); __Pyx_INCREF(Py_None);
14085 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1294
14086 * def __getattr__(self, tag):
14087 * cdef _ObjectifyElementMakerCaller element_maker
14088 * if is_special_method(tag): # <<<<<<<<<<<<<<
14089 * return object.__getattr__(self, tag)
14090 * if self._namespace is not None and tag[0] != u"{":
14092 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14093 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
14094 __Pyx_INCREF(__pyx_v_tag);
14095 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
14096 __Pyx_GIVEREF(__pyx_v_tag);
14097 __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_9objectify_is_special_method, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14098 __Pyx_GOTREF(__pyx_t_2);
14099 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
14100 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14101 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14104 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1295
14105 * cdef _ObjectifyElementMakerCaller element_maker
14106 * if is_special_method(tag):
14107 * return object.__getattr__(self, tag) # <<<<<<<<<<<<<<
14108 * if self._namespace is not None and tag[0] != u"{":
14109 * tag = self._namespace + tag
14111 __Pyx_XDECREF(__pyx_r);
14112 __pyx_t_2 = PyObject_GetAttr(__pyx_builtin_object, __pyx_n_ui___getattr__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14113 __Pyx_GOTREF(__pyx_t_2);
14114 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14115 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
14116 __Pyx_INCREF(__pyx_v_self);
14117 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
14118 __Pyx_GIVEREF(__pyx_v_self);
14119 __Pyx_INCREF(__pyx_v_tag);
14120 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_tag);
14121 __Pyx_GIVEREF(__pyx_v_tag);
14122 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14123 __Pyx_GOTREF(__pyx_t_4);
14124 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14125 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
14126 __pyx_r = __pyx_t_4;
14133 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1296
14134 * if is_special_method(tag):
14135 * return object.__getattr__(self, tag)
14136 * if self._namespace is not None and tag[0] != u"{": # <<<<<<<<<<<<<<
14137 * tag = self._namespace + tag
14138 * element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14140 __pyx_t_3 = (((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace != Py_None);
14142 __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_tag, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14143 __Pyx_GOTREF(__pyx_t_4);
14144 __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)__pyx_kp_u_24), Py_NE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14145 __Pyx_GOTREF(__pyx_t_1);
14146 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
14147 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14148 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14149 __pyx_t_6 = __pyx_t_5;
14151 __pyx_t_6 = __pyx_t_3;
14155 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1297
14156 * return object.__getattr__(self, tag)
14157 * if self._namespace is not None and tag[0] != u"{":
14158 * tag = self._namespace + tag # <<<<<<<<<<<<<<
14159 * element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14160 * element_maker._tag = tag
14162 __pyx_t_1 = PyNumber_Add(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1297; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14163 __Pyx_GOTREF(__pyx_t_1);
14164 __Pyx_DECREF(__pyx_v_tag);
14165 __pyx_v_tag = __pyx_t_1;
14171 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1298
14172 * if self._namespace is not None and tag[0] != u"{":
14173 * tag = self._namespace + tag
14174 * element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller) # <<<<<<<<<<<<<<
14175 * element_maker._tag = tag
14176 * element_maker._nsmap = self._nsmap
14178 __pyx_t_1 = ((PyObject *)PY_NEW(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller)))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14179 __Pyx_GOTREF(__pyx_t_1);
14180 __Pyx_DECREF(((PyObject *)__pyx_v_element_maker));
14181 __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_1);
14184 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1299
14185 * tag = self._namespace + tag
14186 * element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14187 * element_maker._tag = tag # <<<<<<<<<<<<<<
14188 * element_maker._nsmap = self._nsmap
14189 * element_maker._annotate = self._annotate
14191 __Pyx_INCREF(__pyx_v_tag);
14192 __Pyx_GIVEREF(__pyx_v_tag);
14193 __Pyx_GOTREF(__pyx_v_element_maker->_tag);
14194 __Pyx_DECREF(__pyx_v_element_maker->_tag);
14195 __pyx_v_element_maker->_tag = __pyx_v_tag;
14197 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1300
14198 * element_maker = NEW_ELEMENT_MAKER(_ObjectifyElementMakerCaller)
14199 * element_maker._tag = tag
14200 * element_maker._nsmap = self._nsmap # <<<<<<<<<<<<<<
14201 * element_maker._annotate = self._annotate
14202 * element_maker._element_factory = self._makeelement
14204 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
14205 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap);
14206 __Pyx_GOTREF(__pyx_v_element_maker->_nsmap);
14207 __Pyx_DECREF(__pyx_v_element_maker->_nsmap);
14208 __pyx_v_element_maker->_nsmap = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_nsmap;
14210 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1301
14211 * element_maker._tag = tag
14212 * element_maker._nsmap = self._nsmap
14213 * element_maker._annotate = self._annotate # <<<<<<<<<<<<<<
14214 * element_maker._element_factory = self._makeelement
14215 * return element_maker
14217 __pyx_v_element_maker->_annotate = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_annotate;
14219 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1302
14220 * element_maker._nsmap = self._nsmap
14221 * element_maker._annotate = self._annotate
14222 * element_maker._element_factory = self._makeelement # <<<<<<<<<<<<<<
14223 * return element_maker
14226 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14227 __Pyx_GIVEREF(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement);
14228 __Pyx_GOTREF(__pyx_v_element_maker->_element_factory);
14229 __Pyx_DECREF(__pyx_v_element_maker->_element_factory);
14230 __pyx_v_element_maker->_element_factory = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self)->_makeelement;
14232 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1303
14233 * element_maker._annotate = self._annotate
14234 * element_maker._element_factory = self._makeelement
14235 * return element_maker # <<<<<<<<<<<<<<
14237 * ################################################################################
14239 __Pyx_XDECREF(__pyx_r);
14240 __Pyx_INCREF(((PyObject *)__pyx_v_element_maker));
14241 __pyx_r = ((PyObject *)__pyx_v_element_maker);
14244 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14247 __Pyx_XDECREF(__pyx_t_1);
14248 __Pyx_XDECREF(__pyx_t_2);
14249 __Pyx_XDECREF(__pyx_t_4);
14250 __Pyx_AddTraceback("lxml.objectify.ElementMaker.__getattr__");
14253 __Pyx_DECREF((PyObject *)__pyx_v_element_maker);
14254 __Pyx_DECREF((PyObject *)__pyx_v_self);
14255 __Pyx_DECREF(__pyx_v_tag);
14256 __Pyx_XGIVEREF(__pyx_r);
14257 __Pyx_FinishRefcountContext();
14261 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1311
14262 * __RECURSIVE_STR = 0 # default: off
14264 * def enable_recursive_str(on=True): # <<<<<<<<<<<<<<
14265 * u"""enable_recursive_str(on=True)
14269 static PyObject *__pyx_pf_4lxml_9objectify_enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14270 static char __pyx_doc_4lxml_9objectify_enable_recursive_str[] = "enable_recursive_str(on=True)\n\n Enable a recursively generated tree representation for str(element),\n based on objectify.dump(element).\n ";
14271 static PyObject *__pyx_pf_4lxml_9objectify_enable_recursive_str(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14272 PyObject *__pyx_v_on = 0;
14273 PyObject *__pyx_r = NULL;
14275 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_on,0};
14276 __Pyx_SetupRefcountContext("enable_recursive_str");
14277 __pyx_self = __pyx_self;
14278 if (unlikely(__pyx_kwds)) {
14279 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
14280 PyObject* values[1] = {0};
14281 values[0] = __pyx_k_25;
14282 switch (PyTuple_GET_SIZE(__pyx_args)) {
14283 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14285 default: goto __pyx_L5_argtuple_error;
14287 switch (PyTuple_GET_SIZE(__pyx_args)) {
14290 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_on);
14291 if (unlikely(value)) { values[0] = value; kw_args--; }
14294 if (unlikely(kw_args > 0)) {
14295 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "enable_recursive_str") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14297 __pyx_v_on = values[0];
14299 __pyx_v_on = __pyx_k_25;
14300 switch (PyTuple_GET_SIZE(__pyx_args)) {
14301 case 1: __pyx_v_on = PyTuple_GET_ITEM(__pyx_args, 0);
14303 default: goto __pyx_L5_argtuple_error;
14306 goto __pyx_L4_argument_unpacking_done;
14307 __pyx_L5_argtuple_error:;
14308 __Pyx_RaiseArgtupleInvalid("enable_recursive_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
14310 __Pyx_AddTraceback("lxml.objectify.enable_recursive_str");
14312 __pyx_L4_argument_unpacking_done:;
14314 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1318
14316 * global __RECURSIVE_STR
14317 * __RECURSIVE_STR = on # <<<<<<<<<<<<<<
14319 * def dump(_Element element not None):
14321 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_on); if (unlikely((__pyx_t_1 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14322 __pyx_v_4lxml_9objectify___RECURSIVE_STR = __pyx_t_1;
14324 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14327 __Pyx_AddTraceback("lxml.objectify.enable_recursive_str");
14330 __Pyx_XGIVEREF(__pyx_r);
14331 __Pyx_FinishRefcountContext();
14335 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1320
14336 * __RECURSIVE_STR = on
14338 * def dump(_Element element not None): # <<<<<<<<<<<<<<
14339 * u"""dump(_Element element not None)
14343 static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element); /*proto*/
14344 static char __pyx_doc_4lxml_9objectify_dump[] = "dump(_Element element not None)\n\n Return a recursively generated string representation of an element.\n ";
14345 static PyObject *__pyx_pf_4lxml_9objectify_dump(PyObject *__pyx_self, PyObject *__pyx_v_element) {
14346 PyObject *__pyx_r = NULL;
14347 PyObject *__pyx_t_1 = NULL;
14348 __Pyx_SetupRefcountContext("dump");
14349 __pyx_self = __pyx_self;
14350 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_11etreepublic__Element, 0, "element", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14352 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1325
14353 * Return a recursively generated string representation of an element.
14355 * return _dump(element, 0) # <<<<<<<<<<<<<<
14357 * cdef object _dump(_Element element, int indent):
14359 __Pyx_XDECREF(__pyx_r);
14360 __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_element), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14361 __Pyx_GOTREF(__pyx_t_1);
14362 __pyx_r = __pyx_t_1;
14366 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14369 __Pyx_XDECREF(__pyx_t_1);
14370 __Pyx_AddTraceback("lxml.objectify.dump");
14373 __Pyx_XGIVEREF(__pyx_r);
14374 __Pyx_FinishRefcountContext();
14378 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1327
14379 * return _dump(element, 0)
14381 * cdef object _dump(_Element element, int indent): # <<<<<<<<<<<<<<
14382 * indentstr = u" " * indent
14383 * if isinstance(element, ObjectifiedDataElement):
14386 static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_element, int __pyx_v_indent) {
14387 PyObject *__pyx_v_indentstr;
14388 PyObject *__pyx_v_value;
14389 PyObject *__pyx_v_result;
14390 PyObject *__pyx_v_xsi_ns;
14391 PyObject *__pyx_v_pytype_ns;
14392 PyObject *__pyx_v_name;
14393 PyObject *__pyx_v_child;
14394 PyObject *__pyx_r = NULL;
14395 PyObject *__pyx_t_1 = NULL;
14396 PyObject *__pyx_t_2 = NULL;
14399 PyObject *__pyx_t_5 = NULL;
14400 Py_ssize_t __pyx_t_6;
14401 PyObject *__pyx_t_7 = NULL;
14402 PyObject *__pyx_t_8 = NULL;
14403 __Pyx_SetupRefcountContext("_dump");
14404 __Pyx_INCREF((PyObject *)__pyx_v_element);
14405 __pyx_v_indentstr = Py_None; __Pyx_INCREF(Py_None);
14406 __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
14407 __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
14408 __pyx_v_xsi_ns = Py_None; __Pyx_INCREF(Py_None);
14409 __pyx_v_pytype_ns = Py_None; __Pyx_INCREF(Py_None);
14410 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
14411 __pyx_v_child = Py_None; __Pyx_INCREF(Py_None);
14413 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1328
14415 * cdef object _dump(_Element element, int indent):
14416 * indentstr = u" " * indent # <<<<<<<<<<<<<<
14417 * if isinstance(element, ObjectifiedDataElement):
14418 * value = repr(element)
14420 __pyx_t_1 = PyInt_FromLong(__pyx_v_indent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14421 __Pyx_GOTREF(__pyx_t_1);
14422 __pyx_t_2 = PyNumber_Multiply(((PyObject *)__pyx_kp_u_26), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14423 __Pyx_GOTREF(__pyx_t_2);
14424 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14425 __Pyx_DECREF(__pyx_v_indentstr);
14426 __pyx_v_indentstr = __pyx_t_2;
14429 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1329
14430 * cdef object _dump(_Element element, int indent):
14431 * indentstr = u" " * indent
14432 * if isinstance(element, ObjectifiedDataElement): # <<<<<<<<<<<<<<
14433 * value = repr(element)
14436 __pyx_t_3 = PyObject_TypeCheck(((PyObject *)__pyx_v_element), ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)));
14439 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1330
14440 * indentstr = u" " * indent
14441 * if isinstance(element, ObjectifiedDataElement):
14442 * value = repr(element) # <<<<<<<<<<<<<<
14444 * value = textOf(element._c_node)
14446 __pyx_t_2 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14447 __Pyx_GOTREF(__pyx_t_2);
14448 __Pyx_DECREF(__pyx_v_value);
14449 __pyx_v_value = __pyx_t_2;
14455 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1332
14456 * value = repr(element)
14458 * value = textOf(element._c_node) # <<<<<<<<<<<<<<
14459 * if value is not None:
14460 * if not value.strip():
14462 __pyx_t_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14463 __Pyx_GOTREF(__pyx_t_2);
14464 __Pyx_DECREF(__pyx_v_value);
14465 __pyx_v_value = __pyx_t_2;
14468 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1333
14470 * value = textOf(element._c_node)
14471 * if value is not None: # <<<<<<<<<<<<<<
14472 * if not value.strip():
14475 __pyx_t_3 = (__pyx_v_value != Py_None);
14478 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1334
14479 * value = textOf(element._c_node)
14480 * if value is not None:
14481 * if not value.strip(): # <<<<<<<<<<<<<<
14485 __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_ui_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14486 __Pyx_GOTREF(__pyx_t_2);
14487 __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14488 __Pyx_GOTREF(__pyx_t_1);
14489 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14490 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14491 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14492 __pyx_t_4 = (!__pyx_t_3);
14495 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1335
14496 * if value is not None:
14497 * if not value.strip():
14498 * value = None # <<<<<<<<<<<<<<
14500 * value = repr(value)
14502 __Pyx_INCREF(Py_None);
14503 __Pyx_DECREF(__pyx_v_value);
14504 __pyx_v_value = Py_None;
14509 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1337
14512 * value = repr(value) # <<<<<<<<<<<<<<
14513 * result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
14514 * value, _typename(element))
14516 __pyx_t_1 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14517 __Pyx_GOTREF(__pyx_t_1);
14518 __Pyx_DECREF(__pyx_v_value);
14519 __pyx_v_value = __pyx_t_1;
14529 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1338
14531 * value = repr(value)
14532 * result = u"%s%s = %s [%s]\n" % (indentstr, element.tag, # <<<<<<<<<<<<<<
14533 * value, _typename(element))
14534 * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14536 __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_tag); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14537 __Pyx_GOTREF(__pyx_t_1);
14539 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1339
14540 * value = repr(value)
14541 * result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
14542 * value, _typename(element)) # <<<<<<<<<<<<<<
14543 * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14544 * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14546 __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14547 __Pyx_GOTREF(__pyx_t_2);
14548 __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14549 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
14550 __Pyx_INCREF(__pyx_v_indentstr);
14551 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_indentstr);
14552 __Pyx_GIVEREF(__pyx_v_indentstr);
14553 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
14554 __Pyx_GIVEREF(__pyx_t_1);
14555 __Pyx_INCREF(__pyx_v_value);
14556 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_value);
14557 __Pyx_GIVEREF(__pyx_v_value);
14558 PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_2);
14559 __Pyx_GIVEREF(__pyx_t_2);
14562 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_27), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14563 __Pyx_GOTREF(__pyx_t_2);
14564 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
14565 __Pyx_DECREF(__pyx_v_result);
14566 __pyx_v_result = __pyx_t_2;
14569 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1340
14570 * result = u"%s%s = %s [%s]\n" % (indentstr, element.tag,
14571 * value, _typename(element))
14572 * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS # <<<<<<<<<<<<<<
14573 * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14574 * for name, value in cetree.iterattributes(element, 3):
14576 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1340; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14577 __Pyx_GOTREF(__pyx_t_2);
14578 __Pyx_DECREF(__pyx_v_xsi_ns);
14579 __pyx_v_xsi_ns = __pyx_t_2;
14582 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1341
14583 * value, _typename(element))
14584 * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14585 * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE # <<<<<<<<<<<<<<
14586 * for name, value in cetree.iterattributes(element, 3):
14589 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_23), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14590 __Pyx_GOTREF(__pyx_t_2);
14591 __Pyx_DECREF(__pyx_v_pytype_ns);
14592 __pyx_v_pytype_ns = __pyx_t_2;
14595 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1342
14596 * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS
14597 * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14598 * for name, value in cetree.iterattributes(element, 3): # <<<<<<<<<<<<<<
14600 * if name == PYTYPE_ATTRIBUTE:
14602 __pyx_t_2 = iterattributes(__pyx_v_element, 3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14603 __Pyx_GOTREF(__pyx_t_2);
14604 if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
14605 __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5);
14607 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14608 __Pyx_GOTREF(__pyx_t_5);
14610 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14612 if (likely(PyList_CheckExact(__pyx_t_5))) {
14613 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
14614 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
14615 } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
14616 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
14617 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++;
14619 __pyx_t_2 = PyIter_Next(__pyx_t_5);
14621 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14624 __Pyx_GOTREF(__pyx_t_2);
14626 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
14627 PyObject* tuple = __pyx_t_2;
14628 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
14629 __pyx_t_7 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_7);
14630 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14631 __Pyx_DECREF(__pyx_v_name);
14632 __pyx_v_name = __pyx_t_1;
14634 __Pyx_DECREF(__pyx_v_value);
14635 __pyx_v_value = __pyx_t_7;
14638 __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14639 __Pyx_GOTREF(__pyx_t_8);
14640 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14641 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14642 __Pyx_GOTREF(__pyx_t_1);
14643 __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14644 __Pyx_GOTREF(__pyx_t_7);
14645 if (__Pyx_EndUnpack(__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14646 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14647 __Pyx_DECREF(__pyx_v_name);
14648 __pyx_v_name = __pyx_t_1;
14650 __Pyx_DECREF(__pyx_v_value);
14651 __pyx_v_value = __pyx_t_7;
14655 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1343
14656 * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE
14657 * for name, value in cetree.iterattributes(element, 3):
14658 * if u'{' in name: # <<<<<<<<<<<<<<
14659 * if name == PYTYPE_ATTRIBUTE:
14660 * if value == TREE_PYTYPE_NAME:
14662 __pyx_t_4 = (PySequence_Contains(__pyx_v_name, ((PyObject *)__pyx_kp_u_24))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14665 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1344
14666 * for name, value in cetree.iterattributes(element, 3):
14668 * if name == PYTYPE_ATTRIBUTE: # <<<<<<<<<<<<<<
14669 * if value == TREE_PYTYPE_NAME:
14672 __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14673 __Pyx_GOTREF(__pyx_t_2);
14674 __pyx_t_7 = PyObject_RichCompare(__pyx_v_name, __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14675 __Pyx_GOTREF(__pyx_t_7);
14676 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14677 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14678 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14681 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1345
14683 * if name == PYTYPE_ATTRIBUTE:
14684 * if value == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<<
14688 __pyx_t_7 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14689 __Pyx_GOTREF(__pyx_t_7);
14690 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14691 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14694 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1346
14695 * if name == PYTYPE_ATTRIBUTE:
14696 * if value == TREE_PYTYPE_NAME:
14697 * continue # <<<<<<<<<<<<<<
14699 * name = name.replace(pytype_ns, u'py:')
14701 goto __pyx_L6_continue;
14706 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1348
14709 * name = name.replace(pytype_ns, u'py:') # <<<<<<<<<<<<<<
14710 * name = name.replace(xsi_ns, u'xsi:')
14711 * result = result + u"%s * %s = %r\n" % (indentstr, name, value)
14713 __pyx_t_7 = PyObject_GetAttr(__pyx_v_name, __pyx_n_ui_replace); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14714 __Pyx_GOTREF(__pyx_t_7);
14715 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14716 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
14717 __Pyx_INCREF(__pyx_v_pytype_ns);
14718 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_pytype_ns);
14719 __Pyx_GIVEREF(__pyx_v_pytype_ns);
14720 __Pyx_INCREF(((PyObject *)__pyx_kp_u_28));
14721 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_u_28));
14722 __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_28));
14723 __pyx_t_1 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14724 __Pyx_GOTREF(__pyx_t_1);
14725 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14726 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
14727 __Pyx_DECREF(__pyx_v_name);
14728 __pyx_v_name = __pyx_t_1;
14736 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1349
14738 * name = name.replace(pytype_ns, u'py:')
14739 * name = name.replace(xsi_ns, u'xsi:') # <<<<<<<<<<<<<<
14740 * result = result + u"%s * %s = %r\n" % (indentstr, name, value)
14743 __pyx_t_1 = PyObject_GetAttr(__pyx_v_name, __pyx_n_ui_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14744 __Pyx_GOTREF(__pyx_t_1);
14745 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14746 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
14747 __Pyx_INCREF(__pyx_v_xsi_ns);
14748 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xsi_ns);
14749 __Pyx_GIVEREF(__pyx_v_xsi_ns);
14750 __Pyx_INCREF(((PyObject *)__pyx_kp_u_29));
14751 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_kp_u_29));
14752 __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_29));
14753 __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14754 __Pyx_GOTREF(__pyx_t_7);
14755 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14756 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
14757 __Pyx_DECREF(__pyx_v_name);
14758 __pyx_v_name = __pyx_t_7;
14764 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1350
14765 * name = name.replace(pytype_ns, u'py:')
14766 * name = name.replace(xsi_ns, u'xsi:')
14767 * result = result + u"%s * %s = %r\n" % (indentstr, name, value) # <<<<<<<<<<<<<<
14769 * indent = indent + 1
14771 __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14772 __Pyx_GOTREF(((PyObject *)__pyx_t_7));
14773 __Pyx_INCREF(__pyx_v_indentstr);
14774 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_indentstr);
14775 __Pyx_GIVEREF(__pyx_v_indentstr);
14776 __Pyx_INCREF(__pyx_v_name);
14777 PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_name);
14778 __Pyx_GIVEREF(__pyx_v_name);
14779 __Pyx_INCREF(__pyx_v_value);
14780 PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_value);
14781 __Pyx_GIVEREF(__pyx_v_value);
14782 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_30), ((PyObject *)__pyx_t_7)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14783 __Pyx_GOTREF(__pyx_t_2);
14784 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
14785 __pyx_t_7 = PyNumber_Add(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14786 __Pyx_GOTREF(__pyx_t_7);
14787 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14788 __Pyx_DECREF(__pyx_v_result);
14789 __pyx_v_result = __pyx_t_7;
14791 __pyx_L6_continue:;
14793 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14795 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1352
14796 * result = result + u"%s * %s = %r\n" % (indentstr, name, value)
14798 * indent = indent + 1 # <<<<<<<<<<<<<<
14799 * for child in element.iterchildren():
14800 * result = result + _dump(child, indent)
14802 __pyx_v_indent = (__pyx_v_indent + 1);
14804 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1353
14806 * indent = indent + 1
14807 * for child in element.iterchildren(): # <<<<<<<<<<<<<<
14808 * result = result + _dump(child, indent)
14811 __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_element), __pyx_n_ui_iterchildren); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14812 __Pyx_GOTREF(__pyx_t_5);
14813 __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14814 __Pyx_GOTREF(__pyx_t_7);
14815 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14816 if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
14817 __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5);
14819 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14820 __Pyx_GOTREF(__pyx_t_5);
14822 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14824 if (likely(PyList_CheckExact(__pyx_t_5))) {
14825 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
14826 __pyx_t_7 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
14827 } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
14828 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
14829 __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++;
14831 __pyx_t_7 = PyIter_Next(__pyx_t_5);
14833 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14836 __Pyx_GOTREF(__pyx_t_7);
14838 __Pyx_DECREF(__pyx_v_child);
14839 __pyx_v_child = __pyx_t_7;
14842 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1354
14843 * indent = indent + 1
14844 * for child in element.iterchildren():
14845 * result = result + _dump(child, indent) # <<<<<<<<<<<<<<
14847 * return result[:-1] # strip last '\n'
14849 if (!(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14850 __pyx_t_7 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_child), __pyx_v_indent); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14851 __Pyx_GOTREF(__pyx_t_7);
14852 __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14853 __Pyx_GOTREF(__pyx_t_2);
14854 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14855 __Pyx_DECREF(__pyx_v_result);
14856 __pyx_v_result = __pyx_t_2;
14859 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14861 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1355
14862 * for child in element.iterchildren():
14863 * result = result + _dump(child, indent)
14864 * if indent == 1: # <<<<<<<<<<<<<<
14865 * return result[:-1] # strip last '\n'
14868 __pyx_t_4 = (__pyx_v_indent == 1);
14871 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1356
14872 * result = result + _dump(child, indent)
14874 * return result[:-1] # strip last '\n' # <<<<<<<<<<<<<<
14878 __Pyx_XDECREF(__pyx_r);
14879 __pyx_t_5 = PySequence_GetSlice(__pyx_v_result, 0, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14880 __Pyx_GOTREF(__pyx_t_5);
14881 __pyx_r = __pyx_t_5;
14888 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1358
14889 * return result[:-1] # strip last '\n'
14891 * return result # <<<<<<<<<<<<<<
14895 __Pyx_XDECREF(__pyx_r);
14896 __Pyx_INCREF(__pyx_v_result);
14897 __pyx_r = __pyx_v_result;
14902 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14905 __Pyx_XDECREF(__pyx_t_1);
14906 __Pyx_XDECREF(__pyx_t_2);
14907 __Pyx_XDECREF(__pyx_t_5);
14908 __Pyx_XDECREF(__pyx_t_7);
14909 __Pyx_XDECREF(__pyx_t_8);
14910 __Pyx_AddTraceback("lxml.objectify._dump");
14913 __Pyx_DECREF(__pyx_v_indentstr);
14914 __Pyx_DECREF(__pyx_v_value);
14915 __Pyx_DECREF(__pyx_v_result);
14916 __Pyx_DECREF(__pyx_v_xsi_ns);
14917 __Pyx_DECREF(__pyx_v_pytype_ns);
14918 __Pyx_DECREF(__pyx_v_name);
14919 __Pyx_DECREF(__pyx_v_child);
14920 __Pyx_DECREF((PyObject *)__pyx_v_element);
14921 __Pyx_XGIVEREF(__pyx_r);
14922 __Pyx_FinishRefcountContext();
14926 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1364
14929 * def __unpickleElementTree(data): # <<<<<<<<<<<<<<
14930 * return etree.ElementTree(fromstring(data))
14934 static PyObject *__pyx_pf_4lxml_9objectify___unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
14935 static PyObject *__pyx_pf_4lxml_9objectify___unpickleElementTree(PyObject *__pyx_self, PyObject *__pyx_v_data) {
14936 PyObject *__pyx_r = NULL;
14937 PyObject *__pyx_t_1 = NULL;
14938 PyObject *__pyx_t_2 = NULL;
14939 PyObject *__pyx_t_3 = NULL;
14940 PyObject *__pyx_t_4 = NULL;
14941 __Pyx_SetupRefcountContext("__unpickleElementTree");
14942 __pyx_self = __pyx_self;
14944 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1365
14946 * def __unpickleElementTree(data):
14947 * return etree.ElementTree(fromstring(data)) # <<<<<<<<<<<<<<
14949 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
14951 __Pyx_XDECREF(__pyx_r);
14952 __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_ElementTree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14953 __Pyx_GOTREF(__pyx_t_1);
14954 __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14955 __Pyx_GOTREF(__pyx_t_2);
14956 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14957 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
14958 __Pyx_INCREF(__pyx_v_data);
14959 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
14960 __Pyx_GIVEREF(__pyx_v_data);
14961 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14962 __Pyx_GOTREF(__pyx_t_4);
14963 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14964 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
14965 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14966 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
14967 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
14968 __Pyx_GIVEREF(__pyx_t_4);
14970 __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
14971 __Pyx_GOTREF(__pyx_t_4);
14972 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14973 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
14974 __pyx_r = __pyx_t_4;
14978 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14981 __Pyx_XDECREF(__pyx_t_1);
14982 __Pyx_XDECREF(__pyx_t_2);
14983 __Pyx_XDECREF(__pyx_t_3);
14984 __Pyx_XDECREF(__pyx_t_4);
14985 __Pyx_AddTraceback("lxml.objectify.__unpickleElementTree");
14988 __Pyx_XGIVEREF(__pyx_r);
14989 __Pyx_FinishRefcountContext();
14993 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1367
14994 * return etree.ElementTree(fromstring(data))
14996 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction): # <<<<<<<<<<<<<<
14997 * if python.IS_PYTHON3:
15001 static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_elementReduceFunction, PyObject *__pyx_v_elementTreeReduceFunction) {
15002 PyObject *__pyx_v_copyreg;
15003 PyObject *__pyx_r = NULL;
15005 PyObject *__pyx_t_2 = NULL;
15006 PyObject *__pyx_t_3 = NULL;
15007 PyObject *__pyx_t_4 = NULL;
15008 PyObject *__pyx_t_5 = NULL;
15009 __Pyx_SetupRefcountContext("_setupPickle");
15010 __Pyx_INCREF(__pyx_v_elementReduceFunction);
15011 __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
15012 __pyx_v_copyreg = Py_None; __Pyx_INCREF(Py_None);
15014 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1368
15016 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
15017 * if python.IS_PYTHON3: # <<<<<<<<<<<<<<
15021 __pyx_t_1 = IS_PYTHON3;
15024 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1369
15025 * cdef _setupPickle(elementReduceFunction, elementTreeReduceFunction):
15026 * if python.IS_PYTHON3:
15027 * import copyreg # <<<<<<<<<<<<<<
15029 * import copy_reg as copyreg
15031 __pyx_t_2 = __Pyx_Import(__pyx_n_ui_copyreg, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15032 __Pyx_GOTREF(__pyx_t_2);
15033 __Pyx_DECREF(__pyx_v_copyreg);
15034 __pyx_v_copyreg = __pyx_t_2;
15040 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1371
15043 * import copy_reg as copyreg # <<<<<<<<<<<<<<
15044 * copyreg.constructor(fromstring)
15045 * copyreg.constructor(__unpickleElementTree)
15047 __pyx_t_2 = __Pyx_Import(__pyx_n_ui_copy_reg, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15048 __Pyx_GOTREF(__pyx_t_2);
15049 __Pyx_DECREF(__pyx_v_copyreg);
15050 __pyx_v_copyreg = __pyx_t_2;
15055 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1372
15057 * import copy_reg as copyreg
15058 * copyreg.constructor(fromstring) # <<<<<<<<<<<<<<
15059 * copyreg.constructor(__unpickleElementTree)
15060 * copyreg.pickle(ObjectifiedElement,
15062 __pyx_t_2 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_constructor); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15063 __Pyx_GOTREF(__pyx_t_2);
15064 __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15065 __Pyx_GOTREF(__pyx_t_3);
15066 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15067 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
15068 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
15069 __Pyx_GIVEREF(__pyx_t_3);
15071 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15072 __Pyx_GOTREF(__pyx_t_3);
15073 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15074 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
15075 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15077 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1373
15078 * import copy_reg as copyreg
15079 * copyreg.constructor(fromstring)
15080 * copyreg.constructor(__unpickleElementTree) # <<<<<<<<<<<<<<
15081 * copyreg.pickle(ObjectifiedElement,
15082 * elementReduceFunction, fromstring)
15084 __pyx_t_3 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_constructor); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15085 __Pyx_GOTREF(__pyx_t_3);
15086 __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_31); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15087 __Pyx_GOTREF(__pyx_t_4);
15088 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15089 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
15090 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
15091 __Pyx_GIVEREF(__pyx_t_4);
15093 __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15094 __Pyx_GOTREF(__pyx_t_4);
15095 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15096 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
15097 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15099 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1374
15100 * copyreg.constructor(fromstring)
15101 * copyreg.constructor(__unpickleElementTree)
15102 * copyreg.pickle(ObjectifiedElement, # <<<<<<<<<<<<<<
15103 * elementReduceFunction, fromstring)
15104 * copyreg.pickle(etree._ElementTree,
15106 __pyx_t_4 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_pickle); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15107 __Pyx_GOTREF(__pyx_t_4);
15109 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1375
15110 * copyreg.constructor(__unpickleElementTree)
15111 * copyreg.pickle(ObjectifiedElement,
15112 * elementReduceFunction, fromstring) # <<<<<<<<<<<<<<
15113 * copyreg.pickle(etree._ElementTree,
15114 * elementTreeReduceFunction, __unpickleElementTree)
15116 __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15117 __Pyx_GOTREF(__pyx_t_2);
15118 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15119 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15120 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15121 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15122 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15123 __Pyx_INCREF(__pyx_v_elementReduceFunction);
15124 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_elementReduceFunction);
15125 __Pyx_GIVEREF(__pyx_v_elementReduceFunction);
15126 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
15127 __Pyx_GIVEREF(__pyx_t_2);
15129 __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15130 __Pyx_GOTREF(__pyx_t_2);
15131 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15132 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
15133 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15135 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1376
15136 * copyreg.pickle(ObjectifiedElement,
15137 * elementReduceFunction, fromstring)
15138 * copyreg.pickle(etree._ElementTree, # <<<<<<<<<<<<<<
15139 * elementTreeReduceFunction, __unpickleElementTree)
15142 __pyx_t_2 = PyObject_GetAttr(__pyx_v_copyreg, __pyx_n_ui_pickle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15143 __Pyx_GOTREF(__pyx_t_2);
15144 __pyx_t_3 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui__ElementTree); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15145 __Pyx_GOTREF(__pyx_t_3);
15147 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1377
15148 * elementReduceFunction, fromstring)
15149 * copyreg.pickle(etree._ElementTree,
15150 * elementTreeReduceFunction, __unpickleElementTree) # <<<<<<<<<<<<<<
15152 * def pickleReduceElement(obj):
15154 __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_31); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15155 __Pyx_GOTREF(__pyx_t_4);
15156 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15157 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
15158 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
15159 __Pyx_GIVEREF(__pyx_t_3);
15160 __Pyx_INCREF(__pyx_v_elementTreeReduceFunction);
15161 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_elementTreeReduceFunction);
15162 __Pyx_GIVEREF(__pyx_v_elementTreeReduceFunction);
15163 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
15164 __Pyx_GIVEREF(__pyx_t_4);
15167 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15168 __Pyx_GOTREF(__pyx_t_4);
15169 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15170 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
15171 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15173 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15176 __Pyx_XDECREF(__pyx_t_2);
15177 __Pyx_XDECREF(__pyx_t_3);
15178 __Pyx_XDECREF(__pyx_t_4);
15179 __Pyx_XDECREF(__pyx_t_5);
15180 __Pyx_AddTraceback("lxml.objectify._setupPickle");
15183 __Pyx_DECREF(__pyx_v_copyreg);
15184 __Pyx_DECREF(__pyx_v_elementReduceFunction);
15185 __Pyx_DECREF(__pyx_v_elementTreeReduceFunction);
15186 __Pyx_XGIVEREF(__pyx_r);
15187 __Pyx_FinishRefcountContext();
15191 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1379
15192 * elementTreeReduceFunction, __unpickleElementTree)
15194 * def pickleReduceElement(obj): # <<<<<<<<<<<<<<
15195 * return (fromstring, (etree.tostring(obj),))
15199 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElement(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15200 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElement(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15201 PyObject *__pyx_r = NULL;
15202 PyObject *__pyx_t_1 = NULL;
15203 PyObject *__pyx_t_2 = NULL;
15204 PyObject *__pyx_t_3 = NULL;
15205 PyObject *__pyx_t_4 = NULL;
15206 __Pyx_SetupRefcountContext("pickleReduceElement");
15207 __pyx_self = __pyx_self;
15209 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1380
15211 * def pickleReduceElement(obj):
15212 * return (fromstring, (etree.tostring(obj),)) # <<<<<<<<<<<<<<
15214 * def pickleReduceElementTree(obj):
15216 __Pyx_XDECREF(__pyx_r);
15217 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15218 __Pyx_GOTREF(__pyx_t_1);
15219 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15220 __Pyx_GOTREF(__pyx_t_2);
15221 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15222 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15223 __Pyx_INCREF(__pyx_v_obj);
15224 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
15225 __Pyx_GIVEREF(__pyx_v_obj);
15226 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15227 __Pyx_GOTREF(__pyx_t_4);
15228 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15229 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
15230 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15231 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15232 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
15233 __Pyx_GIVEREF(__pyx_t_4);
15235 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15236 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
15237 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
15238 __Pyx_GIVEREF(__pyx_t_1);
15239 PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
15240 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
15243 __pyx_r = ((PyObject *)__pyx_t_4);
15247 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15250 __Pyx_XDECREF(__pyx_t_1);
15251 __Pyx_XDECREF(__pyx_t_2);
15252 __Pyx_XDECREF(__pyx_t_3);
15253 __Pyx_XDECREF(__pyx_t_4);
15254 __Pyx_AddTraceback("lxml.objectify.pickleReduceElement");
15257 __Pyx_XGIVEREF(__pyx_r);
15258 __Pyx_FinishRefcountContext();
15262 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1382
15263 * return (fromstring, (etree.tostring(obj),))
15265 * def pickleReduceElementTree(obj): # <<<<<<<<<<<<<<
15266 * return (__unpickleElementTree, (etree.tostring(obj),))
15270 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
15271 static PyObject *__pyx_pf_4lxml_9objectify_pickleReduceElementTree(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
15272 PyObject *__pyx_r = NULL;
15273 PyObject *__pyx_t_1 = NULL;
15274 PyObject *__pyx_t_2 = NULL;
15275 PyObject *__pyx_t_3 = NULL;
15276 PyObject *__pyx_t_4 = NULL;
15277 __Pyx_SetupRefcountContext("pickleReduceElementTree");
15278 __pyx_self = __pyx_self;
15280 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1383
15282 * def pickleReduceElementTree(obj):
15283 * return (__unpickleElementTree, (etree.tostring(obj),)) # <<<<<<<<<<<<<<
15285 * _setupPickle(pickleReduceElement, pickleReduceElementTree)
15287 __Pyx_XDECREF(__pyx_r);
15288 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15289 __Pyx_GOTREF(__pyx_t_1);
15290 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_tostring); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15291 __Pyx_GOTREF(__pyx_t_2);
15292 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15293 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15294 __Pyx_INCREF(__pyx_v_obj);
15295 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_obj);
15296 __Pyx_GIVEREF(__pyx_v_obj);
15297 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15298 __Pyx_GOTREF(__pyx_t_4);
15299 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15300 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
15301 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15302 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
15303 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
15304 __Pyx_GIVEREF(__pyx_t_4);
15306 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15307 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
15308 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
15309 __Pyx_GIVEREF(__pyx_t_1);
15310 PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_t_3));
15311 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
15314 __pyx_r = ((PyObject *)__pyx_t_4);
15318 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15321 __Pyx_XDECREF(__pyx_t_1);
15322 __Pyx_XDECREF(__pyx_t_2);
15323 __Pyx_XDECREF(__pyx_t_3);
15324 __Pyx_XDECREF(__pyx_t_4);
15325 __Pyx_AddTraceback("lxml.objectify.pickleReduceElementTree");
15328 __Pyx_XGIVEREF(__pyx_r);
15329 __Pyx_FinishRefcountContext();
15333 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1397
15334 * cdef object empty_data_class
15335 * cdef object tree_class
15336 * def __init__(self, tree_class=None, empty_data_class=None): # <<<<<<<<<<<<<<
15337 * u"""Lookup mechanism for objectify.
15341 static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15342 static char __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__[] = "Lookup mechanism for objectify.\n\n The default Element classes can be replaced by passing subclasses of\n ObjectifiedElement and ObjectifiedDataElement as keyword arguments.\n 'tree_class' defines inner tree classes (defaults to\n ObjectifiedElement), 'empty_data_class' defines the default class for\n empty data elements (defauls to StringElement).\n ";
15343 static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15344 PyObject *__pyx_v_tree_class = 0;
15345 PyObject *__pyx_v_empty_data_class = 0;
15348 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_tree_class,&__pyx_n_ui_empty_data_class,0};
15349 __Pyx_SetupRefcountContext("__init__");
15350 if (unlikely(__pyx_kwds)) {
15351 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
15352 PyObject* values[2] = {0,0};
15353 values[0] = ((PyObject *)Py_None);
15354 values[1] = ((PyObject *)Py_None);
15355 switch (PyTuple_GET_SIZE(__pyx_args)) {
15356 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15357 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15359 default: goto __pyx_L5_argtuple_error;
15361 switch (PyTuple_GET_SIZE(__pyx_args)) {
15364 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_tree_class);
15365 if (unlikely(value)) { values[0] = value; kw_args--; }
15369 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_data_class);
15370 if (unlikely(value)) { values[1] = value; kw_args--; }
15373 if (unlikely(kw_args > 0)) {
15374 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15376 __pyx_v_tree_class = values[0];
15377 __pyx_v_empty_data_class = values[1];
15379 __pyx_v_tree_class = ((PyObject *)Py_None);
15380 __pyx_v_empty_data_class = ((PyObject *)Py_None);
15381 switch (PyTuple_GET_SIZE(__pyx_args)) {
15382 case 2: __pyx_v_empty_data_class = PyTuple_GET_ITEM(__pyx_args, 1);
15383 case 1: __pyx_v_tree_class = PyTuple_GET_ITEM(__pyx_args, 0);
15385 default: goto __pyx_L5_argtuple_error;
15388 goto __pyx_L4_argument_unpacking_done;
15389 __pyx_L5_argtuple_error:;
15390 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
15392 __Pyx_AddTraceback("lxml.objectify.ObjectifyElementClassLookup.__init__");
15394 __pyx_L4_argument_unpacking_done:;
15395 __Pyx_INCREF((PyObject *)__pyx_v_self);
15396 __Pyx_INCREF(__pyx_v_tree_class);
15397 __Pyx_INCREF(__pyx_v_empty_data_class);
15399 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1406
15400 * empty data elements (defauls to StringElement).
15402 * self._lookup_function = _lookupElementClass # <<<<<<<<<<<<<<
15403 * if tree_class is None:
15404 * tree_class = ObjectifiedElement
15406 ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass;
15408 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1407
15410 * self._lookup_function = _lookupElementClass
15411 * if tree_class is None: # <<<<<<<<<<<<<<
15412 * tree_class = ObjectifiedElement
15413 * self.tree_class = tree_class
15415 __pyx_t_1 = (__pyx_v_tree_class == Py_None);
15418 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1408
15419 * self._lookup_function = _lookupElementClass
15420 * if tree_class is None:
15421 * tree_class = ObjectifiedElement # <<<<<<<<<<<<<<
15422 * self.tree_class = tree_class
15423 * if empty_data_class is None:
15425 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
15426 __Pyx_DECREF(__pyx_v_tree_class);
15427 __pyx_v_tree_class = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement));
15432 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1409
15433 * if tree_class is None:
15434 * tree_class = ObjectifiedElement
15435 * self.tree_class = tree_class # <<<<<<<<<<<<<<
15436 * if empty_data_class is None:
15437 * empty_data_class = StringElement
15439 __Pyx_INCREF(__pyx_v_tree_class);
15440 __Pyx_GIVEREF(__pyx_v_tree_class);
15441 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class);
15442 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class);
15443 ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->tree_class = __pyx_v_tree_class;
15445 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1410
15446 * tree_class = ObjectifiedElement
15447 * self.tree_class = tree_class
15448 * if empty_data_class is None: # <<<<<<<<<<<<<<
15449 * empty_data_class = StringElement
15450 * self.empty_data_class = empty_data_class
15452 __pyx_t_1 = (__pyx_v_empty_data_class == Py_None);
15455 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1411
15456 * self.tree_class = tree_class
15457 * if empty_data_class is None:
15458 * empty_data_class = StringElement # <<<<<<<<<<<<<<
15459 * self.empty_data_class = empty_data_class
15462 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement)));
15463 __Pyx_DECREF(__pyx_v_empty_data_class);
15464 __pyx_v_empty_data_class = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_StringElement));
15469 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1412
15470 * if empty_data_class is None:
15471 * empty_data_class = StringElement
15472 * self.empty_data_class = empty_data_class # <<<<<<<<<<<<<<
15474 * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node):
15476 __Pyx_INCREF(__pyx_v_empty_data_class);
15477 __Pyx_GIVEREF(__pyx_v_empty_data_class);
15478 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class);
15479 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class);
15480 ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_self)->empty_data_class = __pyx_v_empty_data_class;
15483 __Pyx_DECREF((PyObject *)__pyx_v_self);
15484 __Pyx_DECREF(__pyx_v_tree_class);
15485 __Pyx_DECREF(__pyx_v_empty_data_class);
15486 __Pyx_FinishRefcountContext();
15490 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1414
15491 * self.empty_data_class = empty_data_class
15493 * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node): # <<<<<<<<<<<<<<
15494 * cdef ObjectifyElementClassLookup lookup
15495 * cdef python.PyObject* dict_result
15498 static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_state, struct LxmlDocument *__pyx_v_doc, xmlNode *__pyx_v_c_node) {
15499 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *__pyx_v_lookup;
15500 PyObject *__pyx_v_dict_result;
15501 PyObject *__pyx_v_value;
15502 PyObject *__pyx_v_prefix;
15503 PyObject *__pyx_v_el_class;
15504 PyObject *__pyx_r = NULL;
15506 PyObject *__pyx_t_2 = NULL;
15507 PyObject *__pyx_t_3 = NULL;
15509 PyObject *__pyx_t_5 = NULL;
15510 PyObject *__pyx_t_6 = NULL;
15511 __Pyx_SetupRefcountContext("_lookupElementClass");
15512 __Pyx_INCREF(__pyx_v_state);
15513 __Pyx_INCREF((PyObject *)__pyx_v_doc);
15514 __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)Py_None); __Pyx_INCREF(Py_None);
15515 __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
15516 __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
15517 __pyx_v_el_class = Py_None; __Pyx_INCREF(Py_None);
15519 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1417
15520 * cdef ObjectifyElementClassLookup lookup
15521 * cdef python.PyObject* dict_result
15522 * lookup = <ObjectifyElementClassLookup>state # <<<<<<<<<<<<<<
15523 * # if element has children => no data class
15524 * if cetree.hasChild(c_node):
15526 __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state)));
15527 __Pyx_DECREF(((PyObject *)__pyx_v_lookup));
15528 __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_v_state);
15530 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1419
15531 * lookup = <ObjectifyElementClassLookup>state
15532 * # if element has children => no data class
15533 * if cetree.hasChild(c_node): # <<<<<<<<<<<<<<
15534 * return lookup.tree_class
15537 __pyx_t_1 = hasChild(__pyx_v_c_node);
15540 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1420
15541 * # if element has children => no data class
15542 * if cetree.hasChild(c_node):
15543 * return lookup.tree_class # <<<<<<<<<<<<<<
15545 * # if element is defined as xsi:nil, return NoneElement class
15547 __Pyx_XDECREF(__pyx_r);
15548 __Pyx_INCREF(__pyx_v_lookup->tree_class);
15549 __pyx_r = __pyx_v_lookup->tree_class;
15555 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1424
15556 * # if element is defined as xsi:nil, return NoneElement class
15557 * if u"true" == cetree.attributeValueFromNsName(
15558 * c_node, _XML_SCHEMA_INSTANCE_NS, "nil"): # <<<<<<<<<<<<<<
15559 * return NoneElement
15562 __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_nil); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15563 __Pyx_GOTREF(__pyx_t_2);
15564 __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_n_u_true), __pyx_t_2, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15565 __Pyx_GOTREF(__pyx_t_3);
15566 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15567 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1423; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15568 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15571 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1425
15572 * if u"true" == cetree.attributeValueFromNsName(
15573 * c_node, _XML_SCHEMA_INSTANCE_NS, "nil"):
15574 * return NoneElement # <<<<<<<<<<<<<<
15576 * # check for Python type hint
15578 __Pyx_XDECREF(__pyx_r);
15579 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement)));
15580 __pyx_r = ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_NoneElement));
15586 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1429
15587 * # check for Python type hint
15588 * value = cetree.attributeValueFromNsName(
15589 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) # <<<<<<<<<<<<<<
15590 * if value is not None:
15591 * if value == TREE_PYTYPE_NAME:
15593 __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15594 __Pyx_GOTREF(__pyx_t_3);
15595 __Pyx_DECREF(__pyx_v_value);
15596 __pyx_v_value = __pyx_t_3;
15599 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1430
15600 * value = cetree.attributeValueFromNsName(
15601 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
15602 * if value is not None: # <<<<<<<<<<<<<<
15603 * if value == TREE_PYTYPE_NAME:
15604 * return lookup.tree_class
15606 __pyx_t_1 = (__pyx_v_value != Py_None);
15609 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1431
15610 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
15611 * if value is not None:
15612 * if value == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<<
15613 * return lookup.tree_class
15614 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15616 __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15617 __Pyx_GOTREF(__pyx_t_3);
15618 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15619 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15622 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1432
15623 * if value is not None:
15624 * if value == TREE_PYTYPE_NAME:
15625 * return lookup.tree_class # <<<<<<<<<<<<<<
15626 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15627 * if dict_result is not NULL:
15629 __Pyx_XDECREF(__pyx_r);
15630 __Pyx_INCREF(__pyx_v_lookup->tree_class);
15631 __pyx_r = __pyx_v_lookup->tree_class;
15637 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1433
15638 * if value == TREE_PYTYPE_NAME:
15639 * return lookup.tree_class
15640 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value) # <<<<<<<<<<<<<<
15641 * if dict_result is not NULL:
15642 * return (<PyType>dict_result)._type
15644 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_value);
15646 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1434
15647 * return lookup.tree_class
15648 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15649 * if dict_result is not NULL: # <<<<<<<<<<<<<<
15650 * return (<PyType>dict_result)._type
15651 * # unknown 'pyval' => try to figure it out ourself, just go on
15653 __pyx_t_1 = (__pyx_v_dict_result != NULL);
15656 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1435
15657 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, value)
15658 * if dict_result is not NULL:
15659 * return (<PyType>dict_result)._type # <<<<<<<<<<<<<<
15660 * # unknown 'pyval' => try to figure it out ourself, just go on
15663 __Pyx_XDECREF(__pyx_r);
15664 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type);
15665 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type;
15674 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1440
15675 * # check for XML Schema type hint
15676 * value = cetree.attributeValueFromNsName(
15677 * c_node, _XML_SCHEMA_INSTANCE_NS, "type") # <<<<<<<<<<<<<<
15679 * if value is not None:
15681 __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15682 __Pyx_GOTREF(__pyx_t_3);
15683 __Pyx_DECREF(__pyx_v_value);
15684 __pyx_v_value = __pyx_t_3;
15687 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1442
15688 * c_node, _XML_SCHEMA_INSTANCE_NS, "type")
15690 * if value is not None: # <<<<<<<<<<<<<<
15691 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15692 * if dict_result is NULL and u':' in value:
15694 __pyx_t_1 = (__pyx_v_value != Py_None);
15697 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1443
15699 * if value is not None:
15700 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value) # <<<<<<<<<<<<<<
15701 * if dict_result is NULL and u':' in value:
15702 * prefix, value = value.split(u':', 1)
15704 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_value);
15706 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1444
15707 * if value is not None:
15708 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15709 * if dict_result is NULL and u':' in value: # <<<<<<<<<<<<<<
15710 * prefix, value = value.split(u':', 1)
15711 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15713 if ((__pyx_v_dict_result == NULL)) {
15714 __pyx_t_1 = (PySequence_Contains(__pyx_v_value, ((PyObject *)__pyx_kp_u_32))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15715 __pyx_t_4 = __pyx_t_1;
15717 __pyx_t_4 = (__pyx_v_dict_result == NULL);
15721 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1445
15722 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15723 * if dict_result is NULL and u':' in value:
15724 * prefix, value = value.split(u':', 1) # <<<<<<<<<<<<<<
15725 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15726 * if dict_result is not NULL:
15728 __pyx_t_3 = PyObject_GetAttr(__pyx_v_value, __pyx_n_ui_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15729 __Pyx_GOTREF(__pyx_t_3);
15730 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15731 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
15732 __Pyx_INCREF(((PyObject *)__pyx_kp_u_32));
15733 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_u_32));
15734 __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_32));
15735 __Pyx_INCREF(__pyx_int_1);
15736 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
15737 __Pyx_GIVEREF(__pyx_int_1);
15738 __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15739 __Pyx_GOTREF(__pyx_t_5);
15740 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15741 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
15742 if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
15743 PyObject* tuple = __pyx_t_5;
15744 __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
15745 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
15746 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15747 __Pyx_DECREF(__pyx_v_prefix);
15748 __pyx_v_prefix = __pyx_t_2;
15750 __Pyx_DECREF(__pyx_v_value);
15751 __pyx_v_value = __pyx_t_3;
15754 __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15755 __Pyx_GOTREF(__pyx_t_6);
15756 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
15757 __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15758 __Pyx_GOTREF(__pyx_t_2);
15759 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15760 __Pyx_GOTREF(__pyx_t_3);
15761 if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1445; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15762 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15763 __Pyx_DECREF(__pyx_v_prefix);
15764 __pyx_v_prefix = __pyx_t_2;
15766 __Pyx_DECREF(__pyx_v_value);
15767 __pyx_v_value = __pyx_t_3;
15771 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1446
15772 * if dict_result is NULL and u':' in value:
15773 * prefix, value = value.split(u':', 1)
15774 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value) # <<<<<<<<<<<<<<
15775 * if dict_result is not NULL:
15776 * return (<PyType>dict_result)._type
15778 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_value);
15783 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1447
15784 * prefix, value = value.split(u':', 1)
15785 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15786 * if dict_result is not NULL: # <<<<<<<<<<<<<<
15787 * return (<PyType>dict_result)._type
15790 __pyx_t_4 = (__pyx_v_dict_result != NULL);
15793 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1448
15794 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, value)
15795 * if dict_result is not NULL:
15796 * return (<PyType>dict_result)._type # <<<<<<<<<<<<<<
15798 * # otherwise determine class based on text content type
15800 __Pyx_XDECREF(__pyx_r);
15801 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type);
15802 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->_type;
15811 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1451
15813 * # otherwise determine class based on text content type
15814 * el_class = _guessElementClass(c_node) # <<<<<<<<<<<<<<
15815 * if el_class is not None:
15818 __pyx_t_5 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15819 __Pyx_GOTREF(__pyx_t_5);
15820 __Pyx_DECREF(__pyx_v_el_class);
15821 __pyx_v_el_class = __pyx_t_5;
15824 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1452
15825 * # otherwise determine class based on text content type
15826 * el_class = _guessElementClass(c_node)
15827 * if el_class is not None: # <<<<<<<<<<<<<<
15831 __pyx_t_4 = (__pyx_v_el_class != Py_None);
15834 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1453
15835 * el_class = _guessElementClass(c_node)
15836 * if el_class is not None:
15837 * return el_class # <<<<<<<<<<<<<<
15839 * # if element is a root node => default to tree node
15841 __Pyx_XDECREF(__pyx_r);
15842 __Pyx_INCREF(__pyx_v_el_class);
15843 __pyx_r = __pyx_v_el_class;
15849 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1456
15851 * # if element is a root node => default to tree node
15852 * if c_node.parent is NULL or not tree._isElement(c_node.parent): # <<<<<<<<<<<<<<
15853 * return lookup.tree_class
15856 if (!(__pyx_v_c_node->parent == NULL)) {
15857 __pyx_t_4 = (!_isElement(__pyx_v_c_node->parent));
15859 __pyx_t_4 = (__pyx_v_c_node->parent == NULL);
15863 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1457
15864 * # if element is a root node => default to tree node
15865 * if c_node.parent is NULL or not tree._isElement(c_node.parent):
15866 * return lookup.tree_class # <<<<<<<<<<<<<<
15868 * return lookup.empty_data_class
15870 __Pyx_XDECREF(__pyx_r);
15871 __Pyx_INCREF(__pyx_v_lookup->tree_class);
15872 __pyx_r = __pyx_v_lookup->tree_class;
15878 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1459
15879 * return lookup.tree_class
15881 * return lookup.empty_data_class # <<<<<<<<<<<<<<
15885 __Pyx_XDECREF(__pyx_r);
15886 __Pyx_INCREF(__pyx_v_lookup->empty_data_class);
15887 __pyx_r = __pyx_v_lookup->empty_data_class;
15890 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
15893 __Pyx_XDECREF(__pyx_t_2);
15894 __Pyx_XDECREF(__pyx_t_3);
15895 __Pyx_XDECREF(__pyx_t_5);
15896 __Pyx_XDECREF(__pyx_t_6);
15897 __Pyx_AddTraceback("lxml.objectify._lookupElementClass");
15900 __Pyx_DECREF((PyObject *)__pyx_v_lookup);
15901 __Pyx_DECREF(__pyx_v_value);
15902 __Pyx_DECREF(__pyx_v_prefix);
15903 __Pyx_DECREF(__pyx_v_el_class);
15904 __Pyx_DECREF(__pyx_v_state);
15905 __Pyx_DECREF((PyObject *)__pyx_v_doc);
15906 __Pyx_XGIVEREF(__pyx_r);
15907 __Pyx_FinishRefcountContext();
15911 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1465
15912 * # Type annotations
15914 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype): # <<<<<<<<<<<<<<
15915 * if pytype is None:
15919 static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check_type(xmlNode *__pyx_v_c_node, struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype) {
15920 PyObject *__pyx_v_value;
15921 struct __pyx_obj_4lxml_9objectify_PyType *__pyx_r = NULL;
15923 PyObject *__pyx_t_2 = NULL;
15924 PyObject *__pyx_t_3 = NULL;
15926 __Pyx_SetupRefcountContext("_check_type");
15927 __Pyx_INCREF((PyObject *)__pyx_v_pytype);
15928 __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
15930 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1466
15932 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
15933 * if pytype is None: # <<<<<<<<<<<<<<
15935 * value = textOf(c_node)
15937 __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
15940 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1467
15941 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype):
15942 * if pytype is None:
15943 * return None # <<<<<<<<<<<<<<
15944 * value = textOf(c_node)
15947 __Pyx_XDECREF(((PyObject *)__pyx_r));
15948 __Pyx_INCREF(Py_None);
15949 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
15955 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1468
15956 * if pytype is None:
15958 * value = textOf(c_node) # <<<<<<<<<<<<<<
15960 * pytype.type_check(value)
15962 __pyx_t_2 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15963 __Pyx_GOTREF(__pyx_t_2);
15964 __Pyx_DECREF(__pyx_v_value);
15965 __pyx_v_value = __pyx_t_2;
15968 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1469
15970 * value = textOf(c_node)
15971 * try: # <<<<<<<<<<<<<<
15972 * pytype.type_check(value)
15976 PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
15977 __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
15978 __Pyx_XGOTREF(__pyx_save_exc_type);
15979 __Pyx_XGOTREF(__pyx_save_exc_value);
15980 __Pyx_XGOTREF(__pyx_save_exc_tb);
15983 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1470
15984 * value = textOf(c_node)
15986 * pytype.type_check(value) # <<<<<<<<<<<<<<
15988 * except IGNORABLE_ERRORS:
15990 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15991 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
15992 __Pyx_INCREF(__pyx_v_value);
15993 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
15994 __Pyx_GIVEREF(__pyx_v_value);
15995 __pyx_t_3 = PyObject_Call(__pyx_v_pytype->type_check, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1470; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
15996 __Pyx_GOTREF(__pyx_t_3);
15997 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
15998 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16000 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1471
16002 * pytype.type_check(value)
16003 * return pytype # <<<<<<<<<<<<<<
16004 * except IGNORABLE_ERRORS:
16005 * # could not be parsed as the specified type => ignore
16007 __Pyx_XDECREF(((PyObject *)__pyx_r));
16008 __Pyx_INCREF(((PyObject *)__pyx_v_pytype));
16009 __pyx_r = __pyx_v_pytype;
16010 goto __pyx_L8_try_return;
16012 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
16013 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
16014 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
16015 goto __pyx_L11_try_end;
16016 __pyx_L8_try_return:;
16017 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
16018 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
16019 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
16022 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
16023 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16025 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1472
16026 * pytype.type_check(value)
16028 * except IGNORABLE_ERRORS: # <<<<<<<<<<<<<<
16029 * # could not be parsed as the specified type => ignore
16032 __pyx_t_4 = PyErr_ExceptionMatches(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
16034 PyErr_Restore(0,0,0);
16035 goto __pyx_L5_exception_handled;
16037 __Pyx_XDECREF(__pyx_save_exc_type);
16038 __Pyx_XDECREF(__pyx_save_exc_value);
16039 __Pyx_XDECREF(__pyx_save_exc_tb);
16040 goto __pyx_L1_error;
16041 __pyx_L5_exception_handled:;
16042 __Pyx_XGIVEREF(__pyx_save_exc_type);
16043 __Pyx_XGIVEREF(__pyx_save_exc_value);
16044 __Pyx_XGIVEREF(__pyx_save_exc_tb);
16045 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
16046 __pyx_L11_try_end:;
16049 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1475
16050 * # could not be parsed as the specified type => ignore
16052 * return None # <<<<<<<<<<<<<<
16054 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
16056 __Pyx_XDECREF(((PyObject *)__pyx_r));
16057 __Pyx_INCREF(Py_None);
16058 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
16061 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16064 __Pyx_XDECREF(__pyx_t_2);
16065 __Pyx_XDECREF(__pyx_t_3);
16066 __Pyx_AddTraceback("lxml.objectify._check_type");
16069 __Pyx_DECREF(__pyx_v_value);
16070 __Pyx_DECREF((PyObject *)__pyx_v_pytype);
16071 __Pyx_XGIVEREF((PyObject *)__pyx_r);
16072 __Pyx_FinishRefcountContext();
16076 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1477
16079 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, # <<<<<<<<<<<<<<
16080 * empty_pytype=None):
16081 * u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
16084 static PyObject *__pyx_pf_4lxml_9objectify_pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16085 static char __pyx_doc_4lxml_9objectify_pyannotate[] = "pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)\n\n Recursively annotates the elements of an XML tree with 'pytype'\n attributes.\n\n If the 'ignore_old' keyword argument is True (the default), current 'pytype'\n attributes will be ignored and replaced. Otherwise, they will be checked\n and only replaced if they no longer fit the current text value.\n\n Setting the keyword argument ``ignore_xsi`` to True makes the function\n additionally ignore existing ``xsi:type`` annotations. The default is to\n use them as a type hint.\n\n The default annotation of empty elements can be set with the\n ``empty_pytype`` keyword argument. The default is not to annotate empty\n elements. Pass 'str', for example, to make string values the default.\n ";
16086 static PyObject *__pyx_pf_4lxml_9objectify_pyannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16087 PyObject *__pyx_v_element_or_tree = 0;
16088 PyObject *__pyx_v_ignore_old = 0;
16089 PyObject *__pyx_v_ignore_xsi = 0;
16090 PyObject *__pyx_v_empty_pytype = 0;
16091 struct LxmlElement *__pyx_v_element;
16092 PyObject *__pyx_r = NULL;
16093 PyObject *__pyx_t_1 = NULL;
16096 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_ignore_old,&__pyx_n_ui_ignore_xsi,&__pyx_n_ui_empty_pytype,0};
16097 __Pyx_SetupRefcountContext("pyannotate");
16098 __pyx_self = __pyx_self;
16099 if (unlikely(__pyx_kwds)) {
16101 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1478
16103 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False,
16104 * empty_pytype=None): # <<<<<<<<<<<<<<
16105 * u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
16108 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
16109 PyObject* values[4] = {0,0,0,0};
16110 values[1] = __pyx_k_33;
16111 values[2] = __pyx_k_34;
16112 values[3] = ((PyObject *)Py_None);
16113 switch (PyTuple_GET_SIZE(__pyx_args)) {
16114 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16116 default: goto __pyx_L5_argtuple_error;
16118 switch (PyTuple_GET_SIZE(__pyx_args)) {
16120 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
16121 if (likely(values[0])) kw_args--;
16122 else goto __pyx_L5_argtuple_error;
16124 while (kw_args > 0) {
16126 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_old);
16127 if (value) { values[1] = value; if (!(--kw_args)) break; }
16128 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_xsi);
16129 if (value) { values[2] = value; if (!(--kw_args)) break; }
16130 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_pytype);
16131 if (value) { values[3] = value; if (!(--kw_args)) break; }
16134 if (unlikely(kw_args > 0)) {
16135 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "pyannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16137 __pyx_v_element_or_tree = values[0];
16138 __pyx_v_ignore_old = values[1];
16139 __pyx_v_ignore_xsi = values[2];
16140 __pyx_v_empty_pytype = values[3];
16141 } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
16142 goto __pyx_L5_argtuple_error;
16144 __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
16145 __pyx_v_ignore_old = __pyx_k_33;
16146 __pyx_v_ignore_xsi = __pyx_k_34;
16147 __pyx_v_empty_pytype = ((PyObject *)Py_None);
16149 goto __pyx_L4_argument_unpacking_done;
16150 __pyx_L5_argtuple_error:;
16151 __Pyx_RaiseArgtupleInvalid("pyannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16153 __Pyx_AddTraceback("lxml.objectify.pyannotate");
16155 __pyx_L4_argument_unpacking_done:;
16156 __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
16158 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1497
16160 * cdef _Element element
16161 * element = cetree.rootNodeOrRaise(element_or_tree) # <<<<<<<<<<<<<<
16162 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
16165 __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1497; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16166 __Pyx_GOTREF(__pyx_t_1);
16167 __Pyx_DECREF(((PyObject *)__pyx_v_element));
16168 __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
16171 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1498
16172 * cdef _Element element
16173 * element = cetree.rootNodeOrRaise(element_or_tree)
16174 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) # <<<<<<<<<<<<<<
16176 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
16178 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_2 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16179 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16180 __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 0, 1, __pyx_t_2, __pyx_t_3, Py_None, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16181 __Pyx_GOTREF(__pyx_t_1);
16182 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16184 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16187 __Pyx_XDECREF(__pyx_t_1);
16188 __Pyx_AddTraceback("lxml.objectify.pyannotate");
16191 __Pyx_DECREF((PyObject *)__pyx_v_element);
16192 __Pyx_XGIVEREF(__pyx_r);
16193 __Pyx_FinishRefcountContext();
16197 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1500
16198 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
16200 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, # <<<<<<<<<<<<<<
16201 * empty_type=None):
16202 * u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
16205 static PyObject *__pyx_pf_4lxml_9objectify_xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16206 static char __pyx_doc_4lxml_9objectify_xsiannotate[] = "xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)\n\n Recursively annotates the elements of an XML tree with 'xsi:type'\n attributes.\n\n If the 'ignore_old' keyword argument is True (the default), current\n 'xsi:type' attributes will be ignored and replaced. Otherwise, they will be\n checked and only replaced if they no longer fit the current text value.\n\n Note that the mapping from Python types to XSI types is usually ambiguous.\n Currently, only the first XSI type name in the corresponding PyType\n definition will be used for annotation. Thus, you should consider naming\n the widest type first if you define additional types.\n\n Setting the keyword argument ``ignore_pytype`` to True makes the function\n additionally ignore existing ``pytype`` annotations. The default is to\n use them as a type hint.\n\n The default annotation of empty elements can be set with the\n ``empty_type`` keyword argument. The default is not to annotate empty\n elements. Pass 'string', for example, to make string values the default.\n ";
16207 static PyObject *__pyx_pf_4lxml_9objectify_xsiannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16208 PyObject *__pyx_v_element_or_tree = 0;
16209 PyObject *__pyx_v_ignore_old = 0;
16210 PyObject *__pyx_v_ignore_pytype = 0;
16211 PyObject *__pyx_v_empty_type = 0;
16212 struct LxmlElement *__pyx_v_element;
16213 PyObject *__pyx_r = NULL;
16214 PyObject *__pyx_t_1 = NULL;
16217 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_ignore_old,&__pyx_n_ui_ignore_pytype,&__pyx_n_ui_empty_type,0};
16218 __Pyx_SetupRefcountContext("xsiannotate");
16219 __pyx_self = __pyx_self;
16220 if (unlikely(__pyx_kwds)) {
16222 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1501
16224 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False,
16225 * empty_type=None): # <<<<<<<<<<<<<<
16226 * u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
16229 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
16230 PyObject* values[4] = {0,0,0,0};
16231 values[1] = __pyx_k_35;
16232 values[2] = __pyx_k_36;
16233 values[3] = ((PyObject *)Py_None);
16234 switch (PyTuple_GET_SIZE(__pyx_args)) {
16235 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16237 default: goto __pyx_L5_argtuple_error;
16239 switch (PyTuple_GET_SIZE(__pyx_args)) {
16241 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
16242 if (likely(values[0])) kw_args--;
16243 else goto __pyx_L5_argtuple_error;
16245 while (kw_args > 0) {
16247 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_old);
16248 if (value) { values[1] = value; if (!(--kw_args)) break; }
16249 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_pytype);
16250 if (value) { values[2] = value; if (!(--kw_args)) break; }
16251 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_type);
16252 if (value) { values[3] = value; if (!(--kw_args)) break; }
16255 if (unlikely(kw_args > 0)) {
16256 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "xsiannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16258 __pyx_v_element_or_tree = values[0];
16259 __pyx_v_ignore_old = values[1];
16260 __pyx_v_ignore_pytype = values[2];
16261 __pyx_v_empty_type = values[3];
16262 } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
16263 goto __pyx_L5_argtuple_error;
16265 __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
16266 __pyx_v_ignore_old = __pyx_k_35;
16267 __pyx_v_ignore_pytype = __pyx_k_36;
16268 __pyx_v_empty_type = ((PyObject *)Py_None);
16270 goto __pyx_L4_argument_unpacking_done;
16271 __pyx_L5_argtuple_error:;
16272 __Pyx_RaiseArgtupleInvalid("xsiannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16274 __Pyx_AddTraceback("lxml.objectify.xsiannotate");
16276 __pyx_L4_argument_unpacking_done:;
16277 __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
16279 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1525
16281 * cdef _Element element
16282 * element = cetree.rootNodeOrRaise(element_or_tree) # <<<<<<<<<<<<<<
16283 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
16286 __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16287 __Pyx_GOTREF(__pyx_t_1);
16288 __Pyx_DECREF(((PyObject *)__pyx_v_element));
16289 __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
16292 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1526
16293 * cdef _Element element
16294 * element = cetree.rootNodeOrRaise(element_or_tree)
16295 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) # <<<<<<<<<<<<<<
16297 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
16299 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_2 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16300 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16301 __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 1, 0, __pyx_t_2, __pyx_t_3, __pyx_v_empty_type, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16302 __Pyx_GOTREF(__pyx_t_1);
16303 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16305 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16308 __Pyx_XDECREF(__pyx_t_1);
16309 __Pyx_AddTraceback("lxml.objectify.xsiannotate");
16312 __Pyx_DECREF((PyObject *)__pyx_v_element);
16313 __Pyx_XGIVEREF(__pyx_r);
16314 __Pyx_FinishRefcountContext();
16318 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1528
16319 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
16321 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, # <<<<<<<<<<<<<<
16322 * empty_pytype=None, empty_type=None, annotate_xsi=0,
16323 * annotate_pytype=1):
16326 static PyObject *__pyx_pf_4lxml_9objectify_annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16327 static char __pyx_doc_4lxml_9objectify_annotate[] = "annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)\n\n Recursively annotates the elements of an XML tree with 'xsi:type'\n and/or 'py:pytype' attributes.\n\n If the 'ignore_old' keyword argument is True (the default), current\n 'py:pytype' attributes will be ignored for the type annotation. Set to False\n if you want reuse existing 'py:pytype' information (iff appropriate for the\n element text value).\n\n If the 'ignore_xsi' keyword argument is False (the default), existing\n 'xsi:type' attributes will be used for the type annotation, if they fit the\n element text values. \n \n Note that the mapping from Python types to XSI types is usually ambiguous.\n Currently, only the first XSI type name in the corresponding PyType\n definition will be used for annotation. Thus, you should consider naming\n the widest type first if you define additional types.\n\n The default 'py:pytype' annotation of empty elements can be set with the\n ``empty_pytype`` keyword argument. Pass 'str', for example, to make\n string values the default.\n\n The default 'xsi:type' annotation of empty elements can be set with the\n ``empty_type`` keyword argument. The default is not to annotate empty\n elements. Pass 'string', for example, to make string values the default.\n\n The keyword arguments 'annotate_xsi' (default: 0) and 'annotate_pytype'\n (default: 1) control which kind(s) of annotation to use. \n ";
16328 static PyObject *__pyx_pf_4lxml_9objectify_annotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16329 PyObject *__pyx_v_element_or_tree = 0;
16330 PyObject *__pyx_v_ignore_old = 0;
16331 PyObject *__pyx_v_ignore_xsi = 0;
16332 PyObject *__pyx_v_empty_pytype = 0;
16333 PyObject *__pyx_v_empty_type = 0;
16334 PyObject *__pyx_v_annotate_xsi = 0;
16335 PyObject *__pyx_v_annotate_pytype = 0;
16336 struct LxmlElement *__pyx_v_element;
16337 PyObject *__pyx_r = NULL;
16338 PyObject *__pyx_t_1 = NULL;
16343 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_ignore_old,&__pyx_n_ui_ignore_xsi,&__pyx_n_ui_empty_pytype,&__pyx_n_ui_empty_type,&__pyx_n_ui_annotate_xsi,&__pyx_n_ui_annotate_pytype,0};
16344 __Pyx_SetupRefcountContext("annotate");
16345 __pyx_self = __pyx_self;
16346 if (unlikely(__pyx_kwds)) {
16348 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1529
16350 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False,
16351 * empty_pytype=None, empty_type=None, annotate_xsi=0, # <<<<<<<<<<<<<<
16352 * annotate_pytype=1):
16353 * u"""annotate(element_or_tree, ignore_old=True, ignore_xsi=False, empty_pytype=None, empty_type=None, annotate_xsi=0, annotate_pytype=1)
16355 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
16356 PyObject* values[7] = {0,0,0,0,0,0,0};
16357 values[1] = __pyx_k_37;
16358 values[2] = __pyx_k_38;
16359 values[3] = ((PyObject *)Py_None);
16360 values[4] = ((PyObject *)Py_None);
16361 values[5] = ((PyObject *)__pyx_int_0);
16362 values[6] = ((PyObject *)__pyx_int_1);
16363 switch (PyTuple_GET_SIZE(__pyx_args)) {
16364 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16366 default: goto __pyx_L5_argtuple_error;
16368 switch (PyTuple_GET_SIZE(__pyx_args)) {
16370 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
16371 if (likely(values[0])) kw_args--;
16372 else goto __pyx_L5_argtuple_error;
16374 while (kw_args > 0) {
16376 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_old);
16377 if (value) { values[1] = value; if (!(--kw_args)) break; }
16378 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_ignore_xsi);
16379 if (value) { values[2] = value; if (!(--kw_args)) break; }
16380 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_pytype);
16381 if (value) { values[3] = value; if (!(--kw_args)) break; }
16382 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_empty_type);
16383 if (value) { values[4] = value; if (!(--kw_args)) break; }
16384 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_annotate_xsi);
16385 if (value) { values[5] = value; if (!(--kw_args)) break; }
16386 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_annotate_pytype);
16387 if (value) { values[6] = value; if (!(--kw_args)) break; }
16390 if (unlikely(kw_args > 0)) {
16391 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "annotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16393 __pyx_v_element_or_tree = values[0];
16394 __pyx_v_ignore_old = values[1];
16395 __pyx_v_ignore_xsi = values[2];
16396 __pyx_v_empty_pytype = values[3];
16397 __pyx_v_empty_type = values[4];
16398 __pyx_v_annotate_xsi = values[5];
16399 __pyx_v_annotate_pytype = values[6];
16400 } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
16401 goto __pyx_L5_argtuple_error;
16403 __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
16404 __pyx_v_ignore_old = __pyx_k_37;
16405 __pyx_v_ignore_xsi = __pyx_k_38;
16406 __pyx_v_empty_pytype = ((PyObject *)Py_None);
16407 __pyx_v_empty_type = ((PyObject *)Py_None);
16408 __pyx_v_annotate_xsi = ((PyObject *)__pyx_int_0);
16409 __pyx_v_annotate_pytype = ((PyObject *)__pyx_int_1);
16411 goto __pyx_L4_argument_unpacking_done;
16412 __pyx_L5_argtuple_error:;
16413 __Pyx_RaiseArgtupleInvalid("annotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
16415 __Pyx_AddTraceback("lxml.objectify.annotate");
16417 __pyx_L4_argument_unpacking_done:;
16418 __pyx_v_element = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
16420 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1562
16422 * cdef _Element element
16423 * element = cetree.rootNodeOrRaise(element_or_tree) # <<<<<<<<<<<<<<
16424 * _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
16425 * ignore_old, empty_type, empty_pytype)
16427 __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1562; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16428 __Pyx_GOTREF(__pyx_t_1);
16429 __Pyx_DECREF(((PyObject *)__pyx_v_element));
16430 __pyx_v_element = ((struct LxmlElement *)__pyx_t_1);
16433 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1563
16434 * cdef _Element element
16435 * element = cetree.rootNodeOrRaise(element_or_tree)
16436 * _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi, # <<<<<<<<<<<<<<
16437 * ignore_old, empty_type, empty_pytype)
16440 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_xsi); if (unlikely((__pyx_t_2 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16441 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_t_3 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16442 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_4 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16444 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1564
16445 * element = cetree.rootNodeOrRaise(element_or_tree)
16446 * _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi,
16447 * ignore_old, empty_type, empty_pytype) # <<<<<<<<<<<<<<
16451 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_5 == (int)-1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16452 __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_empty_type, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16453 __Pyx_GOTREF(__pyx_t_1);
16454 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16456 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16459 __Pyx_XDECREF(__pyx_t_1);
16460 __Pyx_AddTraceback("lxml.objectify.annotate");
16463 __Pyx_DECREF((PyObject *)__pyx_v_element);
16464 __Pyx_XGIVEREF(__pyx_r);
16465 __Pyx_FinishRefcountContext();
16469 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1567
16472 * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype, # <<<<<<<<<<<<<<
16473 * bint ignore_xsi, bint ignore_pytype,
16474 * empty_type_name, empty_pytype_name):
16477 static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_element, int __pyx_v_annotate_xsi, int __pyx_v_annotate_pytype, int __pyx_v_ignore_xsi, int __pyx_v_ignore_pytype, PyObject *__pyx_v_empty_type_name, PyObject *__pyx_v_empty_pytype_name) {
16478 struct LxmlDocument *__pyx_v_doc;
16479 xmlNode *__pyx_v_c_node;
16480 xmlNs *__pyx_v_c_ns;
16481 PyObject *__pyx_v_dict_result;
16482 struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_pytype;
16483 struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_empty_pytype;
16484 struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_StrType;
16485 struct __pyx_obj_4lxml_9objectify_PyType *__pyx_v_NoneType;
16486 PyObject *__pyx_v_typename;
16487 PyObject *__pyx_v_value;
16488 PyObject *__pyx_v_istree;
16489 PyObject *__pyx_v_prefix;
16490 PyObject *__pyx_v_old_pytypename;
16491 PyObject *__pyx_v_typename_utf8;
16492 PyObject *__pyx_v_name;
16493 PyObject *__pyx_v_pytype_name;
16494 PyObject *__pyx_r = NULL;
16496 PyObject *__pyx_t_2 = NULL;
16497 PyObject *__pyx_t_3 = NULL;
16498 PyObject *__pyx_t_4 = NULL;
16500 PyObject *__pyx_t_6 = NULL;
16502 __Pyx_SetupRefcountContext("_annotate");
16503 __Pyx_INCREF((PyObject *)__pyx_v_element);
16504 __Pyx_INCREF(__pyx_v_empty_type_name);
16505 __Pyx_INCREF(__pyx_v_empty_pytype_name);
16506 __pyx_v_doc = ((struct LxmlDocument *)Py_None); __Pyx_INCREF(Py_None);
16507 __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16508 __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16509 __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16510 __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None);
16511 __pyx_v_typename = Py_None; __Pyx_INCREF(Py_None);
16512 __pyx_v_value = Py_None; __Pyx_INCREF(Py_None);
16513 __pyx_v_istree = Py_None; __Pyx_INCREF(Py_None);
16514 __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
16515 __pyx_v_old_pytypename = Py_None; __Pyx_INCREF(Py_None);
16516 __pyx_v_typename_utf8 = Py_None; __Pyx_INCREF(Py_None);
16517 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
16518 __pyx_v_pytype_name = Py_None; __Pyx_INCREF(Py_None);
16520 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1576
16521 * cdef PyType pytype, empty_pytype, StrType, NoneType
16523 * if not annotate_xsi and not annotate_pytype: # <<<<<<<<<<<<<<
16527 if ((!__pyx_v_annotate_xsi)) {
16528 __pyx_t_1 = (!__pyx_v_annotate_pytype);
16530 __pyx_t_1 = (!__pyx_v_annotate_xsi);
16534 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1577
16536 * if not annotate_xsi and not annotate_pytype:
16537 * return # <<<<<<<<<<<<<<
16539 * doc = element._doc
16541 __Pyx_XDECREF(__pyx_r);
16542 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16548 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1579
16551 * doc = element._doc # <<<<<<<<<<<<<<
16553 * if empty_type_name is not None:
16555 __Pyx_INCREF(((PyObject *)__pyx_v_element->_doc));
16556 __Pyx_DECREF(((PyObject *)__pyx_v_doc));
16557 __pyx_v_doc = __pyx_v_element->_doc;
16559 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1581
16560 * doc = element._doc
16562 * if empty_type_name is not None: # <<<<<<<<<<<<<<
16563 * if python.PyString_Check(empty_type_name):
16564 * empty_type_name = python.PyUnicode_FromEncodedObject(
16566 __pyx_t_1 = (__pyx_v_empty_type_name != Py_None);
16569 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1582
16571 * if empty_type_name is not None:
16572 * if python.PyString_Check(empty_type_name): # <<<<<<<<<<<<<<
16573 * empty_type_name = python.PyUnicode_FromEncodedObject(
16574 * empty_type_name, "ASCII", NULL)
16576 __pyx_t_1 = PyString_Check(__pyx_v_empty_type_name);
16579 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1584
16580 * if python.PyString_Check(empty_type_name):
16581 * empty_type_name = python.PyUnicode_FromEncodedObject(
16582 * empty_type_name, "ASCII", NULL) # <<<<<<<<<<<<<<
16583 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
16584 * elif empty_pytype_name is not None:
16586 __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_empty_type_name, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16587 __Pyx_GOTREF(__pyx_t_2);
16588 __Pyx_DECREF(__pyx_v_empty_type_name);
16589 __pyx_v_empty_type_name = __pyx_t_2;
16595 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1585
16596 * empty_type_name = python.PyUnicode_FromEncodedObject(
16597 * empty_type_name, "ASCII", NULL)
16598 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name) # <<<<<<<<<<<<<<
16599 * elif empty_pytype_name is not None:
16600 * if python.PyString_Check(empty_pytype_name):
16602 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_empty_type_name);
16606 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1586
16607 * empty_type_name, "ASCII", NULL)
16608 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
16609 * elif empty_pytype_name is not None: # <<<<<<<<<<<<<<
16610 * if python.PyString_Check(empty_pytype_name):
16611 * empty_pytype_name = python.PyUnicode_FromEncodedObject(
16613 __pyx_t_1 = (__pyx_v_empty_pytype_name != Py_None);
16616 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1587
16617 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, empty_type_name)
16618 * elif empty_pytype_name is not None:
16619 * if python.PyString_Check(empty_pytype_name): # <<<<<<<<<<<<<<
16620 * empty_pytype_name = python.PyUnicode_FromEncodedObject(
16621 * empty_pytype_name, "ASCII", NULL)
16623 __pyx_t_1 = PyString_Check(__pyx_v_empty_pytype_name);
16626 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1589
16627 * if python.PyString_Check(empty_pytype_name):
16628 * empty_pytype_name = python.PyUnicode_FromEncodedObject(
16629 * empty_pytype_name, "ASCII", NULL) # <<<<<<<<<<<<<<
16630 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
16633 __pyx_t_2 = PyUnicode_FromEncodedObject(__pyx_v_empty_pytype_name, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16634 __Pyx_GOTREF(__pyx_t_2);
16635 __Pyx_DECREF(__pyx_v_empty_pytype_name);
16636 __pyx_v_empty_pytype_name = __pyx_t_2;
16642 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1590
16643 * empty_pytype_name = python.PyUnicode_FromEncodedObject(
16644 * empty_pytype_name, "ASCII", NULL)
16645 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name) # <<<<<<<<<<<<<<
16647 * dict_result = NULL
16649 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_empty_pytype_name);
16654 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1592
16655 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, empty_pytype_name)
16657 * dict_result = NULL # <<<<<<<<<<<<<<
16658 * if dict_result is not NULL:
16659 * empty_pytype = <PyType>dict_result
16661 __pyx_v_dict_result = NULL;
16665 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1593
16667 * dict_result = NULL
16668 * if dict_result is not NULL: # <<<<<<<<<<<<<<
16669 * empty_pytype = <PyType>dict_result
16672 __pyx_t_1 = (__pyx_v_dict_result != NULL);
16675 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1594
16676 * dict_result = NULL
16677 * if dict_result is not NULL:
16678 * empty_pytype = <PyType>dict_result # <<<<<<<<<<<<<<
16680 * empty_pytype = None
16682 __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
16683 __Pyx_DECREF(((PyObject *)__pyx_v_empty_pytype));
16684 __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
16689 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1596
16690 * empty_pytype = <PyType>dict_result
16692 * empty_pytype = None # <<<<<<<<<<<<<<
16694 * StrType = _PYTYPE_DICT.get(u'str')
16696 __Pyx_INCREF(Py_None);
16697 __Pyx_DECREF(((PyObject *)__pyx_v_empty_pytype));
16698 __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
16702 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1598
16703 * empty_pytype = None
16705 * StrType = _PYTYPE_DICT.get(u'str') # <<<<<<<<<<<<<<
16706 * NoneType = _PYTYPE_DICT.get(u'NoneType')
16707 * c_node = element._c_node
16709 __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_n_ui_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16710 __Pyx_GOTREF(__pyx_t_2);
16711 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16712 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
16713 __Pyx_INCREF(((PyObject *)__pyx_n_u_str));
16714 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_str));
16715 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_str));
16716 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16717 __Pyx_GOTREF(__pyx_t_4);
16718 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16719 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
16720 if (!(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_9objectify_PyType))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16721 __Pyx_DECREF(((PyObject *)__pyx_v_StrType));
16722 __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
16725 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1599
16727 * StrType = _PYTYPE_DICT.get(u'str')
16728 * NoneType = _PYTYPE_DICT.get(u'NoneType') # <<<<<<<<<<<<<<
16729 * c_node = element._c_node
16730 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16732 __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_n_ui_get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16733 __Pyx_GOTREF(__pyx_t_4);
16734 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16735 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
16736 __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
16737 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_n_u_NoneType));
16738 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NoneType));
16739 __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16740 __Pyx_GOTREF(__pyx_t_2);
16741 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16742 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
16743 if (!(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_9objectify_PyType))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16744 __Pyx_DECREF(((PyObject *)__pyx_v_NoneType));
16745 __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2);
16748 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1600
16749 * StrType = _PYTYPE_DICT.get(u'str')
16750 * NoneType = _PYTYPE_DICT.get(u'NoneType')
16751 * c_node = element._c_node # <<<<<<<<<<<<<<
16752 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16753 * if c_node.type == tree.XML_ELEMENT_NODE:
16755 __pyx_v_c_node = __pyx_v_element->_c_node;
16757 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1601
16758 * NoneType = _PYTYPE_DICT.get(u'NoneType')
16759 * c_node = element._c_node
16760 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1) # <<<<<<<<<<<<<<
16761 * if c_node.type == tree.XML_ELEMENT_NODE:
16764 BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1);
16766 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1602
16767 * c_node = element._c_node
16768 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16769 * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<<
16773 __pyx_t_1 = (__pyx_v_c_node->type == XML_ELEMENT_NODE);
16776 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1603
16777 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1)
16778 * if c_node.type == tree.XML_ELEMENT_NODE:
16779 * typename = None # <<<<<<<<<<<<<<
16783 __Pyx_INCREF(Py_None);
16784 __Pyx_DECREF(__pyx_v_typename);
16785 __pyx_v_typename = Py_None;
16787 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1604
16788 * if c_node.type == tree.XML_ELEMENT_NODE:
16790 * pytype = None # <<<<<<<<<<<<<<
16794 __Pyx_INCREF(Py_None);
16795 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
16796 __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None);
16798 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1605
16801 * value = None # <<<<<<<<<<<<<<
16803 * # if element is defined as xsi:nil, represent it as None
16805 __Pyx_INCREF(Py_None);
16806 __Pyx_DECREF(__pyx_v_value);
16807 __pyx_v_value = Py_None;
16809 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1606
16812 * istree = 0 # <<<<<<<<<<<<<<
16813 * # if element is defined as xsi:nil, represent it as None
16814 * if cetree.attributeValueFromNsName(
16816 __Pyx_INCREF(__pyx_int_0);
16817 __Pyx_DECREF(__pyx_v_istree);
16818 __pyx_v_istree = __pyx_int_0;
16820 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1609
16821 * # if element is defined as xsi:nil, represent it as None
16822 * if cetree.attributeValueFromNsName(
16823 * c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == u"true": # <<<<<<<<<<<<<<
16824 * pytype = NoneType
16827 __pyx_t_2 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_nil); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16828 __Pyx_GOTREF(__pyx_t_2);
16829 __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_n_u_true), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16830 __Pyx_GOTREF(__pyx_t_3);
16831 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16832 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16833 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16836 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1610
16837 * if cetree.attributeValueFromNsName(
16838 * c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == u"true":
16839 * pytype = NoneType # <<<<<<<<<<<<<<
16841 * if pytype is None and not ignore_xsi:
16843 __Pyx_INCREF(((PyObject *)__pyx_v_NoneType));
16844 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
16845 __pyx_v_pytype = __pyx_v_NoneType;
16850 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1612
16851 * pytype = NoneType
16853 * if pytype is None and not ignore_xsi: # <<<<<<<<<<<<<<
16854 * # check that old xsi type value is valid
16855 * typename = cetree.attributeValueFromNsName(
16857 __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
16859 __pyx_t_5 = (!__pyx_v_ignore_xsi);
16861 __pyx_t_5 = __pyx_t_1;
16865 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1615
16866 * # check that old xsi type value is valid
16867 * typename = cetree.attributeValueFromNsName(
16868 * c_node, _XML_SCHEMA_INSTANCE_NS, "type") # <<<<<<<<<<<<<<
16869 * if typename is not None:
16870 * dict_result = python.PyDict_GetItem(
16872 __pyx_t_3 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16873 __Pyx_GOTREF(__pyx_t_3);
16874 __Pyx_DECREF(__pyx_v_typename);
16875 __pyx_v_typename = __pyx_t_3;
16878 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1616
16879 * typename = cetree.attributeValueFromNsName(
16880 * c_node, _XML_SCHEMA_INSTANCE_NS, "type")
16881 * if typename is not None: # <<<<<<<<<<<<<<
16882 * dict_result = python.PyDict_GetItem(
16883 * _SCHEMA_TYPE_DICT, typename)
16885 __pyx_t_5 = (__pyx_v_typename != Py_None);
16888 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1618
16889 * if typename is not None:
16890 * dict_result = python.PyDict_GetItem(
16891 * _SCHEMA_TYPE_DICT, typename) # <<<<<<<<<<<<<<
16892 * if dict_result is NULL and u':' in typename:
16893 * prefix, typename = typename.split(u':', 1)
16895 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_typename);
16897 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1619
16898 * dict_result = python.PyDict_GetItem(
16899 * _SCHEMA_TYPE_DICT, typename)
16900 * if dict_result is NULL and u':' in typename: # <<<<<<<<<<<<<<
16901 * prefix, typename = typename.split(u':', 1)
16902 * dict_result = python.PyDict_GetItem(
16904 if ((__pyx_v_dict_result == NULL)) {
16905 __pyx_t_5 = (PySequence_Contains(__pyx_v_typename, ((PyObject *)__pyx_kp_u_32))); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16906 __pyx_t_1 = __pyx_t_5;
16908 __pyx_t_1 = (__pyx_v_dict_result == NULL);
16912 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1620
16913 * _SCHEMA_TYPE_DICT, typename)
16914 * if dict_result is NULL and u':' in typename:
16915 * prefix, typename = typename.split(u':', 1) # <<<<<<<<<<<<<<
16916 * dict_result = python.PyDict_GetItem(
16917 * _SCHEMA_TYPE_DICT, typename)
16919 __pyx_t_3 = PyObject_GetAttr(__pyx_v_typename, __pyx_n_ui_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16920 __Pyx_GOTREF(__pyx_t_3);
16921 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16922 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
16923 __Pyx_INCREF(((PyObject *)__pyx_kp_u_32));
16924 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_kp_u_32));
16925 __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_32));
16926 __Pyx_INCREF(__pyx_int_1);
16927 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_1);
16928 __Pyx_GIVEREF(__pyx_int_1);
16929 __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16930 __Pyx_GOTREF(__pyx_t_4);
16931 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16932 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
16933 if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
16934 PyObject* tuple = __pyx_t_4;
16935 __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
16936 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
16937 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16938 __Pyx_DECREF(__pyx_v_prefix);
16939 __pyx_v_prefix = __pyx_t_2;
16941 __Pyx_DECREF(__pyx_v_typename);
16942 __pyx_v_typename = __pyx_t_3;
16945 __pyx_t_6 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16946 __Pyx_GOTREF(__pyx_t_6);
16947 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16948 __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16949 __Pyx_GOTREF(__pyx_t_2);
16950 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16951 __Pyx_GOTREF(__pyx_t_3);
16952 if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16953 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
16954 __Pyx_DECREF(__pyx_v_prefix);
16955 __pyx_v_prefix = __pyx_t_2;
16957 __Pyx_DECREF(__pyx_v_typename);
16958 __pyx_v_typename = __pyx_t_3;
16962 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1622
16963 * prefix, typename = typename.split(u':', 1)
16964 * dict_result = python.PyDict_GetItem(
16965 * _SCHEMA_TYPE_DICT, typename) # <<<<<<<<<<<<<<
16966 * if dict_result is not NULL:
16967 * pytype = <PyType>dict_result
16969 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_typename);
16974 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1623
16975 * dict_result = python.PyDict_GetItem(
16976 * _SCHEMA_TYPE_DICT, typename)
16977 * if dict_result is not NULL: # <<<<<<<<<<<<<<
16978 * pytype = <PyType>dict_result
16979 * if pytype is not StrType:
16981 __pyx_t_1 = (__pyx_v_dict_result != NULL);
16984 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1624
16985 * _SCHEMA_TYPE_DICT, typename)
16986 * if dict_result is not NULL:
16987 * pytype = <PyType>dict_result # <<<<<<<<<<<<<<
16988 * if pytype is not StrType:
16989 * # StrType does not have a typecheck but is the default
16991 __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
16992 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
16993 __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
16995 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1625
16996 * if dict_result is not NULL:
16997 * pytype = <PyType>dict_result
16998 * if pytype is not StrType: # <<<<<<<<<<<<<<
16999 * # StrType does not have a typecheck but is the default
17000 * # anyway, so just accept it if given as type
17002 __pyx_t_1 = (__pyx_v_pytype != __pyx_v_StrType);
17005 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1629
17006 * # anyway, so just accept it if given as type
17008 * pytype = _check_type(c_node, pytype) # <<<<<<<<<<<<<<
17009 * if pytype is None:
17012 __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17013 __Pyx_GOTREF(__pyx_t_4);
17014 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17015 __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
17018 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1630
17020 * pytype = _check_type(c_node, pytype)
17021 * if pytype is None: # <<<<<<<<<<<<<<
17025 __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
17028 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1631
17029 * pytype = _check_type(c_node, pytype)
17030 * if pytype is None:
17031 * typename = None # <<<<<<<<<<<<<<
17033 * if pytype is None and not ignore_pytype:
17035 __Pyx_INCREF(Py_None);
17036 __Pyx_DECREF(__pyx_v_typename);
17037 __pyx_v_typename = Py_None;
17054 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1633
17057 * if pytype is None and not ignore_pytype: # <<<<<<<<<<<<<<
17058 * # check that old pytype value is valid
17059 * old_pytypename = cetree.attributeValueFromNsName(
17061 __pyx_t_1 = (((PyObject *)__pyx_v_pytype) == Py_None);
17063 __pyx_t_5 = (!__pyx_v_ignore_pytype);
17065 __pyx_t_5 = __pyx_t_1;
17069 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1636
17070 * # check that old pytype value is valid
17071 * old_pytypename = cetree.attributeValueFromNsName(
17072 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) # <<<<<<<<<<<<<<
17073 * if old_pytypename is not None:
17074 * if old_pytypename == TREE_PYTYPE_NAME:
17076 __pyx_t_4 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17077 __Pyx_GOTREF(__pyx_t_4);
17078 __Pyx_DECREF(__pyx_v_old_pytypename);
17079 __pyx_v_old_pytypename = __pyx_t_4;
17082 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1637
17083 * old_pytypename = cetree.attributeValueFromNsName(
17084 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
17085 * if old_pytypename is not None: # <<<<<<<<<<<<<<
17086 * if old_pytypename == TREE_PYTYPE_NAME:
17087 * if not cetree.hasChild(c_node):
17089 __pyx_t_5 = (__pyx_v_old_pytypename != Py_None);
17092 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1638
17093 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
17094 * if old_pytypename is not None:
17095 * if old_pytypename == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<<
17096 * if not cetree.hasChild(c_node):
17097 * # only case where we should keep it,
17099 __pyx_t_4 = PyObject_RichCompare(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17100 __Pyx_GOTREF(__pyx_t_4);
17101 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17102 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17105 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1639
17106 * if old_pytypename is not None:
17107 * if old_pytypename == TREE_PYTYPE_NAME:
17108 * if not cetree.hasChild(c_node): # <<<<<<<<<<<<<<
17109 * # only case where we should keep it,
17110 * # everything else is clear enough
17112 __pyx_t_5 = (!hasChild(__pyx_v_c_node));
17115 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1642
17116 * # only case where we should keep it,
17117 * # everything else is clear enough
17118 * pytype = TREE_PYTYPE # <<<<<<<<<<<<<<
17120 * if old_pytypename == u'none':
17122 __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
17123 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17124 __pyx_v_pytype = __pyx_v_4lxml_9objectify_TREE_PYTYPE;
17132 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1644
17133 * pytype = TREE_PYTYPE
17135 * if old_pytypename == u'none': # <<<<<<<<<<<<<<
17136 * # transition from lxml 1.x
17137 * old_pytypename = u"NoneType"
17139 __pyx_t_4 = PyObject_RichCompare(__pyx_v_old_pytypename, ((PyObject *)__pyx_n_u_none), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17140 __Pyx_GOTREF(__pyx_t_4);
17141 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17142 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17145 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1646
17146 * if old_pytypename == u'none':
17147 * # transition from lxml 1.x
17148 * old_pytypename = u"NoneType" # <<<<<<<<<<<<<<
17149 * dict_result = python.PyDict_GetItem(
17150 * _PYTYPE_DICT, old_pytypename)
17152 __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
17153 __Pyx_DECREF(__pyx_v_old_pytypename);
17154 __pyx_v_old_pytypename = ((PyObject *)__pyx_n_u_NoneType);
17159 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1648
17160 * old_pytypename = u"NoneType"
17161 * dict_result = python.PyDict_GetItem(
17162 * _PYTYPE_DICT, old_pytypename) # <<<<<<<<<<<<<<
17163 * if dict_result is not NULL:
17164 * pytype = <PyType>dict_result
17166 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v_old_pytypename);
17168 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1649
17169 * dict_result = python.PyDict_GetItem(
17170 * _PYTYPE_DICT, old_pytypename)
17171 * if dict_result is not NULL: # <<<<<<<<<<<<<<
17172 * pytype = <PyType>dict_result
17173 * if pytype is not StrType:
17175 __pyx_t_5 = (__pyx_v_dict_result != NULL);
17178 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1650
17179 * _PYTYPE_DICT, old_pytypename)
17180 * if dict_result is not NULL:
17181 * pytype = <PyType>dict_result # <<<<<<<<<<<<<<
17182 * if pytype is not StrType:
17183 * # StrType does not have a typecheck but is the
17185 __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)));
17186 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17187 __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result);
17189 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1651
17190 * if dict_result is not NULL:
17191 * pytype = <PyType>dict_result
17192 * if pytype is not StrType: # <<<<<<<<<<<<<<
17193 * # StrType does not have a typecheck but is the
17194 * # default anyway, so just accept it if given as
17196 __pyx_t_5 = (__pyx_v_pytype != __pyx_v_StrType);
17199 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1655
17200 * # default anyway, so just accept it if given as
17201 * # type information
17202 * pytype = _check_type(c_node, pytype) # <<<<<<<<<<<<<<
17204 * if pytype is None:
17206 __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17207 __Pyx_GOTREF(__pyx_t_4);
17208 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17209 __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
17226 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1657
17227 * pytype = _check_type(c_node, pytype)
17229 * if pytype is None: # <<<<<<<<<<<<<<
17230 * # try to guess type
17231 * if not cetree.hasChild(c_node):
17233 __pyx_t_5 = (((PyObject *)__pyx_v_pytype) == Py_None);
17236 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1659
17237 * if pytype is None:
17238 * # try to guess type
17239 * if not cetree.hasChild(c_node): # <<<<<<<<<<<<<<
17240 * # element has no children => data class
17241 * pytype = _guessPyType(textOf(c_node), StrType)
17243 __pyx_t_5 = (!hasChild(__pyx_v_c_node));
17246 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1661
17247 * if not cetree.hasChild(c_node):
17248 * # element has no children => data class
17249 * pytype = _guessPyType(textOf(c_node), StrType) # <<<<<<<<<<<<<<
17253 __pyx_t_4 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17254 __Pyx_GOTREF(__pyx_t_4);
17255 __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_t_4, __pyx_v_StrType)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17256 __Pyx_GOTREF(__pyx_t_3);
17257 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17258 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17259 __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3);
17265 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1663
17266 * pytype = _guessPyType(textOf(c_node), StrType)
17268 * istree = 1 # <<<<<<<<<<<<<<
17270 * if pytype is None:
17272 __Pyx_INCREF(__pyx_int_1);
17273 __Pyx_DECREF(__pyx_v_istree);
17274 __pyx_v_istree = __pyx_int_1;
17281 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1665
17284 * if pytype is None: # <<<<<<<<<<<<<<
17285 * # use default type for empty elements
17286 * if cetree.hasText(c_node):
17288 __pyx_t_5 = (((PyObject *)__pyx_v_pytype) == Py_None);
17291 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1667
17292 * if pytype is None:
17293 * # use default type for empty elements
17294 * if cetree.hasText(c_node): # <<<<<<<<<<<<<<
17298 __pyx_t_5 = hasText(__pyx_v_c_node);
17301 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1668
17302 * # use default type for empty elements
17303 * if cetree.hasText(c_node):
17304 * pytype = StrType # <<<<<<<<<<<<<<
17306 * pytype = empty_pytype
17308 __Pyx_INCREF(((PyObject *)__pyx_v_StrType));
17309 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17310 __pyx_v_pytype = __pyx_v_StrType;
17315 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1670
17318 * pytype = empty_pytype # <<<<<<<<<<<<<<
17319 * if typename is None:
17320 * typename = empty_type_name
17322 __Pyx_INCREF(((PyObject *)__pyx_v_empty_pytype));
17323 __Pyx_DECREF(((PyObject *)__pyx_v_pytype));
17324 __pyx_v_pytype = __pyx_v_empty_pytype;
17326 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1671
17328 * pytype = empty_pytype
17329 * if typename is None: # <<<<<<<<<<<<<<
17330 * typename = empty_type_name
17333 __pyx_t_5 = (__pyx_v_typename == Py_None);
17336 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1672
17337 * pytype = empty_pytype
17338 * if typename is None:
17339 * typename = empty_type_name # <<<<<<<<<<<<<<
17341 * if pytype is not None:
17343 __Pyx_INCREF(__pyx_v_empty_type_name);
17344 __Pyx_DECREF(__pyx_v_typename);
17345 __pyx_v_typename = __pyx_v_empty_type_name;
17355 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1674
17356 * typename = empty_type_name
17358 * if pytype is not None: # <<<<<<<<<<<<<<
17359 * if typename is None:
17362 __pyx_t_5 = (((PyObject *)__pyx_v_pytype) != Py_None);
17365 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1675
17367 * if pytype is not None:
17368 * if typename is None: # <<<<<<<<<<<<<<
17370 * if python.PyList_GET_SIZE(pytype._schema_types) > 0:
17372 __pyx_t_5 = (__pyx_v_typename == Py_None);
17375 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1676
17376 * if pytype is not None:
17377 * if typename is None:
17378 * if not istree: # <<<<<<<<<<<<<<
17379 * if python.PyList_GET_SIZE(pytype._schema_types) > 0:
17380 * # pytype->xsi:type is a 1:n mapping
17382 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_istree); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17383 __pyx_t_1 = (!__pyx_t_5);
17386 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1677
17387 * if typename is None:
17389 * if python.PyList_GET_SIZE(pytype._schema_types) > 0: # <<<<<<<<<<<<<<
17390 * # pytype->xsi:type is a 1:n mapping
17391 * # simply take the first
17393 __pyx_t_1 = (PyList_GET_SIZE(((PyObject *)__pyx_v_pytype->_schema_types)) > 0);
17396 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1680
17397 * # pytype->xsi:type is a 1:n mapping
17398 * # simply take the first
17399 * typename = pytype._schema_types[0] # <<<<<<<<<<<<<<
17400 * elif typename not in pytype._schema_types:
17401 * typename = pytype._schema_types[0]
17403 __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17404 __Pyx_GOTREF(__pyx_t_3);
17405 __Pyx_DECREF(__pyx_v_typename);
17406 __pyx_v_typename = __pyx_t_3;
17417 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1681
17418 * # simply take the first
17419 * typename = pytype._schema_types[0]
17420 * elif typename not in pytype._schema_types: # <<<<<<<<<<<<<<
17421 * typename = pytype._schema_types[0]
17424 __pyx_t_1 = (!PySequence_Contains(((PyObject *)__pyx_v_pytype->_schema_types), __pyx_v_typename)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17427 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1682
17428 * typename = pytype._schema_types[0]
17429 * elif typename not in pytype._schema_types:
17430 * typename = pytype._schema_types[0] # <<<<<<<<<<<<<<
17434 __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_pytype->_schema_types), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17435 __Pyx_GOTREF(__pyx_t_3);
17436 __Pyx_DECREF(__pyx_v_typename);
17437 __pyx_v_typename = __pyx_t_3;
17446 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1684
17447 * typename = pytype._schema_types[0]
17449 * if annotate_xsi: # <<<<<<<<<<<<<<
17450 * if typename is None or istree:
17451 * cetree.delAttributeFromNsName(
17453 __pyx_t_1 = __pyx_v_annotate_xsi;
17456 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1685
17459 * if typename is None or istree: # <<<<<<<<<<<<<<
17460 * cetree.delAttributeFromNsName(
17461 * c_node, _XML_SCHEMA_INSTANCE_NS, "type")
17463 __pyx_t_1 = (__pyx_v_typename == Py_None);
17465 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_istree); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17466 __pyx_t_7 = __pyx_t_5;
17468 __pyx_t_7 = __pyx_t_1;
17472 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1687
17473 * if typename is None or istree:
17474 * cetree.delAttributeFromNsName(
17475 * c_node, _XML_SCHEMA_INSTANCE_NS, "type") # <<<<<<<<<<<<<<
17477 * # update or create attribute
17479 delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_type);
17484 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1690
17486 * # update or create attribute
17487 * typename_utf8 = cetree.utf8(typename) # <<<<<<<<<<<<<<
17488 * c_ns = cetree.findOrBuildNodeNsPrefix(
17489 * doc, c_node, _XML_SCHEMA_NS, 'xsd')
17491 __pyx_t_3 = utf8(__pyx_v_typename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17492 __Pyx_GOTREF(__pyx_t_3);
17493 __Pyx_DECREF(__pyx_v_typename_utf8);
17494 __pyx_v_typename_utf8 = __pyx_t_3;
17497 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1692
17498 * typename_utf8 = cetree.utf8(typename)
17499 * c_ns = cetree.findOrBuildNodeNsPrefix(
17500 * doc, c_node, _XML_SCHEMA_NS, 'xsd') # <<<<<<<<<<<<<<
17501 * if c_ns is not NULL:
17502 * if ':' in typename_utf8:
17504 __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_NS, __pyx_k_xsd);
17506 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1693
17507 * c_ns = cetree.findOrBuildNodeNsPrefix(
17508 * doc, c_node, _XML_SCHEMA_NS, 'xsd')
17509 * if c_ns is not NULL: # <<<<<<<<<<<<<<
17510 * if ':' in typename_utf8:
17511 * prefix, name = typename_utf8.split(':', 1)
17513 __pyx_t_7 = (__pyx_v_c_ns != NULL);
17516 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1694
17517 * doc, c_node, _XML_SCHEMA_NS, 'xsd')
17518 * if c_ns is not NULL:
17519 * if ':' in typename_utf8: # <<<<<<<<<<<<<<
17520 * prefix, name = typename_utf8.split(':', 1)
17521 * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17523 __pyx_t_7 = (PySequence_Contains(__pyx_v_typename_utf8, ((PyObject *)__pyx_kp_b_32))); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17526 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1695
17527 * if c_ns is not NULL:
17528 * if ':' in typename_utf8:
17529 * prefix, name = typename_utf8.split(':', 1) # <<<<<<<<<<<<<<
17530 * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17531 * typename_utf8 = name
17533 __pyx_t_3 = PyObject_GetAttr(__pyx_v_typename_utf8, __pyx_n_ui_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17534 __Pyx_GOTREF(__pyx_t_3);
17535 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17536 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
17537 __Pyx_INCREF(((PyObject *)__pyx_kp_b_32));
17538 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_b_32));
17539 __Pyx_GIVEREF(((PyObject *)__pyx_kp_b_32));
17540 __Pyx_INCREF(__pyx_int_1);
17541 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
17542 __Pyx_GIVEREF(__pyx_int_1);
17543 __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17544 __Pyx_GOTREF(__pyx_t_2);
17545 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17546 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
17547 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
17548 PyObject* tuple = __pyx_t_2;
17549 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
17550 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
17551 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17552 __Pyx_DECREF(__pyx_v_prefix);
17553 __pyx_v_prefix = __pyx_t_4;
17555 __Pyx_DECREF(__pyx_v_name);
17556 __pyx_v_name = __pyx_t_3;
17559 __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17560 __Pyx_GOTREF(__pyx_t_6);
17561 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17562 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17563 __Pyx_GOTREF(__pyx_t_4);
17564 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17565 __Pyx_GOTREF(__pyx_t_3);
17566 if (__Pyx_EndUnpack(__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17567 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17568 __Pyx_DECREF(__pyx_v_prefix);
17569 __pyx_v_prefix = __pyx_t_4;
17571 __Pyx_DECREF(__pyx_v_name);
17572 __pyx_v_name = __pyx_t_3;
17576 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1696
17577 * if ':' in typename_utf8:
17578 * prefix, name = typename_utf8.split(':', 1)
17579 * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': # <<<<<<<<<<<<<<
17580 * typename_utf8 = name
17581 * elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17583 if (!(__pyx_v_c_ns->prefix == NULL)) {
17584 __pyx_t_7 = ((__pyx_v_c_ns->prefix[0]) == '\x00');
17586 __pyx_t_7 = (__pyx_v_c_ns->prefix == NULL);
17590 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1697
17591 * prefix, name = typename_utf8.split(':', 1)
17592 * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17593 * typename_utf8 = name # <<<<<<<<<<<<<<
17594 * elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17595 * prefix = c_ns.prefix
17597 __Pyx_INCREF(__pyx_v_name);
17598 __Pyx_DECREF(__pyx_v_typename_utf8);
17599 __pyx_v_typename_utf8 = __pyx_v_name;
17603 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1698
17604 * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0':
17605 * typename_utf8 = name
17606 * elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0: # <<<<<<<<<<<<<<
17607 * prefix = c_ns.prefix
17608 * typename_utf8 = prefix + ':' + name
17610 __pyx_t_7 = (strcmp(PyString_AS_STRING(__pyx_v_prefix), __pyx_v_c_ns->prefix) != 0);
17613 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1699
17614 * typename_utf8 = name
17615 * elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17616 * prefix = c_ns.prefix # <<<<<<<<<<<<<<
17617 * typename_utf8 = prefix + ':' + name
17618 * elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17620 __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17621 __Pyx_GOTREF(__pyx_t_2);
17622 __Pyx_DECREF(__pyx_v_prefix);
17623 __pyx_v_prefix = __pyx_t_2;
17626 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1700
17627 * elif cstd.strcmp(_cstr(prefix), c_ns.prefix) != 0:
17628 * prefix = c_ns.prefix
17629 * typename_utf8 = prefix + ':' + name # <<<<<<<<<<<<<<
17630 * elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17631 * prefix = c_ns.prefix
17633 __pyx_t_2 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_b_32)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17634 __Pyx_GOTREF(__pyx_t_2);
17635 __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17636 __Pyx_GOTREF(__pyx_t_3);
17637 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
17638 __Pyx_DECREF(__pyx_v_typename_utf8);
17639 __pyx_v_typename_utf8 = __pyx_t_3;
17647 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1701
17648 * prefix = c_ns.prefix
17649 * typename_utf8 = prefix + ':' + name
17650 * elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0': # <<<<<<<<<<<<<<
17651 * prefix = c_ns.prefix
17652 * typename_utf8 = prefix + ':' + typename_utf8
17654 if (!(__pyx_v_c_ns->prefix != NULL)) {
17655 __pyx_t_7 = ((__pyx_v_c_ns->prefix[0]) != '\x00');
17657 __pyx_t_7 = (__pyx_v_c_ns->prefix != NULL);
17661 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1702
17662 * typename_utf8 = prefix + ':' + name
17663 * elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17664 * prefix = c_ns.prefix # <<<<<<<<<<<<<<
17665 * typename_utf8 = prefix + ':' + typename_utf8
17666 * c_ns = cetree.findOrBuildNodeNsPrefix(
17668 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17669 __Pyx_GOTREF(__pyx_t_3);
17670 __Pyx_DECREF(__pyx_v_prefix);
17671 __pyx_v_prefix = __pyx_t_3;
17674 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1703
17675 * elif c_ns.prefix is not NULL or c_ns.prefix[0] != c'\0':
17676 * prefix = c_ns.prefix
17677 * typename_utf8 = prefix + ':' + typename_utf8 # <<<<<<<<<<<<<<
17678 * c_ns = cetree.findOrBuildNodeNsPrefix(
17679 * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17681 __pyx_t_3 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_b_32)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17682 __Pyx_GOTREF(__pyx_t_3);
17683 __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_typename_utf8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1703; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17684 __Pyx_GOTREF(__pyx_t_2);
17685 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17686 __Pyx_DECREF(__pyx_v_typename_utf8);
17687 __pyx_v_typename_utf8 = __pyx_t_2;
17696 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1705
17697 * typename_utf8 = prefix + ':' + typename_utf8
17698 * c_ns = cetree.findOrBuildNodeNsPrefix(
17699 * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi') # <<<<<<<<<<<<<<
17700 * tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))
17703 __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_xsi);
17705 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1706
17706 * c_ns = cetree.findOrBuildNodeNsPrefix(
17707 * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17708 * tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8)) # <<<<<<<<<<<<<<
17710 * if annotate_pytype:
17712 xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_k_type, PyString_AS_STRING(__pyx_v_typename_utf8));
17719 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1708
17720 * tree.xmlSetNsProp(c_node, c_ns, "type", _cstr(typename_utf8))
17722 * if annotate_pytype: # <<<<<<<<<<<<<<
17723 * if pytype is None:
17724 * # delete attribute if it exists
17726 __pyx_t_7 = __pyx_v_annotate_pytype;
17729 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1709
17731 * if annotate_pytype:
17732 * if pytype is None: # <<<<<<<<<<<<<<
17733 * # delete attribute if it exists
17734 * cetree.delAttributeFromNsName(
17736 __pyx_t_7 = (((PyObject *)__pyx_v_pytype) == Py_None);
17739 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1712
17740 * # delete attribute if it exists
17741 * cetree.delAttributeFromNsName(
17742 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) # <<<<<<<<<<<<<<
17744 * # update or create attribute
17746 delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME);
17751 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1716
17752 * # update or create attribute
17753 * c_ns = cetree.findOrBuildNodeNsPrefix(
17754 * doc, c_node, _PYTYPE_NAMESPACE, 'py') # <<<<<<<<<<<<<<
17755 * pytype_name = cetree.utf8(pytype.name)
17756 * tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17758 __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_k_py);
17760 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1717
17761 * c_ns = cetree.findOrBuildNodeNsPrefix(
17762 * doc, c_node, _PYTYPE_NAMESPACE, 'py')
17763 * pytype_name = cetree.utf8(pytype.name) # <<<<<<<<<<<<<<
17764 * tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17765 * _cstr(pytype_name))
17767 __pyx_t_2 = utf8(__pyx_v_pytype->name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17768 __Pyx_GOTREF(__pyx_t_2);
17769 __Pyx_DECREF(__pyx_v_pytype_name);
17770 __pyx_v_pytype_name = __pyx_t_2;
17773 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1719
17774 * pytype_name = cetree.utf8(pytype.name)
17775 * tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17776 * _cstr(pytype_name)) # <<<<<<<<<<<<<<
17777 * if pytype is NoneType:
17778 * c_ns = cetree.findOrBuildNodeNsPrefix(
17780 xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME, PyString_AS_STRING(__pyx_v_pytype_name));
17782 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1720
17783 * tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME,
17784 * _cstr(pytype_name))
17785 * if pytype is NoneType: # <<<<<<<<<<<<<<
17786 * c_ns = cetree.findOrBuildNodeNsPrefix(
17787 * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17789 __pyx_t_7 = (__pyx_v_pytype == __pyx_v_NoneType);
17792 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1722
17793 * if pytype is NoneType:
17794 * c_ns = cetree.findOrBuildNodeNsPrefix(
17795 * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi') # <<<<<<<<<<<<<<
17796 * tree.xmlSetNsProp(c_node, c_ns, "nil", "true")
17797 * tree.END_FOR_EACH_ELEMENT_FROM(c_node)
17799 __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, __pyx_k_xsi);
17801 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1723
17802 * c_ns = cetree.findOrBuildNodeNsPrefix(
17803 * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17804 * tree.xmlSetNsProp(c_node, c_ns, "nil", "true") # <<<<<<<<<<<<<<
17805 * tree.END_FOR_EACH_ELEMENT_FROM(c_node)
17808 xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_k_nil, __pyx_k_true);
17821 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1724
17822 * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi')
17823 * tree.xmlSetNsProp(c_node, c_ns, "nil", "true")
17824 * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<<
17826 * cdef object _strip_attributes = etree.strip_attributes
17828 END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
17830 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17833 __Pyx_XDECREF(__pyx_t_2);
17834 __Pyx_XDECREF(__pyx_t_3);
17835 __Pyx_XDECREF(__pyx_t_4);
17836 __Pyx_XDECREF(__pyx_t_6);
17837 __Pyx_AddTraceback("lxml.objectify._annotate");
17840 __Pyx_DECREF((PyObject *)__pyx_v_doc);
17841 __Pyx_DECREF((PyObject *)__pyx_v_pytype);
17842 __Pyx_DECREF((PyObject *)__pyx_v_empty_pytype);
17843 __Pyx_DECREF((PyObject *)__pyx_v_StrType);
17844 __Pyx_DECREF((PyObject *)__pyx_v_NoneType);
17845 __Pyx_DECREF(__pyx_v_typename);
17846 __Pyx_DECREF(__pyx_v_value);
17847 __Pyx_DECREF(__pyx_v_istree);
17848 __Pyx_DECREF(__pyx_v_prefix);
17849 __Pyx_DECREF(__pyx_v_old_pytypename);
17850 __Pyx_DECREF(__pyx_v_typename_utf8);
17851 __Pyx_DECREF(__pyx_v_name);
17852 __Pyx_DECREF(__pyx_v_pytype_name);
17853 __Pyx_DECREF((PyObject *)__pyx_v_element);
17854 __Pyx_DECREF(__pyx_v_empty_type_name);
17855 __Pyx_DECREF(__pyx_v_empty_pytype_name);
17856 __Pyx_XGIVEREF(__pyx_r);
17857 __Pyx_FinishRefcountContext();
17861 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1728
17862 * cdef object _strip_attributes = etree.strip_attributes
17864 * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False): # <<<<<<<<<<<<<<
17865 * u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)
17869 static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17870 static char __pyx_doc_4lxml_9objectify_deannotate[] = "deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)\n\n Recursively de-annotate the elements of an XML tree by removing 'py:pytype'\n and/or 'xsi:type' attributes and/or 'xsi:nil' attributes.\n\n If the 'pytype' keyword argument is True (the default), 'py:pytype'\n attributes will be removed. If the 'xsi' keyword argument is True (the \n default), 'xsi:type' attributes will be removed.\n If the 'xsi_nil' keyword argument is True (default: False), 'xsi:nil'\n attributes will be removed.\n\n Note that this does not touch the namespace declarations. If you\n want to remove unused namespace declarations from the tree, use\n ``lxml.etree.cleanup_namespaces()``.\n ";
17871 static PyObject *__pyx_pf_4lxml_9objectify_deannotate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17872 PyObject *__pyx_v_element_or_tree = 0;
17873 PyObject *__pyx_v_pytype = 0;
17874 PyObject *__pyx_v_xsi = 0;
17875 PyObject *__pyx_v_xsi_nil = 0;
17876 PyObject *__pyx_v_attribute_names = 0;
17877 PyObject *__pyx_r = NULL;
17878 PyObject *__pyx_t_1 = NULL;
17881 PyObject *__pyx_t_4 = NULL;
17882 PyObject *__pyx_t_5 = NULL;
17883 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_element_or_tree,&__pyx_n_ui_pytype,&__pyx_n_ui_xsi,&__pyx_n_ui_xsi_nil,0};
17884 __Pyx_SetupRefcountContext("deannotate");
17885 __pyx_self = __pyx_self;
17886 if (unlikely(__pyx_kwds)) {
17887 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
17888 PyObject* values[4] = {0,0,0,0};
17889 values[1] = __pyx_k_39;
17890 values[2] = __pyx_k_40;
17891 values[3] = __pyx_k_41;
17892 switch (PyTuple_GET_SIZE(__pyx_args)) {
17893 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17895 default: goto __pyx_L5_argtuple_error;
17897 switch (PyTuple_GET_SIZE(__pyx_args)) {
17899 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_element_or_tree);
17900 if (likely(values[0])) kw_args--;
17901 else goto __pyx_L5_argtuple_error;
17903 while (kw_args > 0) {
17905 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_pytype);
17906 if (value) { values[1] = value; if (!(--kw_args)) break; }
17907 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xsi);
17908 if (value) { values[2] = value; if (!(--kw_args)) break; }
17909 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xsi_nil);
17910 if (value) { values[3] = value; if (!(--kw_args)) break; }
17913 if (unlikely(kw_args > 0)) {
17914 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "deannotate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
17916 __pyx_v_element_or_tree = values[0];
17917 __pyx_v_pytype = values[1];
17918 __pyx_v_xsi = values[2];
17919 __pyx_v_xsi_nil = values[3];
17920 } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
17921 goto __pyx_L5_argtuple_error;
17923 __pyx_v_element_or_tree = PyTuple_GET_ITEM(__pyx_args, 0);
17924 __pyx_v_pytype = __pyx_k_39;
17925 __pyx_v_xsi = __pyx_k_40;
17926 __pyx_v_xsi_nil = __pyx_k_41;
17928 goto __pyx_L4_argument_unpacking_done;
17929 __pyx_L5_argtuple_error:;
17930 __Pyx_RaiseArgtupleInvalid("deannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
17932 __Pyx_AddTraceback("lxml.objectify.deannotate");
17934 __pyx_L4_argument_unpacking_done:;
17935 __Pyx_INCREF(__pyx_v_element_or_tree);
17936 __Pyx_INCREF(__pyx_v_pytype);
17937 __Pyx_INCREF(__pyx_v_xsi);
17938 __Pyx_INCREF(__pyx_v_xsi_nil);
17940 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1744
17941 * ``lxml.etree.cleanup_namespaces()``.
17943 * cdef list attribute_names = [] # <<<<<<<<<<<<<<
17947 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17948 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
17949 __pyx_v_attribute_names = __pyx_t_1;
17952 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1746
17953 * cdef list attribute_names = []
17955 * if pytype: # <<<<<<<<<<<<<<
17956 * attribute_names.append(PYTYPE_ATTRIBUTE)
17959 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pytype); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17962 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1747
17965 * attribute_names.append(PYTYPE_ATTRIBUTE) # <<<<<<<<<<<<<<
17967 * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
17969 if (unlikely(__pyx_v_attribute_names == Py_None)) {
17970 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17972 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17973 __Pyx_GOTREF(__pyx_t_1);
17974 __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17975 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
17980 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1748
17982 * attribute_names.append(PYTYPE_ATTRIBUTE)
17983 * if xsi: # <<<<<<<<<<<<<<
17984 * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
17987 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xsi); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17990 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1749
17991 * attribute_names.append(PYTYPE_ATTRIBUTE)
17993 * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR) # <<<<<<<<<<<<<<
17995 * attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
17997 if (unlikely(__pyx_v_attribute_names == Py_None)) {
17998 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18000 __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18005 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1750
18007 * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
18008 * if xsi_nil: # <<<<<<<<<<<<<<
18009 * attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
18012 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xsi_nil); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18015 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1751
18016 * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR)
18018 * attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR) # <<<<<<<<<<<<<<
18020 * _strip_attributes(element_or_tree, *attribute_names)
18022 if (unlikely(__pyx_v_attribute_names == Py_None)) {
18023 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18025 __pyx_t_3 = PyList_Append(((PyObject *)__pyx_v_attribute_names), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18030 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1753
18031 * attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR)
18033 * _strip_attributes(element_or_tree, *attribute_names) # <<<<<<<<<<<<<<
18035 * ################################################################################
18037 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18038 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
18039 __Pyx_INCREF(__pyx_v_element_or_tree);
18040 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_element_or_tree);
18041 __Pyx_GIVEREF(__pyx_v_element_or_tree);
18042 __pyx_t_4 = PySequence_Tuple(((PyObject *)__pyx_v_attribute_names)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18043 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
18044 __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18045 __Pyx_GOTREF(__pyx_t_5);
18046 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
18047 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
18048 __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18049 __Pyx_GOTREF(__pyx_t_4);
18050 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18051 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18053 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18056 __Pyx_XDECREF(__pyx_t_1);
18057 __Pyx_XDECREF(__pyx_t_4);
18058 __Pyx_XDECREF(__pyx_t_5);
18059 __Pyx_AddTraceback("lxml.objectify.deannotate");
18062 __Pyx_XDECREF(__pyx_v_attribute_names);
18063 __Pyx_DECREF(__pyx_v_element_or_tree);
18064 __Pyx_DECREF(__pyx_v_pytype);
18065 __Pyx_DECREF(__pyx_v_xsi);
18066 __Pyx_DECREF(__pyx_v_xsi_nil);
18067 __Pyx_XGIVEREF(__pyx_r);
18068 __Pyx_FinishRefcountContext();
18072 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1765
18073 * objectify_parser = __DEFAULT_PARSER
18075 * def set_default_parser(new_parser = None): # <<<<<<<<<<<<<<
18076 * u"""set_default_parser(new_parser = None)
18080 static PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18081 static char __pyx_doc_4lxml_9objectify_set_default_parser[] = "set_default_parser(new_parser = None)\n\n Replace the default parser used by objectify's Element() and\n fromstring() functions.\n\n The new parser must be an etree.XMLParser.\n\n Call without arguments to reset to the original parser.\n ";
18082 static PyObject *__pyx_pf_4lxml_9objectify_set_default_parser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18083 PyObject *__pyx_v_new_parser = 0;
18084 PyObject *__pyx_r = NULL;
18086 PyObject *__pyx_t_2 = NULL;
18087 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_new_parser,0};
18088 __Pyx_SetupRefcountContext("set_default_parser");
18089 __pyx_self = __pyx_self;
18090 if (unlikely(__pyx_kwds)) {
18091 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18092 PyObject* values[1] = {0};
18093 values[0] = ((PyObject *)Py_None);
18094 switch (PyTuple_GET_SIZE(__pyx_args)) {
18095 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18097 default: goto __pyx_L5_argtuple_error;
18099 switch (PyTuple_GET_SIZE(__pyx_args)) {
18102 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_new_parser);
18103 if (unlikely(value)) { values[0] = value; kw_args--; }
18106 if (unlikely(kw_args > 0)) {
18107 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "set_default_parser") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18109 __pyx_v_new_parser = values[0];
18111 __pyx_v_new_parser = ((PyObject *)Py_None);
18112 switch (PyTuple_GET_SIZE(__pyx_args)) {
18113 case 1: __pyx_v_new_parser = PyTuple_GET_ITEM(__pyx_args, 0);
18115 default: goto __pyx_L5_argtuple_error;
18118 goto __pyx_L4_argument_unpacking_done;
18119 __pyx_L5_argtuple_error:;
18120 __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18122 __Pyx_AddTraceback("lxml.objectify.set_default_parser");
18124 __pyx_L4_argument_unpacking_done:;
18125 __Pyx_INCREF(__pyx_v_new_parser);
18127 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1776
18129 * global objectify_parser
18130 * if new_parser is None: # <<<<<<<<<<<<<<
18131 * objectify_parser = __DEFAULT_PARSER
18132 * elif isinstance(new_parser, etree.XMLParser):
18134 __pyx_t_1 = (__pyx_v_new_parser == Py_None);
18137 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1777
18138 * global objectify_parser
18139 * if new_parser is None:
18140 * objectify_parser = __DEFAULT_PARSER # <<<<<<<<<<<<<<
18141 * elif isinstance(new_parser, etree.XMLParser):
18142 * objectify_parser = new_parser
18144 __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
18145 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
18146 __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
18147 __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
18148 __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;
18152 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1778
18153 * if new_parser is None:
18154 * objectify_parser = __DEFAULT_PARSER
18155 * elif isinstance(new_parser, etree.XMLParser): # <<<<<<<<<<<<<<
18156 * objectify_parser = new_parser
18159 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18160 __Pyx_GOTREF(__pyx_t_2);
18161 __pyx_t_1 = PyObject_IsInstance(__pyx_v_new_parser, __pyx_t_2); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18162 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18165 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1779
18166 * objectify_parser = __DEFAULT_PARSER
18167 * elif isinstance(new_parser, etree.XMLParser):
18168 * objectify_parser = new_parser # <<<<<<<<<<<<<<
18170 * raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
18172 __Pyx_INCREF(__pyx_v_new_parser);
18173 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
18174 __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
18175 __Pyx_GIVEREF(__pyx_v_new_parser);
18176 __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_new_parser;
18181 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1781
18182 * objectify_parser = new_parser
18184 * raise TypeError, u"parser must inherit from lxml.etree.XMLParser" # <<<<<<<<<<<<<<
18186 * def makeparser(**kw):
18188 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_42), 0);
18189 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18193 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18196 __Pyx_XDECREF(__pyx_t_2);
18197 __Pyx_AddTraceback("lxml.objectify.set_default_parser");
18200 __Pyx_DECREF(__pyx_v_new_parser);
18201 __Pyx_XGIVEREF(__pyx_r);
18202 __Pyx_FinishRefcountContext();
18206 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1783
18207 * raise TypeError, u"parser must inherit from lxml.etree.XMLParser"
18209 * def makeparser(**kw): # <<<<<<<<<<<<<<
18210 * u"""makeparser(remove_blank_text=True, **kw)
18214 static PyObject *__pyx_pf_4lxml_9objectify_makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18215 static char __pyx_doc_4lxml_9objectify_makeparser[] = "makeparser(remove_blank_text=True, **kw)\n\n Create a new XML parser for objectify trees.\n\n You can pass all keyword arguments that are supported by\n ``etree.XMLParser()``. Note that this parser defaults to removing\n blank text. You can disable this by passing the\n ``remove_blank_text`` boolean keyword option yourself.\n ";
18216 static PyObject *__pyx_pf_4lxml_9objectify_makeparser(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18217 PyObject *__pyx_v_kw = 0;
18218 PyObject *__pyx_v_remove_blank_text;
18219 PyObject *__pyx_v_parser;
18220 PyObject *__pyx_r = NULL;
18222 PyObject *__pyx_t_2 = NULL;
18223 PyObject *__pyx_t_3 = NULL;
18224 PyObject *__pyx_t_4 = NULL;
18225 __Pyx_SetupRefcountContext("makeparser");
18226 __pyx_self = __pyx_self;
18227 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
18228 __Pyx_RaiseArgtupleInvalid("makeparser", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
18229 if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "makeparser", 1))) return NULL;
18230 __pyx_v_kw = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New();
18231 if (unlikely(!__pyx_v_kw)) return NULL;
18232 __Pyx_GOTREF(__pyx_v_kw);
18233 __pyx_v_remove_blank_text = Py_None; __Pyx_INCREF(Py_None);
18234 __pyx_v_parser = Py_None; __Pyx_INCREF(Py_None);
18236 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1793
18237 * ``remove_blank_text`` boolean keyword option yourself.
18239 * if python.IS_PYTHON3: # <<<<<<<<<<<<<<
18240 * remove_blank_text = u'remove_blank_text'
18243 __pyx_t_1 = IS_PYTHON3;
18246 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1794
18248 * if python.IS_PYTHON3:
18249 * remove_blank_text = u'remove_blank_text' # <<<<<<<<<<<<<<
18251 * remove_blank_text = 'remove_blank_text'
18253 __Pyx_INCREF(((PyObject *)__pyx_n_u_remove_blank_text));
18254 __Pyx_DECREF(__pyx_v_remove_blank_text);
18255 __pyx_v_remove_blank_text = ((PyObject *)__pyx_n_u_remove_blank_text);
18260 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1796
18261 * remove_blank_text = u'remove_blank_text'
18263 * remove_blank_text = 'remove_blank_text' # <<<<<<<<<<<<<<
18264 * if remove_blank_text not in kw:
18265 * kw[remove_blank_text] = True
18267 __Pyx_INCREF(((PyObject *)__pyx_n_b_remove_blank_text));
18268 __Pyx_DECREF(__pyx_v_remove_blank_text);
18269 __pyx_v_remove_blank_text = ((PyObject *)__pyx_n_b_remove_blank_text);
18273 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1797
18275 * remove_blank_text = 'remove_blank_text'
18276 * if remove_blank_text not in kw: # <<<<<<<<<<<<<<
18277 * kw[remove_blank_text] = True
18278 * parser = etree.XMLParser(**kw)
18280 __pyx_t_1 = (!PySequence_Contains(__pyx_v_kw, __pyx_v_remove_blank_text)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18283 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1798
18284 * remove_blank_text = 'remove_blank_text'
18285 * if remove_blank_text not in kw:
18286 * kw[remove_blank_text] = True # <<<<<<<<<<<<<<
18287 * parser = etree.XMLParser(**kw)
18288 * parser.set_element_class_lookup( ObjectifyElementClassLookup() )
18290 __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18291 __Pyx_GOTREF(__pyx_t_2);
18292 if (PyObject_SetItem(__pyx_v_kw, __pyx_v_remove_blank_text, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1798; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18293 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18298 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1799
18299 * if remove_blank_text not in kw:
18300 * kw[remove_blank_text] = True
18301 * parser = etree.XMLParser(**kw) # <<<<<<<<<<<<<<
18302 * parser.set_element_class_lookup( ObjectifyElementClassLookup() )
18305 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18306 __Pyx_GOTREF(__pyx_t_2);
18307 __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), __pyx_v_kw); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18308 __Pyx_GOTREF(__pyx_t_3);
18309 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18310 __Pyx_DECREF(__pyx_v_parser);
18311 __pyx_v_parser = __pyx_t_3;
18314 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1800
18315 * kw[remove_blank_text] = True
18316 * parser = etree.XMLParser(**kw)
18317 * parser.set_element_class_lookup( ObjectifyElementClassLookup() ) # <<<<<<<<<<<<<<
18321 __pyx_t_3 = PyObject_GetAttr(__pyx_v_parser, __pyx_n_ui_43); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18322 __Pyx_GOTREF(__pyx_t_3);
18323 __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18324 __Pyx_GOTREF(__pyx_t_2);
18325 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18326 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
18327 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
18328 __Pyx_GIVEREF(__pyx_t_2);
18330 __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18331 __Pyx_GOTREF(__pyx_t_2);
18332 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18333 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
18334 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18336 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1801
18337 * parser = etree.XMLParser(**kw)
18338 * parser.set_element_class_lookup( ObjectifyElementClassLookup() )
18339 * return parser # <<<<<<<<<<<<<<
18341 * cdef _Element _makeElement(tag, text, attrib, nsmap):
18343 __Pyx_XDECREF(__pyx_r);
18344 __Pyx_INCREF(__pyx_v_parser);
18345 __pyx_r = __pyx_v_parser;
18348 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18351 __Pyx_XDECREF(__pyx_t_2);
18352 __Pyx_XDECREF(__pyx_t_3);
18353 __Pyx_XDECREF(__pyx_t_4);
18354 __Pyx_AddTraceback("lxml.objectify.makeparser");
18357 __Pyx_DECREF(__pyx_v_kw);
18358 __Pyx_DECREF(__pyx_v_remove_blank_text);
18359 __Pyx_DECREF(__pyx_v_parser);
18360 __Pyx_XGIVEREF(__pyx_r);
18361 __Pyx_FinishRefcountContext();
18365 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1803
18368 * cdef _Element _makeElement(tag, text, attrib, nsmap): # <<<<<<<<<<<<<<
18369 * return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap)
18373 static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx_v_tag, PyObject *__pyx_v_text, PyObject *__pyx_v_attrib, PyObject *__pyx_v_nsmap) {
18374 struct LxmlElement *__pyx_r = NULL;
18375 PyObject *__pyx_t_1 = NULL;
18376 __Pyx_SetupRefcountContext("_makeElement");
18378 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1804
18380 * cdef _Element _makeElement(tag, text, attrib, nsmap):
18381 * return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap) # <<<<<<<<<<<<<<
18383 * ################################################################################
18385 __Pyx_XDECREF(((PyObject *)__pyx_r));
18386 __pyx_t_1 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)Py_None), __pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_text, Py_None, __pyx_v_attrib, __pyx_v_nsmap)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18387 __Pyx_GOTREF(__pyx_t_1);
18388 __pyx_r = ((struct LxmlElement *)__pyx_t_1);
18392 __pyx_r = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
18395 __Pyx_XDECREF(__pyx_t_1);
18396 __Pyx_AddTraceback("lxml.objectify._makeElement");
18399 __Pyx_XGIVEREF((PyObject *)__pyx_r);
18400 __Pyx_FinishRefcountContext();
18404 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1812
18405 * _fromstring = etree.fromstring
18407 * def fromstring(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<<
18408 * u"""fromstring(xml, parser=None, base_url=None)
18412 static PyObject *__pyx_pf_4lxml_9objectify_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18413 static char __pyx_doc_4lxml_9objectify_fromstring[] = "fromstring(xml, parser=None, base_url=None)\n\n Objectify specific version of the lxml.etree fromstring() function\n that uses the objectify parser.\n\n You can pass a different parser as second argument.\n\n The ``base_url`` keyword argument allows to set the original base URL of\n the document to support relative Paths when looking up external entities\n (DTD, XInclude, ...).\n ";
18414 static PyObject *__pyx_pf_4lxml_9objectify_fromstring(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18415 PyObject *__pyx_v_xml = 0;
18416 PyObject *__pyx_v_parser = 0;
18417 PyObject *__pyx_v_base_url = 0;
18418 PyObject *__pyx_r = NULL;
18420 PyObject *__pyx_t_2 = NULL;
18421 PyObject *__pyx_t_3 = NULL;
18422 PyObject *__pyx_t_4 = NULL;
18423 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_xml,&__pyx_n_ui_parser,&__pyx_n_ui_base_url,0};
18424 __Pyx_SetupRefcountContext("fromstring");
18425 __pyx_self = __pyx_self;
18426 if (unlikely(__pyx_kwds)) {
18427 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18428 PyObject* values[3] = {0,0,0};
18429 values[1] = ((PyObject *)Py_None);
18430 values[2] = ((PyObject *)Py_None);
18431 switch (PyTuple_GET_SIZE(__pyx_args)) {
18432 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18433 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18435 default: goto __pyx_L5_argtuple_error;
18437 switch (PyTuple_GET_SIZE(__pyx_args)) {
18439 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xml);
18440 if (likely(values[0])) kw_args--;
18441 else goto __pyx_L5_argtuple_error;
18444 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_parser);
18445 if (unlikely(value)) { values[1] = value; kw_args--; }
18448 while (kw_args > 0) {
18450 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_base_url);
18451 if (value) { values[2] = value; if (!(--kw_args)) break; }
18454 if (unlikely(kw_args > 0)) {
18455 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "fromstring") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18457 __pyx_v_xml = values[0];
18458 __pyx_v_parser = values[1];
18459 __pyx_v_base_url = values[2];
18461 __pyx_v_parser = ((PyObject *)Py_None);
18462 __pyx_v_base_url = ((PyObject *)Py_None);
18463 switch (PyTuple_GET_SIZE(__pyx_args)) {
18464 case 2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
18465 case 1: __pyx_v_xml = PyTuple_GET_ITEM(__pyx_args, 0);
18467 default: goto __pyx_L5_argtuple_error;
18470 goto __pyx_L4_argument_unpacking_done;
18471 __pyx_L5_argtuple_error:;
18472 __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1812; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18474 __Pyx_AddTraceback("lxml.objectify.fromstring");
18476 __pyx_L4_argument_unpacking_done:;
18477 __Pyx_INCREF(__pyx_v_xml);
18478 __Pyx_INCREF(__pyx_v_parser);
18479 __Pyx_INCREF(__pyx_v_base_url);
18481 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1824
18482 * (DTD, XInclude, ...).
18484 * if parser is None: # <<<<<<<<<<<<<<
18485 * parser = objectify_parser
18486 * return _fromstring(xml, parser, base_url=base_url)
18488 __pyx_t_1 = (__pyx_v_parser == Py_None);
18491 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1825
18493 * if parser is None:
18494 * parser = objectify_parser # <<<<<<<<<<<<<<
18495 * return _fromstring(xml, parser, base_url=base_url)
18498 __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
18499 __Pyx_DECREF(__pyx_v_parser);
18500 __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
18505 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1826
18506 * if parser is None:
18507 * parser = objectify_parser
18508 * return _fromstring(xml, parser, base_url=base_url) # <<<<<<<<<<<<<<
18510 * def XML(xml, parser=None, *, base_url=None):
18512 __Pyx_XDECREF(__pyx_r);
18513 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18514 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18515 __Pyx_INCREF(__pyx_v_xml);
18516 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xml);
18517 __Pyx_GIVEREF(__pyx_v_xml);
18518 __Pyx_INCREF(__pyx_v_parser);
18519 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
18520 __Pyx_GIVEREF(__pyx_v_parser);
18521 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18522 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
18523 if (PyDict_SetItem(__pyx_t_3, __pyx_n_ui_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18524 __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18525 __Pyx_GOTREF(__pyx_t_4);
18526 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18527 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
18528 __pyx_r = __pyx_t_4;
18532 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18535 __Pyx_XDECREF(__pyx_t_2);
18536 __Pyx_XDECREF(__pyx_t_3);
18537 __Pyx_XDECREF(__pyx_t_4);
18538 __Pyx_AddTraceback("lxml.objectify.fromstring");
18541 __Pyx_DECREF(__pyx_v_xml);
18542 __Pyx_DECREF(__pyx_v_parser);
18543 __Pyx_DECREF(__pyx_v_base_url);
18544 __Pyx_XGIVEREF(__pyx_r);
18545 __Pyx_FinishRefcountContext();
18549 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1828
18550 * return _fromstring(xml, parser, base_url=base_url)
18552 * def XML(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<<
18553 * u"""XML(xml, parser=None, base_url=None)
18557 static PyObject *__pyx_pf_4lxml_9objectify_XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18558 static char __pyx_doc_4lxml_9objectify_XML[] = "XML(xml, parser=None, base_url=None)\n\n Objectify specific version of the lxml.etree XML() literal factory\n that uses the objectify parser.\n\n You can pass a different parser as second argument.\n\n The ``base_url`` keyword argument allows to set the original base URL of\n the document to support relative Paths when looking up external entities\n (DTD, XInclude, ...).\n ";
18559 static PyObject *__pyx_pf_4lxml_9objectify_XML(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18560 PyObject *__pyx_v_xml = 0;
18561 PyObject *__pyx_v_parser = 0;
18562 PyObject *__pyx_v_base_url = 0;
18563 PyObject *__pyx_r = NULL;
18565 PyObject *__pyx_t_2 = NULL;
18566 PyObject *__pyx_t_3 = NULL;
18567 PyObject *__pyx_t_4 = NULL;
18568 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_xml,&__pyx_n_ui_parser,&__pyx_n_ui_base_url,0};
18569 __Pyx_SetupRefcountContext("XML");
18570 __pyx_self = __pyx_self;
18571 if (unlikely(__pyx_kwds)) {
18572 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18573 PyObject* values[3] = {0,0,0};
18574 values[1] = ((PyObject *)Py_None);
18575 values[2] = ((PyObject *)Py_None);
18576 switch (PyTuple_GET_SIZE(__pyx_args)) {
18577 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18578 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18580 default: goto __pyx_L5_argtuple_error;
18582 switch (PyTuple_GET_SIZE(__pyx_args)) {
18584 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_xml);
18585 if (likely(values[0])) kw_args--;
18586 else goto __pyx_L5_argtuple_error;
18589 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_parser);
18590 if (unlikely(value)) { values[1] = value; kw_args--; }
18593 while (kw_args > 0) {
18595 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_base_url);
18596 if (value) { values[2] = value; if (!(--kw_args)) break; }
18599 if (unlikely(kw_args > 0)) {
18600 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "XML") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18602 __pyx_v_xml = values[0];
18603 __pyx_v_parser = values[1];
18604 __pyx_v_base_url = values[2];
18606 __pyx_v_parser = ((PyObject *)Py_None);
18607 __pyx_v_base_url = ((PyObject *)Py_None);
18608 switch (PyTuple_GET_SIZE(__pyx_args)) {
18609 case 2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
18610 case 1: __pyx_v_xml = PyTuple_GET_ITEM(__pyx_args, 0);
18612 default: goto __pyx_L5_argtuple_error;
18615 goto __pyx_L4_argument_unpacking_done;
18616 __pyx_L5_argtuple_error:;
18617 __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18619 __Pyx_AddTraceback("lxml.objectify.XML");
18621 __pyx_L4_argument_unpacking_done:;
18622 __Pyx_INCREF(__pyx_v_xml);
18623 __Pyx_INCREF(__pyx_v_parser);
18624 __Pyx_INCREF(__pyx_v_base_url);
18626 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1840
18627 * (DTD, XInclude, ...).
18629 * if parser is None: # <<<<<<<<<<<<<<
18630 * parser = objectify_parser
18631 * return _fromstring(xml, parser, base_url=base_url)
18633 __pyx_t_1 = (__pyx_v_parser == Py_None);
18636 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1841
18638 * if parser is None:
18639 * parser = objectify_parser # <<<<<<<<<<<<<<
18640 * return _fromstring(xml, parser, base_url=base_url)
18643 __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
18644 __Pyx_DECREF(__pyx_v_parser);
18645 __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
18650 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1842
18651 * if parser is None:
18652 * parser = objectify_parser
18653 * return _fromstring(xml, parser, base_url=base_url) # <<<<<<<<<<<<<<
18655 * cdef object _parse
18657 __Pyx_XDECREF(__pyx_r);
18658 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18659 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18660 __Pyx_INCREF(__pyx_v_xml);
18661 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xml);
18662 __Pyx_GIVEREF(__pyx_v_xml);
18663 __Pyx_INCREF(__pyx_v_parser);
18664 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
18665 __Pyx_GIVEREF(__pyx_v_parser);
18666 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18667 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
18668 if (PyDict_SetItem(__pyx_t_3, __pyx_n_ui_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18669 __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__fromstring, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18670 __Pyx_GOTREF(__pyx_t_4);
18671 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18672 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
18673 __pyx_r = __pyx_t_4;
18677 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18680 __Pyx_XDECREF(__pyx_t_2);
18681 __Pyx_XDECREF(__pyx_t_3);
18682 __Pyx_XDECREF(__pyx_t_4);
18683 __Pyx_AddTraceback("lxml.objectify.XML");
18686 __Pyx_DECREF(__pyx_v_xml);
18687 __Pyx_DECREF(__pyx_v_parser);
18688 __Pyx_DECREF(__pyx_v_base_url);
18689 __Pyx_XGIVEREF(__pyx_r);
18690 __Pyx_FinishRefcountContext();
18694 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1847
18695 * _parse = etree.parse
18697 * def parse(f, parser=None, *, base_url=None): # <<<<<<<<<<<<<<
18698 * u"""parse(f, parser=None, base_url=None)
18702 static PyObject *__pyx_pf_4lxml_9objectify_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18703 static char __pyx_doc_4lxml_9objectify_parse[] = "parse(f, parser=None, base_url=None)\n\n Parse a file or file-like object with the objectify parser.\n\n You can pass a different parser as second argument.\n\n The ``base_url`` keyword allows setting a URL for the document\n when parsing from a file-like object. This is needed when looking\n up external entities (DTD, XInclude, ...) with relative paths.\n ";
18704 static PyObject *__pyx_pf_4lxml_9objectify_parse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18705 PyObject *__pyx_v_f = 0;
18706 PyObject *__pyx_v_parser = 0;
18707 PyObject *__pyx_v_base_url = 0;
18708 PyObject *__pyx_r = NULL;
18710 PyObject *__pyx_t_2 = NULL;
18711 PyObject *__pyx_t_3 = NULL;
18712 PyObject *__pyx_t_4 = NULL;
18713 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_f,&__pyx_n_ui_parser,&__pyx_n_ui_base_url,0};
18714 __Pyx_SetupRefcountContext("parse");
18715 __pyx_self = __pyx_self;
18716 if (unlikely(__pyx_kwds)) {
18717 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18718 PyObject* values[3] = {0,0,0};
18719 values[1] = ((PyObject *)Py_None);
18720 values[2] = ((PyObject *)Py_None);
18721 switch (PyTuple_GET_SIZE(__pyx_args)) {
18722 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18723 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18725 default: goto __pyx_L5_argtuple_error;
18727 switch (PyTuple_GET_SIZE(__pyx_args)) {
18729 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_f);
18730 if (likely(values[0])) kw_args--;
18731 else goto __pyx_L5_argtuple_error;
18734 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_parser);
18735 if (unlikely(value)) { values[1] = value; kw_args--; }
18738 while (kw_args > 0) {
18740 value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_base_url);
18741 if (value) { values[2] = value; if (!(--kw_args)) break; }
18744 if (unlikely(kw_args > 0)) {
18745 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "parse") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18747 __pyx_v_f = values[0];
18748 __pyx_v_parser = values[1];
18749 __pyx_v_base_url = values[2];
18751 __pyx_v_parser = ((PyObject *)Py_None);
18752 __pyx_v_base_url = ((PyObject *)Py_None);
18753 switch (PyTuple_GET_SIZE(__pyx_args)) {
18754 case 2: __pyx_v_parser = PyTuple_GET_ITEM(__pyx_args, 1);
18755 case 1: __pyx_v_f = PyTuple_GET_ITEM(__pyx_args, 0);
18757 default: goto __pyx_L5_argtuple_error;
18760 goto __pyx_L4_argument_unpacking_done;
18761 __pyx_L5_argtuple_error:;
18762 __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18764 __Pyx_AddTraceback("lxml.objectify.parse");
18766 __pyx_L4_argument_unpacking_done:;
18767 __Pyx_INCREF(__pyx_v_f);
18768 __Pyx_INCREF(__pyx_v_parser);
18769 __Pyx_INCREF(__pyx_v_base_url);
18771 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1858
18772 * up external entities (DTD, XInclude, ...) with relative paths.
18774 * if parser is None: # <<<<<<<<<<<<<<
18775 * parser = objectify_parser
18776 * return _parse(f, parser, base_url=base_url)
18778 __pyx_t_1 = (__pyx_v_parser == Py_None);
18781 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1859
18783 * if parser is None:
18784 * parser = objectify_parser # <<<<<<<<<<<<<<
18785 * return _parse(f, parser, base_url=base_url)
18788 __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser);
18789 __Pyx_DECREF(__pyx_v_parser);
18790 __pyx_v_parser = __pyx_v_4lxml_9objectify_objectify_parser;
18795 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1860
18796 * if parser is None:
18797 * parser = objectify_parser
18798 * return _parse(f, parser, base_url=base_url) # <<<<<<<<<<<<<<
18800 * cdef dict _DEFAULT_NSMAP
18802 __Pyx_XDECREF(__pyx_r);
18803 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18804 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
18805 __Pyx_INCREF(__pyx_v_f);
18806 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f);
18807 __Pyx_GIVEREF(__pyx_v_f);
18808 __Pyx_INCREF(__pyx_v_parser);
18809 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_parser);
18810 __Pyx_GIVEREF(__pyx_v_parser);
18811 __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18812 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
18813 if (PyDict_SetItem(__pyx_t_3, __pyx_n_ui_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18814 __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_v_4lxml_9objectify__parse, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18815 __Pyx_GOTREF(__pyx_t_4);
18816 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
18817 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
18818 __pyx_r = __pyx_t_4;
18822 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18825 __Pyx_XDECREF(__pyx_t_2);
18826 __Pyx_XDECREF(__pyx_t_3);
18827 __Pyx_XDECREF(__pyx_t_4);
18828 __Pyx_AddTraceback("lxml.objectify.parse");
18831 __Pyx_DECREF(__pyx_v_f);
18832 __Pyx_DECREF(__pyx_v_parser);
18833 __Pyx_DECREF(__pyx_v_base_url);
18834 __Pyx_XGIVEREF(__pyx_r);
18835 __Pyx_FinishRefcountContext();
18839 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1869
18840 * E = ElementMaker()
18842 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes): # <<<<<<<<<<<<<<
18843 * u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)
18847 static PyObject *__pyx_pf_4lxml_9objectify_Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18848 static char __pyx_doc_4lxml_9objectify_Element[] = "Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes)\n\n Objectify specific version of the lxml.etree Element() factory that\n always creates a structural (tree) element.\n\n NOTE: requires parser based element class lookup activated in lxml.etree!\n ";
18849 static PyObject *__pyx_pf_4lxml_9objectify_Element(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18850 PyObject *__pyx_v__tag = 0;
18851 PyObject *__pyx_v_attrib = 0;
18852 PyObject *__pyx_v_nsmap = 0;
18853 PyObject *__pyx_v__pytype = 0;
18854 PyObject *__pyx_v__attributes = 0;
18855 PyObject *__pyx_r = NULL;
18857 Py_ssize_t __pyx_t_2;
18858 PyObject *__pyx_t_3 = NULL;
18859 PyObject *__pyx_t_4 = NULL;
18860 PyObject *__pyx_t_5 = NULL;
18861 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui__tag,&__pyx_n_ui_attrib,&__pyx_n_ui_nsmap,&__pyx_n_ui__pytype,0};
18862 __Pyx_SetupRefcountContext("Element");
18863 __pyx_self = __pyx_self;
18864 __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
18865 __Pyx_GOTREF(__pyx_v__attributes);
18866 if (unlikely(__pyx_kwds)) {
18867 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
18868 PyObject* values[4] = {0,0,0,0};
18869 values[1] = ((PyObject *)Py_None);
18870 values[2] = ((PyObject *)Py_None);
18871 values[3] = ((PyObject *)Py_None);
18872 switch (PyTuple_GET_SIZE(__pyx_args)) {
18873 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
18874 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18875 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18877 default: goto __pyx_L5_argtuple_error;
18879 switch (PyTuple_GET_SIZE(__pyx_args)) {
18881 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui__tag);
18882 if (likely(values[0])) kw_args--;
18883 else goto __pyx_L5_argtuple_error;
18886 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_attrib);
18887 if (unlikely(value)) { values[1] = value; kw_args--; }
18891 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_nsmap);
18892 if (unlikely(value)) { values[2] = value; kw_args--; }
18895 if (unlikely(kw_args > 0)) {
18896 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, PyTuple_GET_SIZE(__pyx_args), "Element") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18898 __pyx_v__tag = values[0];
18899 __pyx_v_attrib = values[1];
18900 __pyx_v_nsmap = values[2];
18901 __pyx_v__pytype = values[3];
18903 __pyx_v_attrib = ((PyObject *)Py_None);
18904 __pyx_v_nsmap = ((PyObject *)Py_None);
18905 __pyx_v__pytype = ((PyObject *)Py_None);
18906 switch (PyTuple_GET_SIZE(__pyx_args)) {
18907 case 3: __pyx_v_nsmap = PyTuple_GET_ITEM(__pyx_args, 2);
18908 case 2: __pyx_v_attrib = PyTuple_GET_ITEM(__pyx_args, 1);
18909 case 1: __pyx_v__tag = PyTuple_GET_ITEM(__pyx_args, 0);
18911 default: goto __pyx_L5_argtuple_error;
18914 goto __pyx_L4_argument_unpacking_done;
18915 __pyx_L5_argtuple_error:;
18916 __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1869; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
18918 __Pyx_DECREF(__pyx_v__attributes);
18919 __Pyx_AddTraceback("lxml.objectify.Element");
18921 __pyx_L4_argument_unpacking_done:;
18922 __Pyx_INCREF(__pyx_v__tag);
18923 __Pyx_INCREF(__pyx_v_attrib);
18924 __Pyx_INCREF(__pyx_v_nsmap);
18925 __Pyx_INCREF(__pyx_v__pytype);
18927 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1877
18928 * NOTE: requires parser based element class lookup activated in lxml.etree!
18930 * if attrib is not None: # <<<<<<<<<<<<<<
18931 * if python.PyDict_Size(_attributes):
18932 * attrib.update(_attributes)
18934 __pyx_t_1 = (__pyx_v_attrib != Py_None);
18937 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1878
18939 * if attrib is not None:
18940 * if python.PyDict_Size(_attributes): # <<<<<<<<<<<<<<
18941 * attrib.update(_attributes)
18942 * _attributes = attrib
18944 __pyx_t_2 = PyDict_Size(__pyx_v__attributes);
18947 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1879
18948 * if attrib is not None:
18949 * if python.PyDict_Size(_attributes):
18950 * attrib.update(_attributes) # <<<<<<<<<<<<<<
18951 * _attributes = attrib
18952 * if _pytype is None:
18954 __pyx_t_3 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_ui_update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18955 __Pyx_GOTREF(__pyx_t_3);
18956 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18957 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
18958 __Pyx_INCREF(__pyx_v__attributes);
18959 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__attributes);
18960 __Pyx_GIVEREF(__pyx_v__attributes);
18961 __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18962 __Pyx_GOTREF(__pyx_t_5);
18963 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18964 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
18965 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18970 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1880
18971 * if python.PyDict_Size(_attributes):
18972 * attrib.update(_attributes)
18973 * _attributes = attrib # <<<<<<<<<<<<<<
18974 * if _pytype is None:
18975 * _pytype = TREE_PYTYPE_NAME
18977 __Pyx_INCREF(__pyx_v_attrib);
18978 __Pyx_DECREF(__pyx_v__attributes);
18979 __pyx_v__attributes = __pyx_v_attrib;
18984 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1881
18985 * attrib.update(_attributes)
18986 * _attributes = attrib
18987 * if _pytype is None: # <<<<<<<<<<<<<<
18988 * _pytype = TREE_PYTYPE_NAME
18989 * if nsmap is None:
18991 __pyx_t_1 = (__pyx_v__pytype == Py_None);
18994 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1882
18995 * _attributes = attrib
18996 * if _pytype is None:
18997 * _pytype = TREE_PYTYPE_NAME # <<<<<<<<<<<<<<
18998 * if nsmap is None:
18999 * nsmap = _DEFAULT_NSMAP
19001 __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
19002 __Pyx_DECREF(__pyx_v__pytype);
19003 __pyx_v__pytype = __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME;
19008 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1883
19009 * if _pytype is None:
19010 * _pytype = TREE_PYTYPE_NAME
19011 * if nsmap is None: # <<<<<<<<<<<<<<
19012 * nsmap = _DEFAULT_NSMAP
19013 * _attributes[PYTYPE_ATTRIBUTE] = _pytype
19015 __pyx_t_1 = (__pyx_v_nsmap == Py_None);
19018 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1884
19019 * _pytype = TREE_PYTYPE_NAME
19020 * if nsmap is None:
19021 * nsmap = _DEFAULT_NSMAP # <<<<<<<<<<<<<<
19022 * _attributes[PYTYPE_ATTRIBUTE] = _pytype
19023 * return _makeElement(_tag, None, _attributes, nsmap)
19025 __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19026 __Pyx_DECREF(__pyx_v_nsmap);
19027 __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
19032 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1885
19033 * if nsmap is None:
19034 * nsmap = _DEFAULT_NSMAP
19035 * _attributes[PYTYPE_ATTRIBUTE] = _pytype # <<<<<<<<<<<<<<
19036 * return _makeElement(_tag, None, _attributes, nsmap)
19039 __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19040 __Pyx_GOTREF(__pyx_t_5);
19041 if (PyObject_SetItem(__pyx_v__attributes, __pyx_t_5, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19042 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19044 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1886
19045 * nsmap = _DEFAULT_NSMAP
19046 * _attributes[PYTYPE_ATTRIBUTE] = _pytype
19047 * return _makeElement(_tag, None, _attributes, nsmap) # <<<<<<<<<<<<<<
19049 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None,
19051 __Pyx_XDECREF(__pyx_r);
19052 __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag, Py_None, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19053 __Pyx_GOTREF(__pyx_t_5);
19054 __pyx_r = __pyx_t_5;
19058 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19061 __Pyx_XDECREF(__pyx_t_3);
19062 __Pyx_XDECREF(__pyx_t_4);
19063 __Pyx_XDECREF(__pyx_t_5);
19064 __Pyx_AddTraceback("lxml.objectify.Element");
19067 __Pyx_DECREF(__pyx_v__attributes);
19068 __Pyx_DECREF(__pyx_v__tag);
19069 __Pyx_DECREF(__pyx_v_attrib);
19070 __Pyx_DECREF(__pyx_v_nsmap);
19071 __Pyx_DECREF(__pyx_v__pytype);
19072 __Pyx_XGIVEREF(__pyx_r);
19073 __Pyx_FinishRefcountContext();
19077 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1888
19078 * return _makeElement(_tag, None, _attributes, nsmap)
19080 * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None, # <<<<<<<<<<<<<<
19082 * u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)
19085 static PyObject *__pyx_pf_4lxml_9objectify_DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19086 static char __pyx_doc_4lxml_9objectify_DataElement[] = "DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes)\n\n Create a new element from a Python value and XML attributes taken from\n keyword arguments or a dictionary passed as second argument.\n\n Automatically adds a 'pytype' attribute for the Python type of the value,\n if the type can be identified. If '_pytype' or '_xsi' are among the\n keyword arguments, they will be used instead.\n\n If the _value argument is an ObjectifiedDataElement instance, its py:pytype,\n xsi:type and other attributes and nsmap are reused unless they are redefined\n in attrib and/or keyword arguments.\n ";
19087 static PyObject *__pyx_pf_4lxml_9objectify_DataElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19088 PyObject *__pyx_v__value = 0;
19089 PyObject *__pyx_v_attrib = 0;
19090 PyObject *__pyx_v_nsmap = 0;
19091 PyObject *__pyx_v__pytype = 0;
19092 PyObject *__pyx_v__xsi = 0;
19093 PyObject *__pyx_v__attributes = 0;
19094 PyObject *__pyx_v_dict_result;
19095 PyObject *__pyx_v_temp;
19096 PyObject *__pyx_v_prefix;
19097 PyObject *__pyx_v_name;
19098 PyObject *__pyx_v_ns;
19099 PyObject *__pyx_v_strval;
19100 PyObject *__pyx_v_type_check;
19101 PyObject *__pyx_r = NULL;
19105 Py_ssize_t __pyx_t_4;
19106 PyObject *__pyx_t_5 = NULL;
19107 PyObject *__pyx_t_6 = NULL;
19108 PyObject *__pyx_t_7 = NULL;
19110 PyObject *__pyx_t_9 = NULL;
19111 PyObject *__pyx_t_10 = NULL;
19112 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui__value,&__pyx_n_ui_attrib,&__pyx_n_ui_nsmap,&__pyx_n_ui__pytype,&__pyx_n_ui__xsi,0};
19113 __Pyx_SetupRefcountContext("DataElement");
19114 __pyx_self = __pyx_self;
19115 __pyx_v__attributes = PyDict_New(); if (unlikely(!__pyx_v__attributes)) return NULL;
19116 __Pyx_GOTREF(__pyx_v__attributes);
19117 if (unlikely(__pyx_kwds)) {
19118 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
19119 PyObject* values[5] = {0,0,0,0,0};
19120 values[1] = ((PyObject *)Py_None);
19121 values[2] = ((PyObject *)Py_None);
19122 values[3] = ((PyObject *)Py_None);
19123 values[4] = ((PyObject *)Py_None);
19124 switch (PyTuple_GET_SIZE(__pyx_args)) {
19125 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
19126 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19127 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19129 default: goto __pyx_L5_argtuple_error;
19131 switch (PyTuple_GET_SIZE(__pyx_args)) {
19133 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui__value);
19134 if (likely(values[0])) kw_args--;
19135 else goto __pyx_L5_argtuple_error;
19138 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_attrib);
19139 if (unlikely(value)) { values[1] = value; kw_args--; }
19143 PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_nsmap);
19144 if (unlikely(value)) { values[2] = value; kw_args--; }
19147 if (unlikely(kw_args > 0)) {
19148 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, PyTuple_GET_SIZE(__pyx_args), "DataElement") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19150 __pyx_v__value = values[0];
19151 __pyx_v_attrib = values[1];
19152 __pyx_v_nsmap = values[2];
19153 __pyx_v__pytype = values[3];
19154 __pyx_v__xsi = values[4];
19156 __pyx_v_attrib = ((PyObject *)Py_None);
19157 __pyx_v_nsmap = ((PyObject *)Py_None);
19158 __pyx_v__pytype = ((PyObject *)Py_None);
19159 __pyx_v__xsi = ((PyObject *)Py_None);
19160 switch (PyTuple_GET_SIZE(__pyx_args)) {
19161 case 3: __pyx_v_nsmap = PyTuple_GET_ITEM(__pyx_args, 2);
19162 case 2: __pyx_v_attrib = PyTuple_GET_ITEM(__pyx_args, 1);
19163 case 1: __pyx_v__value = PyTuple_GET_ITEM(__pyx_args, 0);
19165 default: goto __pyx_L5_argtuple_error;
19168 goto __pyx_L4_argument_unpacking_done;
19169 __pyx_L5_argtuple_error:;
19170 __Pyx_RaiseArgtupleInvalid("DataElement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1888; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
19172 __Pyx_DECREF(__pyx_v__attributes);
19173 __Pyx_AddTraceback("lxml.objectify.DataElement");
19175 __pyx_L4_argument_unpacking_done:;
19176 __Pyx_INCREF(__pyx_v__value);
19177 __Pyx_INCREF(__pyx_v_attrib);
19178 __Pyx_INCREF(__pyx_v_nsmap);
19179 __Pyx_INCREF(__pyx_v__pytype);
19180 __Pyx_INCREF(__pyx_v__xsi);
19181 __pyx_v_temp = Py_None; __Pyx_INCREF(Py_None);
19182 __pyx_v_prefix = Py_None; __Pyx_INCREF(Py_None);
19183 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
19184 __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
19185 __pyx_v_strval = Py_None; __Pyx_INCREF(Py_None);
19186 __pyx_v_type_check = Py_None; __Pyx_INCREF(Py_None);
19188 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1904
19190 * cdef python.PyObject* dict_result
19191 * if nsmap is None: # <<<<<<<<<<<<<<
19192 * nsmap = _DEFAULT_NSMAP
19193 * if attrib is not None and attrib:
19195 __pyx_t_1 = (__pyx_v_nsmap == Py_None);
19198 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1905
19199 * cdef python.PyObject* dict_result
19200 * if nsmap is None:
19201 * nsmap = _DEFAULT_NSMAP # <<<<<<<<<<<<<<
19202 * if attrib is not None and attrib:
19203 * if python.PyDict_Size(_attributes):
19205 __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19206 __Pyx_DECREF(__pyx_v_nsmap);
19207 __pyx_v_nsmap = ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP);
19212 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1906
19213 * if nsmap is None:
19214 * nsmap = _DEFAULT_NSMAP
19215 * if attrib is not None and attrib: # <<<<<<<<<<<<<<
19216 * if python.PyDict_Size(_attributes):
19217 * attrib = dict(attrib)
19219 __pyx_t_1 = (__pyx_v_attrib != Py_None);
19221 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19222 __pyx_t_3 = __pyx_t_2;
19224 __pyx_t_3 = __pyx_t_1;
19228 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1907
19229 * nsmap = _DEFAULT_NSMAP
19230 * if attrib is not None and attrib:
19231 * if python.PyDict_Size(_attributes): # <<<<<<<<<<<<<<
19232 * attrib = dict(attrib)
19233 * attrib.update(_attributes)
19235 __pyx_t_4 = PyDict_Size(__pyx_v__attributes);
19238 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1908
19239 * if attrib is not None and attrib:
19240 * if python.PyDict_Size(_attributes):
19241 * attrib = dict(attrib) # <<<<<<<<<<<<<<
19242 * attrib.update(_attributes)
19243 * _attributes = attrib
19245 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19246 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19247 __Pyx_INCREF(__pyx_v_attrib);
19248 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_attrib);
19249 __Pyx_GIVEREF(__pyx_v_attrib);
19250 __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19251 __Pyx_GOTREF(__pyx_t_6);
19252 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19253 __Pyx_DECREF(__pyx_v_attrib);
19254 __pyx_v_attrib = __pyx_t_6;
19257 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1909
19258 * if python.PyDict_Size(_attributes):
19259 * attrib = dict(attrib)
19260 * attrib.update(_attributes) # <<<<<<<<<<<<<<
19261 * _attributes = attrib
19262 * if isinstance(_value, ObjectifiedElement):
19264 __pyx_t_6 = PyObject_GetAttr(__pyx_v_attrib, __pyx_n_ui_update); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19265 __Pyx_GOTREF(__pyx_t_6);
19266 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19267 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19268 __Pyx_INCREF(__pyx_v__attributes);
19269 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__attributes);
19270 __Pyx_GIVEREF(__pyx_v__attributes);
19271 __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19272 __Pyx_GOTREF(__pyx_t_7);
19273 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19274 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19275 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19280 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1910
19281 * attrib = dict(attrib)
19282 * attrib.update(_attributes)
19283 * _attributes = attrib # <<<<<<<<<<<<<<
19284 * if isinstance(_value, ObjectifiedElement):
19285 * if _pytype is None:
19287 __Pyx_INCREF(__pyx_v_attrib);
19288 __Pyx_DECREF(__pyx_v__attributes);
19289 __pyx_v__attributes = __pyx_v_attrib;
19294 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1911
19295 * attrib.update(_attributes)
19296 * _attributes = attrib
19297 * if isinstance(_value, ObjectifiedElement): # <<<<<<<<<<<<<<
19298 * if _pytype is None:
19299 * if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
19301 __pyx_t_3 = PyObject_TypeCheck(__pyx_v__value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
19304 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1912
19305 * _attributes = attrib
19306 * if isinstance(_value, ObjectifiedElement):
19307 * if _pytype is None: # <<<<<<<<<<<<<<
19308 * if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
19309 * # special case: no change!
19311 __pyx_t_3 = (__pyx_v__pytype == Py_None);
19314 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1913
19315 * if isinstance(_value, ObjectifiedElement):
19316 * if _pytype is None:
19317 * if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP: # <<<<<<<<<<<<<<
19318 * # special case: no change!
19319 * return _value.__copy__()
19321 __pyx_t_3 = (__pyx_v__xsi == Py_None);
19323 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19324 if ((!__pyx_t_1)) {
19325 __pyx_t_2 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19326 __pyx_t_8 = __pyx_t_2;
19328 __pyx_t_8 = (!__pyx_t_1);
19330 __pyx_t_1 = __pyx_t_8;
19332 __pyx_t_1 = __pyx_t_3;
19336 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1915
19337 * if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP:
19338 * # special case: no change!
19339 * return _value.__copy__() # <<<<<<<<<<<<<<
19340 * if isinstance(_value, ObjectifiedDataElement):
19341 * # reuse existing nsmap unless redefined in nsmap parameter
19343 __Pyx_XDECREF(__pyx_r);
19344 __pyx_t_7 = PyObject_GetAttr(__pyx_v__value, __pyx_n_ui___copy__); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19345 __Pyx_GOTREF(__pyx_t_7);
19346 __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19347 __Pyx_GOTREF(__pyx_t_5);
19348 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19349 __pyx_r = __pyx_t_5;
19362 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1916
19363 * # special case: no change!
19364 * return _value.__copy__()
19365 * if isinstance(_value, ObjectifiedDataElement): # <<<<<<<<<<<<<<
19366 * # reuse existing nsmap unless redefined in nsmap parameter
19367 * temp = _value.nsmap
19369 __pyx_t_1 = PyObject_TypeCheck(__pyx_v__value, ((PyTypeObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)));
19372 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1918
19373 * if isinstance(_value, ObjectifiedDataElement):
19374 * # reuse existing nsmap unless redefined in nsmap parameter
19375 * temp = _value.nsmap # <<<<<<<<<<<<<<
19376 * if temp is not None and temp:
19377 * temp = dict(temp)
19379 __pyx_t_5 = PyObject_GetAttr(__pyx_v__value, __pyx_n_ui_nsmap); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1918; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19380 __Pyx_GOTREF(__pyx_t_5);
19381 __Pyx_DECREF(__pyx_v_temp);
19382 __pyx_v_temp = __pyx_t_5;
19385 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1919
19386 * # reuse existing nsmap unless redefined in nsmap parameter
19387 * temp = _value.nsmap
19388 * if temp is not None and temp: # <<<<<<<<<<<<<<
19389 * temp = dict(temp)
19390 * temp.update(nsmap)
19392 __pyx_t_1 = (__pyx_v_temp != Py_None);
19394 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1919; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19395 __pyx_t_8 = __pyx_t_3;
19397 __pyx_t_8 = __pyx_t_1;
19401 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1920
19402 * temp = _value.nsmap
19403 * if temp is not None and temp:
19404 * temp = dict(temp) # <<<<<<<<<<<<<<
19405 * temp.update(nsmap)
19408 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19409 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19410 __Pyx_INCREF(__pyx_v_temp);
19411 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_temp);
19412 __Pyx_GIVEREF(__pyx_v_temp);
19413 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19414 __Pyx_GOTREF(__pyx_t_7);
19415 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19416 __Pyx_DECREF(__pyx_v_temp);
19417 __pyx_v_temp = __pyx_t_7;
19420 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1921
19421 * if temp is not None and temp:
19422 * temp = dict(temp)
19423 * temp.update(nsmap) # <<<<<<<<<<<<<<
19425 * # reuse existing attributes unless redefined in attrib/_attributes
19427 __pyx_t_7 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_ui_update); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19428 __Pyx_GOTREF(__pyx_t_7);
19429 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19430 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
19431 __Pyx_INCREF(__pyx_v_nsmap);
19432 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_nsmap);
19433 __Pyx_GIVEREF(__pyx_v_nsmap);
19434 __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19435 __Pyx_GOTREF(__pyx_t_6);
19436 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19437 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
19438 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19440 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1922
19441 * temp = dict(temp)
19442 * temp.update(nsmap)
19443 * nsmap = temp # <<<<<<<<<<<<<<
19444 * # reuse existing attributes unless redefined in attrib/_attributes
19445 * temp = _value.attrib
19447 __Pyx_INCREF(__pyx_v_temp);
19448 __Pyx_DECREF(__pyx_v_nsmap);
19449 __pyx_v_nsmap = __pyx_v_temp;
19454 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1924
19456 * # reuse existing attributes unless redefined in attrib/_attributes
19457 * temp = _value.attrib # <<<<<<<<<<<<<<
19458 * if temp is not None and temp:
19459 * temp = dict(temp)
19461 __pyx_t_6 = PyObject_GetAttr(__pyx_v__value, __pyx_n_ui_attrib); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19462 __Pyx_GOTREF(__pyx_t_6);
19463 __Pyx_DECREF(__pyx_v_temp);
19464 __pyx_v_temp = __pyx_t_6;
19467 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1925
19468 * # reuse existing attributes unless redefined in attrib/_attributes
19469 * temp = _value.attrib
19470 * if temp is not None and temp: # <<<<<<<<<<<<<<
19471 * temp = dict(temp)
19472 * temp.update(_attributes)
19474 __pyx_t_8 = (__pyx_v_temp != Py_None);
19476 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19477 __pyx_t_3 = __pyx_t_1;
19479 __pyx_t_3 = __pyx_t_8;
19483 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1926
19484 * temp = _value.attrib
19485 * if temp is not None and temp:
19486 * temp = dict(temp) # <<<<<<<<<<<<<<
19487 * temp.update(_attributes)
19488 * _attributes = temp
19490 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19491 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
19492 __Pyx_INCREF(__pyx_v_temp);
19493 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_temp);
19494 __Pyx_GIVEREF(__pyx_v_temp);
19495 __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)&PyDict_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19496 __Pyx_GOTREF(__pyx_t_5);
19497 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
19498 __Pyx_DECREF(__pyx_v_temp);
19499 __pyx_v_temp = __pyx_t_5;
19502 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1927
19503 * if temp is not None and temp:
19504 * temp = dict(temp)
19505 * temp.update(_attributes) # <<<<<<<<<<<<<<
19506 * _attributes = temp
19507 * # reuse existing xsi:type or py:pytype attributes, unless provided as
19509 __pyx_t_5 = PyObject_GetAttr(__pyx_v_temp, __pyx_n_ui_update); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19510 __Pyx_GOTREF(__pyx_t_5);
19511 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19512 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
19513 __Pyx_INCREF(__pyx_v__attributes);
19514 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__attributes);
19515 __Pyx_GIVEREF(__pyx_v__attributes);
19516 __pyx_t_7 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19517 __Pyx_GOTREF(__pyx_t_7);
19518 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19519 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
19520 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19522 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1928
19523 * temp = dict(temp)
19524 * temp.update(_attributes)
19525 * _attributes = temp # <<<<<<<<<<<<<<
19526 * # reuse existing xsi:type or py:pytype attributes, unless provided as
19529 __Pyx_INCREF(__pyx_v_temp);
19530 __Pyx_DECREF(__pyx_v__attributes);
19531 __pyx_v__attributes = __pyx_v_temp;
19536 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1931
19537 * # reuse existing xsi:type or py:pytype attributes, unless provided as
19539 * if _xsi is None and _pytype is None: # <<<<<<<<<<<<<<
19540 * dict_result = python.PyDict_GetItem(_attributes,
19541 * XML_SCHEMA_INSTANCE_TYPE_ATTR)
19543 __pyx_t_3 = (__pyx_v__xsi == Py_None);
19545 __pyx_t_8 = (__pyx_v__pytype == Py_None);
19546 __pyx_t_1 = __pyx_t_8;
19548 __pyx_t_1 = __pyx_t_3;
19552 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1933
19553 * if _xsi is None and _pytype is None:
19554 * dict_result = python.PyDict_GetItem(_attributes,
19555 * XML_SCHEMA_INSTANCE_TYPE_ATTR) # <<<<<<<<<<<<<<
19556 * if dict_result is not NULL:
19557 * _xsi = <object>dict_result
19559 __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
19561 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1934
19562 * dict_result = python.PyDict_GetItem(_attributes,
19563 * XML_SCHEMA_INSTANCE_TYPE_ATTR)
19564 * if dict_result is not NULL: # <<<<<<<<<<<<<<
19565 * _xsi = <object>dict_result
19566 * dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19568 __pyx_t_1 = (__pyx_v_dict_result != NULL);
19571 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1935
19572 * XML_SCHEMA_INSTANCE_TYPE_ATTR)
19573 * if dict_result is not NULL:
19574 * _xsi = <object>dict_result # <<<<<<<<<<<<<<
19575 * dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19576 * if dict_result is not NULL:
19578 __Pyx_INCREF(((PyObject *)__pyx_v_dict_result));
19579 __Pyx_DECREF(__pyx_v__xsi);
19580 __pyx_v__xsi = ((PyObject *)__pyx_v_dict_result);
19585 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1936
19586 * if dict_result is not NULL:
19587 * _xsi = <object>dict_result
19588 * dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE) # <<<<<<<<<<<<<<
19589 * if dict_result is not NULL:
19590 * _pytype = <object>dict_result
19592 __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19593 __Pyx_GOTREF(__pyx_t_7);
19594 __pyx_v_dict_result = PyDict_GetItem(__pyx_v__attributes, __pyx_t_7);
19595 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19597 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1937
19598 * _xsi = <object>dict_result
19599 * dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19600 * if dict_result is not NULL: # <<<<<<<<<<<<<<
19601 * _pytype = <object>dict_result
19604 __pyx_t_1 = (__pyx_v_dict_result != NULL);
19607 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1938
19608 * dict_result = python.PyDict_GetItem(_attributes, PYTYPE_ATTRIBUTE)
19609 * if dict_result is not NULL:
19610 * _pytype = <object>dict_result # <<<<<<<<<<<<<<
19612 * if _xsi is not None:
19614 __Pyx_INCREF(((PyObject *)__pyx_v_dict_result));
19615 __Pyx_DECREF(__pyx_v__pytype);
19616 __pyx_v__pytype = ((PyObject *)__pyx_v_dict_result);
19627 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1940
19628 * _pytype = <object>dict_result
19630 * if _xsi is not None: # <<<<<<<<<<<<<<
19632 * prefix, name = _xsi.split(u':', 1)
19634 __pyx_t_1 = (__pyx_v__xsi != Py_None);
19637 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1941
19639 * if _xsi is not None:
19640 * if u':' in _xsi: # <<<<<<<<<<<<<<
19641 * prefix, name = _xsi.split(u':', 1)
19642 * ns = nsmap.get(prefix)
19644 __pyx_t_1 = (PySequence_Contains(__pyx_v__xsi, ((PyObject *)__pyx_kp_u_32))); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19647 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1942
19648 * if _xsi is not None:
19650 * prefix, name = _xsi.split(u':', 1) # <<<<<<<<<<<<<<
19651 * ns = nsmap.get(prefix)
19652 * if ns != XML_SCHEMA_NS:
19654 __pyx_t_7 = PyObject_GetAttr(__pyx_v__xsi, __pyx_n_ui_split); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19655 __Pyx_GOTREF(__pyx_t_7);
19656 __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19657 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
19658 __Pyx_INCREF(((PyObject *)__pyx_kp_u_32));
19659 PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_kp_u_32));
19660 __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_32));
19661 __Pyx_INCREF(__pyx_int_1);
19662 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1);
19663 __Pyx_GIVEREF(__pyx_int_1);
19664 __pyx_t_5 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19665 __Pyx_GOTREF(__pyx_t_5);
19666 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19667 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
19668 if (PyTuple_CheckExact(__pyx_t_5) && likely(PyTuple_GET_SIZE(__pyx_t_5) == 2)) {
19669 PyObject* tuple = __pyx_t_5;
19670 __pyx_t_6 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_6);
19671 __pyx_t_7 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_7);
19672 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19673 __Pyx_DECREF(__pyx_v_prefix);
19674 __pyx_v_prefix = __pyx_t_6;
19676 __Pyx_DECREF(__pyx_v_name);
19677 __pyx_v_name = __pyx_t_7;
19680 __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19681 __Pyx_GOTREF(__pyx_t_9);
19682 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19683 __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_9, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19684 __Pyx_GOTREF(__pyx_t_6);
19685 __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_9, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19686 __Pyx_GOTREF(__pyx_t_7);
19687 if (__Pyx_EndUnpack(__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19688 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
19689 __Pyx_DECREF(__pyx_v_prefix);
19690 __pyx_v_prefix = __pyx_t_6;
19692 __Pyx_DECREF(__pyx_v_name);
19693 __pyx_v_name = __pyx_t_7;
19697 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1943
19699 * prefix, name = _xsi.split(u':', 1)
19700 * ns = nsmap.get(prefix) # <<<<<<<<<<<<<<
19701 * if ns != XML_SCHEMA_NS:
19702 * raise ValueError, u"XSD types require the XSD namespace"
19704 __pyx_t_5 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_ui_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19705 __Pyx_GOTREF(__pyx_t_5);
19706 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19707 __Pyx_GOTREF(((PyObject *)__pyx_t_7));
19708 __Pyx_INCREF(__pyx_v_prefix);
19709 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_prefix);
19710 __Pyx_GIVEREF(__pyx_v_prefix);
19711 __pyx_t_6 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1943; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19712 __Pyx_GOTREF(__pyx_t_6);
19713 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19714 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
19715 __Pyx_DECREF(__pyx_v_ns);
19716 __pyx_v_ns = __pyx_t_6;
19719 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1944
19720 * prefix, name = _xsi.split(u':', 1)
19721 * ns = nsmap.get(prefix)
19722 * if ns != XML_SCHEMA_NS: # <<<<<<<<<<<<<<
19723 * raise ValueError, u"XSD types require the XSD namespace"
19724 * elif nsmap is _DEFAULT_NSMAP:
19726 __pyx_t_6 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19727 __Pyx_GOTREF(__pyx_t_6);
19728 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19729 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19732 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1945
19733 * ns = nsmap.get(prefix)
19734 * if ns != XML_SCHEMA_NS:
19735 * raise ValueError, u"XSD types require the XSD namespace" # <<<<<<<<<<<<<<
19736 * elif nsmap is _DEFAULT_NSMAP:
19739 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_44), 0);
19740 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19747 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1946
19748 * if ns != XML_SCHEMA_NS:
19749 * raise ValueError, u"XSD types require the XSD namespace"
19750 * elif nsmap is _DEFAULT_NSMAP: # <<<<<<<<<<<<<<
19752 * _xsi = u'xsd:' + _xsi
19754 __pyx_t_1 = (__pyx_v_nsmap == ((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
19757 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1947
19758 * raise ValueError, u"XSD types require the XSD namespace"
19759 * elif nsmap is _DEFAULT_NSMAP:
19760 * name = _xsi # <<<<<<<<<<<<<<
19761 * _xsi = u'xsd:' + _xsi
19764 __Pyx_INCREF(__pyx_v__xsi);
19765 __Pyx_DECREF(__pyx_v_name);
19766 __pyx_v_name = __pyx_v__xsi;
19768 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1948
19769 * elif nsmap is _DEFAULT_NSMAP:
19771 * _xsi = u'xsd:' + _xsi # <<<<<<<<<<<<<<
19775 __pyx_t_6 = PyNumber_Add(((PyObject *)__pyx_kp_u_45), __pyx_v__xsi); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19776 __Pyx_GOTREF(__pyx_t_6);
19777 __Pyx_DECREF(__pyx_v__xsi);
19778 __pyx_v__xsi = __pyx_t_6;
19784 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1950
19785 * _xsi = u'xsd:' + _xsi
19787 * name = _xsi # <<<<<<<<<<<<<<
19788 * for prefix, ns in nsmap.items():
19789 * if ns == XML_SCHEMA_NS:
19791 __Pyx_INCREF(__pyx_v__xsi);
19792 __Pyx_DECREF(__pyx_v_name);
19793 __pyx_v_name = __pyx_v__xsi;
19795 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1951
19798 * for prefix, ns in nsmap.items(): # <<<<<<<<<<<<<<
19799 * if ns == XML_SCHEMA_NS:
19800 * if prefix is not None and prefix:
19802 __pyx_t_6 = PyObject_GetAttr(__pyx_v_nsmap, __pyx_n_ui_items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19803 __Pyx_GOTREF(__pyx_t_6);
19804 __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19805 __Pyx_GOTREF(__pyx_t_7);
19806 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19807 if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
19808 __pyx_t_4 = 0; __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6);
19810 __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19811 __Pyx_GOTREF(__pyx_t_6);
19813 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19815 if (likely(PyList_CheckExact(__pyx_t_6))) {
19816 if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
19817 __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
19818 } else if (likely(PyTuple_CheckExact(__pyx_t_6))) {
19819 if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
19820 __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_t_4++;
19822 __pyx_t_7 = PyIter_Next(__pyx_t_6);
19824 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19827 __Pyx_GOTREF(__pyx_t_7);
19829 if (PyTuple_CheckExact(__pyx_t_7) && likely(PyTuple_GET_SIZE(__pyx_t_7) == 2)) {
19830 PyObject* tuple = __pyx_t_7;
19831 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
19832 __pyx_t_9 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_9);
19833 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19834 __Pyx_DECREF(__pyx_v_prefix);
19835 __pyx_v_prefix = __pyx_t_5;
19837 __Pyx_DECREF(__pyx_v_ns);
19838 __pyx_v_ns = __pyx_t_9;
19841 __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19842 __Pyx_GOTREF(__pyx_t_10);
19843 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19844 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_10, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19845 __Pyx_GOTREF(__pyx_t_5);
19846 __pyx_t_9 = __Pyx_UnpackItem(__pyx_t_10, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19847 __Pyx_GOTREF(__pyx_t_9);
19848 if (__Pyx_EndUnpack(__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19849 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
19850 __Pyx_DECREF(__pyx_v_prefix);
19851 __pyx_v_prefix = __pyx_t_5;
19853 __Pyx_DECREF(__pyx_v_ns);
19854 __pyx_v_ns = __pyx_t_9;
19858 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1952
19860 * for prefix, ns in nsmap.items():
19861 * if ns == XML_SCHEMA_NS: # <<<<<<<<<<<<<<
19862 * if prefix is not None and prefix:
19863 * _xsi = prefix + u':' + _xsi
19865 __pyx_t_7 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19866 __Pyx_GOTREF(__pyx_t_7);
19867 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19868 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19871 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1953
19872 * for prefix, ns in nsmap.items():
19873 * if ns == XML_SCHEMA_NS:
19874 * if prefix is not None and prefix: # <<<<<<<<<<<<<<
19875 * _xsi = prefix + u':' + _xsi
19878 __pyx_t_1 = (__pyx_v_prefix != Py_None);
19880 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19881 __pyx_t_8 = __pyx_t_3;
19883 __pyx_t_8 = __pyx_t_1;
19887 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1954
19888 * if ns == XML_SCHEMA_NS:
19889 * if prefix is not None and prefix:
19890 * _xsi = prefix + u':' + _xsi # <<<<<<<<<<<<<<
19894 __pyx_t_7 = PyNumber_Add(__pyx_v_prefix, ((PyObject *)__pyx_kp_u_32)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19895 __Pyx_GOTREF(__pyx_t_7);
19896 __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_v__xsi); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19897 __Pyx_GOTREF(__pyx_t_9);
19898 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
19899 __Pyx_DECREF(__pyx_v__xsi);
19900 __pyx_v__xsi = __pyx_t_9;
19906 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1955
19907 * if prefix is not None and prefix:
19908 * _xsi = prefix + u':' + _xsi
19909 * break # <<<<<<<<<<<<<<
19911 * raise ValueError, u"XSD types require the XSD namespace"
19913 goto __pyx_L22_break;
19920 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1957
19923 * raise ValueError, u"XSD types require the XSD namespace" # <<<<<<<<<<<<<<
19924 * _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
19925 * if _pytype is None:
19927 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_44), 0);
19928 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19931 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19935 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1958
19937 * raise ValueError, u"XSD types require the XSD namespace"
19938 * _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi # <<<<<<<<<<<<<<
19939 * if _pytype is None:
19940 * # allow using unregistered or even wrong xsi:type names
19942 if (PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_v__xsi) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
19944 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1959
19945 * raise ValueError, u"XSD types require the XSD namespace"
19946 * _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi
19947 * if _pytype is None: # <<<<<<<<<<<<<<
19948 * # allow using unregistered or even wrong xsi:type names
19949 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
19951 __pyx_t_8 = (__pyx_v__pytype == Py_None);
19954 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1961
19955 * if _pytype is None:
19956 * # allow using unregistered or even wrong xsi:type names
19957 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi) # <<<<<<<<<<<<<<
19958 * if dict_result is NULL:
19959 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19961 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v__xsi);
19963 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1962
19964 * # allow using unregistered or even wrong xsi:type names
19965 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
19966 * if dict_result is NULL: # <<<<<<<<<<<<<<
19967 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19968 * if dict_result is not NULL:
19970 __pyx_t_8 = (__pyx_v_dict_result == NULL);
19973 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1963
19974 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, _xsi)
19975 * if dict_result is NULL:
19976 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name) # <<<<<<<<<<<<<<
19977 * if dict_result is not NULL:
19978 * _pytype = (<PyType>dict_result).name
19980 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT), __pyx_v_name);
19985 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1964
19986 * if dict_result is NULL:
19987 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19988 * if dict_result is not NULL: # <<<<<<<<<<<<<<
19989 * _pytype = (<PyType>dict_result).name
19992 __pyx_t_8 = (__pyx_v_dict_result != NULL);
19995 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1965
19996 * dict_result = python.PyDict_GetItem(_SCHEMA_TYPE_DICT, name)
19997 * if dict_result is not NULL:
19998 * _pytype = (<PyType>dict_result).name # <<<<<<<<<<<<<<
20000 * if _value is None and _pytype != u"str":
20002 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->name);
20003 __Pyx_DECREF(__pyx_v__pytype);
20004 __pyx_v__pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->name;
20015 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1967
20016 * _pytype = (<PyType>dict_result).name
20018 * if _value is None and _pytype != u"str": # <<<<<<<<<<<<<<
20019 * _pytype = _pytype or u"NoneType"
20022 __pyx_t_8 = (__pyx_v__value == Py_None);
20024 __pyx_t_6 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_n_u_str), Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20025 __Pyx_GOTREF(__pyx_t_6);
20026 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20027 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20028 __pyx_t_3 = __pyx_t_1;
20030 __pyx_t_3 = __pyx_t_8;
20034 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1968
20036 * if _value is None and _pytype != u"str":
20037 * _pytype = _pytype or u"NoneType" # <<<<<<<<<<<<<<
20039 * elif python._isString(_value):
20041 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__pytype); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20043 __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneType));
20044 __pyx_t_6 = __pyx_n_u_NoneType;
20046 __Pyx_INCREF(__pyx_v__pytype);
20047 __pyx_t_6 = __pyx_v__pytype;
20049 __Pyx_DECREF(__pyx_v__pytype);
20050 __pyx_v__pytype = __pyx_t_6;
20053 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1969
20054 * if _value is None and _pytype != u"str":
20055 * _pytype = _pytype or u"NoneType"
20056 * strval = None # <<<<<<<<<<<<<<
20057 * elif python._isString(_value):
20060 __Pyx_INCREF(Py_None);
20061 __Pyx_DECREF(__pyx_v_strval);
20062 __pyx_v_strval = Py_None;
20066 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1970
20067 * _pytype = _pytype or u"NoneType"
20069 * elif python._isString(_value): # <<<<<<<<<<<<<<
20071 * elif python.PyBool_Check(_value):
20073 __pyx_t_3 = _isString(__pyx_v__value);
20076 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1971
20078 * elif python._isString(_value):
20079 * strval = _value # <<<<<<<<<<<<<<
20080 * elif python.PyBool_Check(_value):
20083 __Pyx_INCREF(__pyx_v__value);
20084 __Pyx_DECREF(__pyx_v_strval);
20085 __pyx_v_strval = __pyx_v__value;
20089 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1972
20090 * elif python._isString(_value):
20092 * elif python.PyBool_Check(_value): # <<<<<<<<<<<<<<
20096 __pyx_t_3 = PyBool_Check(__pyx_v__value);
20099 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1973
20101 * elif python.PyBool_Check(_value):
20102 * if _value: # <<<<<<<<<<<<<<
20106 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20109 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1974
20110 * elif python.PyBool_Check(_value):
20112 * strval = u"true" # <<<<<<<<<<<<<<
20114 * strval = u"false"
20116 __Pyx_INCREF(((PyObject *)__pyx_n_u_true));
20117 __Pyx_DECREF(__pyx_v_strval);
20118 __pyx_v_strval = ((PyObject *)__pyx_n_u_true);
20123 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1976
20126 * strval = u"false" # <<<<<<<<<<<<<<
20128 * strval = unicode(_value)
20130 __Pyx_INCREF(((PyObject *)__pyx_n_u_false));
20131 __Pyx_DECREF(__pyx_v_strval);
20132 __pyx_v_strval = ((PyObject *)__pyx_n_u_false);
20139 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1978
20140 * strval = u"false"
20142 * strval = unicode(_value) # <<<<<<<<<<<<<<
20144 * if _pytype is None:
20146 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20147 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
20148 __Pyx_INCREF(__pyx_v__value);
20149 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__value);
20150 __Pyx_GIVEREF(__pyx_v__value);
20151 __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)&PyUnicode_Type)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20152 __Pyx_GOTREF(__pyx_t_9);
20153 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
20154 __Pyx_DECREF(__pyx_v_strval);
20155 __pyx_v_strval = __pyx_t_9;
20160 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1980
20161 * strval = unicode(_value)
20163 * if _pytype is None: # <<<<<<<<<<<<<<
20164 * _pytype = _pytypename(_value)
20167 __pyx_t_3 = (__pyx_v__pytype == Py_None);
20170 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1981
20172 * if _pytype is None:
20173 * _pytype = _pytypename(_value) # <<<<<<<<<<<<<<
20175 * if _pytype is not None:
20177 __pyx_t_9 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20178 __Pyx_GOTREF(__pyx_t_9);
20179 __Pyx_DECREF(__pyx_v__pytype);
20180 __pyx_v__pytype = __pyx_t_9;
20186 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1983
20187 * _pytype = _pytypename(_value)
20189 * if _pytype is not None: # <<<<<<<<<<<<<<
20190 * if _pytype == u"NoneType" or _pytype == u"none":
20193 __pyx_t_3 = (__pyx_v__pytype != Py_None);
20196 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1984
20198 * if _pytype is not None:
20199 * if _pytype == u"NoneType" or _pytype == u"none": # <<<<<<<<<<<<<<
20201 * _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
20203 __pyx_t_9 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_n_u_NoneType), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20204 __Pyx_GOTREF(__pyx_t_9);
20205 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20206 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20208 __pyx_t_9 = PyObject_RichCompare(__pyx_v__pytype, ((PyObject *)__pyx_n_u_none), Py_EQ); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20209 __Pyx_GOTREF(__pyx_t_9);
20210 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20211 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
20212 __pyx_t_1 = __pyx_t_8;
20214 __pyx_t_1 = __pyx_t_3;
20218 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1985
20219 * if _pytype is not None:
20220 * if _pytype == u"NoneType" or _pytype == u"none":
20221 * strval = None # <<<<<<<<<<<<<<
20222 * _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true"
20225 __Pyx_INCREF(Py_None);
20226 __Pyx_DECREF(__pyx_v_strval);
20227 __pyx_v_strval = Py_None;
20229 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1986
20230 * if _pytype == u"NoneType" or _pytype == u"none":
20232 * _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true" # <<<<<<<<<<<<<<
20234 * # check if type information from arguments is valid
20236 if (PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, ((PyObject *)__pyx_n_u_true)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20241 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1989
20243 * # check if type information from arguments is valid
20244 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype) # <<<<<<<<<<<<<<
20245 * if dict_result is not NULL:
20246 * type_check = (<PyType>dict_result).type_check
20248 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT), __pyx_v__pytype);
20250 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1990
20251 * # check if type information from arguments is valid
20252 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
20253 * if dict_result is not NULL: # <<<<<<<<<<<<<<
20254 * type_check = (<PyType>dict_result).type_check
20255 * if type_check is not None:
20257 __pyx_t_1 = (__pyx_v_dict_result != NULL);
20260 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1991
20261 * dict_result = python.PyDict_GetItem(_PYTYPE_DICT, _pytype)
20262 * if dict_result is not NULL:
20263 * type_check = (<PyType>dict_result).type_check # <<<<<<<<<<<<<<
20264 * if type_check is not None:
20265 * type_check(strval)
20267 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->type_check);
20268 __Pyx_DECREF(__pyx_v_type_check);
20269 __pyx_v_type_check = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_v_dict_result)->type_check;
20271 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1992
20272 * if dict_result is not NULL:
20273 * type_check = (<PyType>dict_result).type_check
20274 * if type_check is not None: # <<<<<<<<<<<<<<
20275 * type_check(strval)
20278 __pyx_t_1 = (__pyx_v_type_check != Py_None);
20281 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1993
20282 * type_check = (<PyType>dict_result).type_check
20283 * if type_check is not None:
20284 * type_check(strval) # <<<<<<<<<<<<<<
20286 * _attributes[PYTYPE_ATTRIBUTE] = _pytype
20288 __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20289 __Pyx_GOTREF(((PyObject *)__pyx_t_9));
20290 __Pyx_INCREF(__pyx_v_strval);
20291 PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_strval);
20292 __Pyx_GIVEREF(__pyx_v_strval);
20293 __pyx_t_6 = PyObject_Call(__pyx_v_type_check, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20294 __Pyx_GOTREF(__pyx_t_6);
20295 __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
20296 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20301 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1995
20302 * type_check(strval)
20304 * _attributes[PYTYPE_ATTRIBUTE] = _pytype # <<<<<<<<<<<<<<
20306 * return _makeElement(u"value", strval, _attributes, nsmap)
20308 __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20309 __Pyx_GOTREF(__pyx_t_6);
20310 if (PyObject_SetItem(__pyx_v__attributes, __pyx_t_6, __pyx_v__pytype) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20311 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20321 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1997
20322 * _attributes[PYTYPE_ATTRIBUTE] = _pytype
20324 * return _makeElement(u"value", strval, _attributes, nsmap) # <<<<<<<<<<<<<<
20328 __Pyx_XDECREF(__pyx_r);
20329 __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(((PyObject *)__pyx_n_u_value), __pyx_v_strval, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20330 __Pyx_GOTREF(__pyx_t_6);
20331 __pyx_r = __pyx_t_6;
20335 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20338 __Pyx_XDECREF(__pyx_t_5);
20339 __Pyx_XDECREF(__pyx_t_6);
20340 __Pyx_XDECREF(__pyx_t_7);
20341 __Pyx_XDECREF(__pyx_t_9);
20342 __Pyx_XDECREF(__pyx_t_10);
20343 __Pyx_AddTraceback("lxml.objectify.DataElement");
20346 __Pyx_DECREF(__pyx_v__attributes);
20347 __Pyx_DECREF(__pyx_v_temp);
20348 __Pyx_DECREF(__pyx_v_prefix);
20349 __Pyx_DECREF(__pyx_v_name);
20350 __Pyx_DECREF(__pyx_v_ns);
20351 __Pyx_DECREF(__pyx_v_strval);
20352 __Pyx_DECREF(__pyx_v_type_check);
20353 __Pyx_DECREF(__pyx_v__value);
20354 __Pyx_DECREF(__pyx_v_attrib);
20355 __Pyx_DECREF(__pyx_v_nsmap);
20356 __Pyx_DECREF(__pyx_v__pytype);
20357 __Pyx_DECREF(__pyx_v__xsi);
20358 __Pyx_XGIVEREF(__pyx_r);
20359 __Pyx_FinishRefcountContext();
20363 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":21
20364 * cdef _ObjectPath* _c_path
20365 * cdef Py_ssize_t _path_len
20366 * def __init__(self, path): # <<<<<<<<<<<<<<
20367 * if python._isString(path):
20368 * self._path = _parseObjectPathString(path)
20371 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20372 static int __pyx_pf_4lxml_9objectify_10ObjectPath___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20373 PyObject *__pyx_v_path = 0;
20376 PyObject *__pyx_t_2 = NULL;
20377 PyObject *__pyx_t_3 = NULL;
20378 PyObject *__pyx_t_4 = NULL;
20379 __pyx_t_4lxml_9objectify__ObjectPath *__pyx_t_5;
20380 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_path,0};
20381 __Pyx_SetupRefcountContext("__init__");
20382 if (unlikely(__pyx_kwds)) {
20383 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
20384 PyObject* values[1] = {0};
20385 switch (PyTuple_GET_SIZE(__pyx_args)) {
20386 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20388 default: goto __pyx_L5_argtuple_error;
20390 switch (PyTuple_GET_SIZE(__pyx_args)) {
20392 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_path);
20393 if (likely(values[0])) kw_args--;
20394 else goto __pyx_L5_argtuple_error;
20396 if (unlikely(kw_args > 0)) {
20397 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20399 __pyx_v_path = values[0];
20400 } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
20401 goto __pyx_L5_argtuple_error;
20403 __pyx_v_path = PyTuple_GET_ITEM(__pyx_args, 0);
20405 goto __pyx_L4_argument_unpacking_done;
20406 __pyx_L5_argtuple_error:;
20407 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20409 __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__");
20411 __pyx_L4_argument_unpacking_done:;
20412 __Pyx_INCREF((PyObject *)__pyx_v_self);
20413 __Pyx_INCREF(__pyx_v_path);
20415 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":22
20416 * cdef Py_ssize_t _path_len
20417 * def __init__(self, path):
20418 * if python._isString(path): # <<<<<<<<<<<<<<
20419 * self._path = _parseObjectPathString(path)
20420 * self._path_str = path
20422 __pyx_t_1 = _isString(__pyx_v_path);
20425 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":23
20426 * def __init__(self, path):
20427 * if python._isString(path):
20428 * self._path = _parseObjectPathString(path) # <<<<<<<<<<<<<<
20429 * self._path_str = path
20432 __pyx_t_2 = __pyx_f_4lxml_9objectify__parseObjectPathString(__pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20433 __Pyx_GOTREF(__pyx_t_2);
20434 __Pyx_GIVEREF(__pyx_t_2);
20435 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20436 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20437 ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_t_2;
20440 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":24
20441 * if python._isString(path):
20442 * self._path = _parseObjectPathString(path)
20443 * self._path_str = path # <<<<<<<<<<<<<<
20445 * self._path = _parseObjectPathList(path)
20447 __Pyx_INCREF(__pyx_v_path);
20448 __Pyx_GIVEREF(__pyx_v_path);
20449 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20450 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20451 ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_v_path;
20456 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":26
20457 * self._path_str = path
20459 * self._path = _parseObjectPathList(path) # <<<<<<<<<<<<<<
20460 * self._path_str = u'.'.join(path)
20461 * self._path_len = python.PyList_GET_SIZE(self._path)
20463 __pyx_t_2 = __pyx_f_4lxml_9objectify__parseObjectPathList(__pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20464 __Pyx_GOTREF(__pyx_t_2);
20465 __Pyx_GIVEREF(__pyx_t_2);
20466 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20467 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20468 ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path = __pyx_t_2;
20471 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":27
20473 * self._path = _parseObjectPathList(path)
20474 * self._path_str = u'.'.join(path) # <<<<<<<<<<<<<<
20475 * self._path_len = python.PyList_GET_SIZE(self._path)
20476 * self._c_path = _buildObjectPathSegments(self._path)
20478 __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_u_9), __pyx_n_ui_join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20479 __Pyx_GOTREF(__pyx_t_2);
20480 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20481 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
20482 __Pyx_INCREF(__pyx_v_path);
20483 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
20484 __Pyx_GIVEREF(__pyx_v_path);
20485 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20486 __Pyx_GOTREF(__pyx_t_4);
20487 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20488 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
20489 __Pyx_GIVEREF(__pyx_t_4);
20490 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20491 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20492 ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str = __pyx_t_4;
20497 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":28
20498 * self._path = _parseObjectPathList(path)
20499 * self._path_str = u'.'.join(path)
20500 * self._path_len = python.PyList_GET_SIZE(self._path) # <<<<<<<<<<<<<<
20501 * self._c_path = _buildObjectPathSegments(self._path)
20502 * self.find = self.__call__
20504 ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len = PyList_GET_SIZE(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path);
20506 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":29
20507 * self._path_str = u'.'.join(path)
20508 * self._path_len = python.PyList_GET_SIZE(self._path)
20509 * self._c_path = _buildObjectPathSegments(self._path) # <<<<<<<<<<<<<<
20510 * self.find = self.__call__
20513 __pyx_t_5 = __pyx_f_4lxml_9objectify__buildObjectPathSegments(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20514 ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path = __pyx_t_5;
20516 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":30
20517 * self._path_len = python.PyList_GET_SIZE(self._path)
20518 * self._c_path = _buildObjectPathSegments(self._path)
20519 * self.find = self.__call__ # <<<<<<<<<<<<<<
20521 * def __dealloc__(self):
20523 __pyx_t_4 = PyObject_GetAttr(__pyx_v_self, __pyx_n_ui___call__); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20524 __Pyx_GOTREF(__pyx_t_4);
20525 __Pyx_GIVEREF(__pyx_t_4);
20526 __Pyx_GOTREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find);
20527 __Pyx_DECREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find);
20528 ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->find = __pyx_t_4;
20534 __Pyx_XDECREF(__pyx_t_2);
20535 __Pyx_XDECREF(__pyx_t_3);
20536 __Pyx_XDECREF(__pyx_t_4);
20537 __Pyx_AddTraceback("lxml.objectify.ObjectPath.__init__");
20540 __Pyx_DECREF((PyObject *)__pyx_v_self);
20541 __Pyx_DECREF(__pyx_v_path);
20542 __Pyx_FinishRefcountContext();
20546 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":32
20547 * self.find = self.__call__
20549 * def __dealloc__(self): # <<<<<<<<<<<<<<
20550 * if self._c_path is not NULL:
20551 * python.PyMem_Free(self._c_path)
20554 static void __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(PyObject *__pyx_v_self); /*proto*/
20555 static void __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(PyObject *__pyx_v_self) {
20557 __Pyx_SetupRefcountContext("__dealloc__");
20558 __Pyx_INCREF((PyObject *)__pyx_v_self);
20560 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":33
20562 * def __dealloc__(self):
20563 * if self._c_path is not NULL: # <<<<<<<<<<<<<<
20564 * python.PyMem_Free(self._c_path)
20567 __pyx_t_1 = (((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path != NULL);
20570 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":34
20571 * def __dealloc__(self):
20572 * if self._c_path is not NULL:
20573 * python.PyMem_Free(self._c_path) # <<<<<<<<<<<<<<
20575 * def __str__(self):
20577 PyMem_Free(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path);
20582 __Pyx_DECREF((PyObject *)__pyx_v_self);
20583 __Pyx_FinishRefcountContext();
20586 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":36
20587 * python.PyMem_Free(self._c_path)
20589 * def __str__(self): # <<<<<<<<<<<<<<
20590 * return self._path_str
20594 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___str__(PyObject *__pyx_v_self); /*proto*/
20595 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___str__(PyObject *__pyx_v_self) {
20596 PyObject *__pyx_r = NULL;
20597 __Pyx_SetupRefcountContext("__str__");
20599 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":37
20601 * def __str__(self):
20602 * return self._path_str # <<<<<<<<<<<<<<
20604 * def __call__(self, _Element root not None, *default):
20606 __Pyx_XDECREF(__pyx_r);
20607 __Pyx_INCREF(((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str);
20608 __pyx_r = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_str;
20611 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20613 __Pyx_XGIVEREF(__pyx_r);
20614 __Pyx_FinishRefcountContext();
20618 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":39
20619 * return self._path_str
20621 * def __call__(self, _Element root not None, *default): # <<<<<<<<<<<<<<
20622 * u"""Follow the attribute path in the object structure and return the
20623 * target attribute value.
20626 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20627 static char __pyx_doc_4lxml_9objectify_10ObjectPath___call__[] = "Follow the attribute path in the object structure and return the\n target attribute value.\n\n If it it not found, either returns a default value (if one was passed\n as second argument) or raises AttributeError.\n ";
20628 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath___call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20629 struct LxmlElement *__pyx_v_root = 0;
20630 PyObject *__pyx_v_default = 0;
20631 Py_ssize_t __pyx_v_use_default;
20632 PyObject *__pyx_r = NULL;
20634 PyObject *__pyx_t_2 = NULL;
20635 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_root,0};
20636 __Pyx_SetupRefcountContext("__call__");
20637 if (PyTuple_GET_SIZE(__pyx_args) > 1) {
20638 __pyx_v_default = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); __Pyx_GOTREF(__pyx_v_default);
20639 if (unlikely(!__pyx_v_default)) return NULL;
20641 __pyx_v_default = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
20643 if (unlikely(__pyx_kwds)) {
20644 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
20645 PyObject* values[1] = {0};
20646 switch (PyTuple_GET_SIZE(__pyx_args)) {
20648 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20651 switch (PyTuple_GET_SIZE(__pyx_args)) {
20653 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_root);
20654 if (likely(values[0])) kw_args--;
20655 else goto __pyx_L5_argtuple_error;
20657 if (unlikely(kw_args > 0)) {
20658 const Py_ssize_t used_pos_args = (PyTuple_GET_SIZE(__pyx_args) < 1) ? PyTuple_GET_SIZE(__pyx_args) : 1;
20659 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20661 __pyx_v_root = ((struct LxmlElement *)values[0]);
20662 } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
20663 goto __pyx_L5_argtuple_error;
20665 __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
20667 goto __pyx_L4_argument_unpacking_done;
20668 __pyx_L5_argtuple_error:;
20669 __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20671 __Pyx_DECREF(__pyx_v_default);
20672 __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__");
20674 __pyx_L4_argument_unpacking_done:;
20675 __Pyx_INCREF((PyObject *)__pyx_v_self);
20676 __Pyx_INCREF((PyObject *)__pyx_v_root);
20677 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20679 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":47
20681 * cdef Py_ssize_t use_default
20682 * use_default = python.PyTuple_GET_SIZE(default) # <<<<<<<<<<<<<<
20683 * if use_default == 1:
20684 * default = python.PyTuple_GET_ITEM(default, 0)
20686 __pyx_v_use_default = PyTuple_GET_SIZE(__pyx_v_default);
20688 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":48
20689 * cdef Py_ssize_t use_default
20690 * use_default = python.PyTuple_GET_SIZE(default)
20691 * if use_default == 1: # <<<<<<<<<<<<<<
20692 * default = python.PyTuple_GET_ITEM(default, 0)
20693 * python.Py_INCREF(default)
20695 __pyx_t_1 = (__pyx_v_use_default == 1);
20698 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":49
20699 * use_default = python.PyTuple_GET_SIZE(default)
20700 * if use_default == 1:
20701 * default = python.PyTuple_GET_ITEM(default, 0) # <<<<<<<<<<<<<<
20702 * python.Py_INCREF(default)
20705 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_v_default, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20706 __Pyx_GOTREF(__pyx_t_2);
20707 __Pyx_DECREF(__pyx_v_default);
20708 __pyx_v_default = __pyx_t_2;
20711 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":50
20712 * if use_default == 1:
20713 * default = python.PyTuple_GET_ITEM(default, 0)
20714 * python.Py_INCREF(default) # <<<<<<<<<<<<<<
20716 * elif use_default > 1:
20718 Py_INCREF(__pyx_v_default);
20720 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":51
20721 * default = python.PyTuple_GET_ITEM(default, 0)
20722 * python.Py_INCREF(default)
20723 * use_default = 1 # <<<<<<<<<<<<<<
20724 * elif use_default > 1:
20725 * raise TypeError, u"invalid number of arguments: needs one or two"
20727 __pyx_v_use_default = 1;
20731 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":52
20732 * python.Py_INCREF(default)
20734 * elif use_default > 1: # <<<<<<<<<<<<<<
20735 * raise TypeError, u"invalid number of arguments: needs one or two"
20736 * return _findObjectPath(root, self._c_path, self._path_len,
20738 __pyx_t_1 = (__pyx_v_use_default > 1);
20741 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":53
20743 * elif use_default > 1:
20744 * raise TypeError, u"invalid number of arguments: needs one or two" # <<<<<<<<<<<<<<
20745 * return _findObjectPath(root, self._c_path, self._path_len,
20746 * default, use_default)
20748 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_46), 0);
20749 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20754 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":54
20755 * elif use_default > 1:
20756 * raise TypeError, u"invalid number of arguments: needs one or two"
20757 * return _findObjectPath(root, self._c_path, self._path_len, # <<<<<<<<<<<<<<
20758 * default, use_default)
20761 __Pyx_XDECREF(__pyx_r);
20763 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":55
20764 * raise TypeError, u"invalid number of arguments: needs one or two"
20765 * return _findObjectPath(root, self._c_path, self._path_len,
20766 * default, use_default) # <<<<<<<<<<<<<<
20768 * def hasattr(self, _Element root not None):
20770 __pyx_t_2 = __pyx_f_4lxml_9objectify__findObjectPath(__pyx_v_root, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len, __pyx_v_default, __pyx_v_use_default); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20771 __Pyx_GOTREF(__pyx_t_2);
20772 __pyx_r = __pyx_t_2;
20776 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20779 __Pyx_XDECREF(__pyx_t_2);
20780 __Pyx_AddTraceback("lxml.objectify.ObjectPath.__call__");
20783 __Pyx_DECREF(__pyx_v_default);
20784 __Pyx_DECREF((PyObject *)__pyx_v_self);
20785 __Pyx_DECREF((PyObject *)__pyx_v_root);
20786 __Pyx_XGIVEREF(__pyx_r);
20787 __Pyx_FinishRefcountContext();
20791 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":57
20792 * default, use_default)
20794 * def hasattr(self, _Element root not None): # <<<<<<<<<<<<<<
20795 * u"hasattr(self, root)"
20799 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root); /*proto*/
20800 static char __pyx_doc_4lxml_9objectify_10ObjectPath_hasattr[] = "hasattr(self, root)";
20801 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr(PyObject *__pyx_v_self, PyObject *__pyx_v_root) {
20802 PyObject *__pyx_r = NULL;
20803 PyObject *__pyx_t_1 = NULL;
20805 PyObject *__pyx_t_3 = NULL;
20806 PyObject *__pyx_t_4 = NULL;
20807 PyObject *__pyx_t_5 = NULL;
20808 __Pyx_SetupRefcountContext("hasattr");
20809 __Pyx_INCREF((PyObject *)__pyx_v_self);
20810 __Pyx_INCREF((PyObject *)__pyx_v_root);
20811 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20813 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":59
20814 * def hasattr(self, _Element root not None):
20815 * u"hasattr(self, root)"
20816 * try: # <<<<<<<<<<<<<<
20817 * _findObjectPath(root, self._c_path, self._path_len, None, 0)
20818 * except AttributeError:
20821 PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
20822 __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
20823 __Pyx_XGOTREF(__pyx_save_exc_type);
20824 __Pyx_XGOTREF(__pyx_save_exc_value);
20825 __Pyx_XGOTREF(__pyx_save_exc_tb);
20828 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":60
20829 * u"hasattr(self, root)"
20831 * _findObjectPath(root, self._c_path, self._path_len, None, 0) # <<<<<<<<<<<<<<
20832 * except AttributeError:
20835 __pyx_t_1 = __pyx_f_4lxml_9objectify__findObjectPath(((struct LxmlElement *)__pyx_v_root), ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len, Py_None, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
20836 __Pyx_GOTREF(__pyx_t_1);
20837 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20839 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
20840 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
20841 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
20842 goto __pyx_L12_try_end;
20844 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20846 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":61
20848 * _findObjectPath(root, self._c_path, self._path_len, None, 0)
20849 * except AttributeError: # <<<<<<<<<<<<<<
20853 __pyx_t_2 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
20855 __Pyx_AddTraceback("lxml.objectify.hasattr");
20856 if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
20857 __Pyx_GOTREF(__pyx_t_1);
20858 __Pyx_GOTREF(__pyx_t_3);
20859 __Pyx_GOTREF(__pyx_t_4);
20861 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":62
20862 * _findObjectPath(root, self._c_path, self._path_len, None, 0)
20863 * except AttributeError:
20864 * return False # <<<<<<<<<<<<<<
20868 __Pyx_XDECREF(__pyx_r);
20869 __pyx_t_5 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
20870 __Pyx_GOTREF(__pyx_t_5);
20871 __pyx_r = __pyx_t_5;
20873 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20874 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20875 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20876 goto __pyx_L8_except_return;
20877 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20878 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20879 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20880 goto __pyx_L6_exception_handled;
20882 __pyx_L7_except_error:;
20883 __Pyx_XDECREF(__pyx_save_exc_type);
20884 __Pyx_XDECREF(__pyx_save_exc_value);
20885 __Pyx_XDECREF(__pyx_save_exc_tb);
20886 goto __pyx_L1_error;
20887 __pyx_L8_except_return:;
20888 __Pyx_XGIVEREF(__pyx_save_exc_type);
20889 __Pyx_XGIVEREF(__pyx_save_exc_value);
20890 __Pyx_XGIVEREF(__pyx_save_exc_tb);
20891 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
20893 __pyx_L6_exception_handled:;
20894 __Pyx_XGIVEREF(__pyx_save_exc_type);
20895 __Pyx_XGIVEREF(__pyx_save_exc_value);
20896 __Pyx_XGIVEREF(__pyx_save_exc_tb);
20897 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
20898 __pyx_L12_try_end:;
20901 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":63
20902 * except AttributeError:
20904 * return True # <<<<<<<<<<<<<<
20906 * def setattr(self, _Element root not None, value):
20908 __Pyx_XDECREF(__pyx_r);
20909 __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20910 __Pyx_GOTREF(__pyx_t_4);
20911 __pyx_r = __pyx_t_4;
20915 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20918 __Pyx_XDECREF(__pyx_t_1);
20919 __Pyx_XDECREF(__pyx_t_3);
20920 __Pyx_XDECREF(__pyx_t_4);
20921 __Pyx_XDECREF(__pyx_t_5);
20922 __Pyx_AddTraceback("lxml.objectify.ObjectPath.hasattr");
20925 __Pyx_DECREF((PyObject *)__pyx_v_self);
20926 __Pyx_DECREF((PyObject *)__pyx_v_root);
20927 __Pyx_XGIVEREF(__pyx_r);
20928 __Pyx_FinishRefcountContext();
20932 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":65
20935 * def setattr(self, _Element root not None, value): # <<<<<<<<<<<<<<
20936 * u"""setattr(self, root, value)
20940 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20941 static char __pyx_doc_4lxml_9objectify_10ObjectPath_setattr[] = "setattr(self, root, value)\n\n Set the value of the target element in a subtree.\n\n If any of the children on the path does not exist, it is created.\n ";
20942 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_setattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20943 struct LxmlElement *__pyx_v_root = 0;
20944 PyObject *__pyx_v_value = 0;
20945 PyObject *__pyx_r = NULL;
20946 PyObject *__pyx_t_1 = NULL;
20947 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_root,&__pyx_n_ui_value,0};
20948 __Pyx_SetupRefcountContext("setattr");
20949 if (unlikely(__pyx_kwds)) {
20950 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
20951 PyObject* values[2] = {0,0};
20952 switch (PyTuple_GET_SIZE(__pyx_args)) {
20953 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20954 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20956 default: goto __pyx_L5_argtuple_error;
20958 switch (PyTuple_GET_SIZE(__pyx_args)) {
20960 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_root);
20961 if (likely(values[0])) kw_args--;
20962 else goto __pyx_L5_argtuple_error;
20964 values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_value);
20965 if (likely(values[1])) kw_args--;
20967 __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20970 if (unlikely(kw_args > 0)) {
20971 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20973 __pyx_v_root = ((struct LxmlElement *)values[0]);
20974 __pyx_v_value = values[1];
20975 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
20976 goto __pyx_L5_argtuple_error;
20978 __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
20979 __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
20981 goto __pyx_L4_argument_unpacking_done;
20982 __pyx_L5_argtuple_error:;
20983 __Pyx_RaiseArgtupleInvalid("setattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
20985 __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr");
20987 __pyx_L4_argument_unpacking_done:;
20988 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20990 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":72
20991 * If any of the children on the path does not exist, it is created.
20993 * _createObjectPath(root, self._c_path, self._path_len, 1, value) # <<<<<<<<<<<<<<
20995 * def addattr(self, _Element root not None, value):
20997 __pyx_t_1 = __pyx_f_4lxml_9objectify__createObjectPath(__pyx_v_root, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len, 1, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
20998 __Pyx_GOTREF(__pyx_t_1);
20999 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21001 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21004 __Pyx_XDECREF(__pyx_t_1);
21005 __Pyx_AddTraceback("lxml.objectify.ObjectPath.setattr");
21008 __Pyx_XGIVEREF(__pyx_r);
21009 __Pyx_FinishRefcountContext();
21013 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":74
21014 * _createObjectPath(root, self._c_path, self._path_len, 1, value)
21016 * def addattr(self, _Element root not None, value): # <<<<<<<<<<<<<<
21017 * u"""addattr(self, root, value)
21021 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21022 static char __pyx_doc_4lxml_9objectify_10ObjectPath_addattr[] = "addattr(self, root, value)\n\n Append a value to the target element in a subtree.\n\n If any of the children on the path does not exist, it is created.\n ";
21023 static PyObject *__pyx_pf_4lxml_9objectify_10ObjectPath_addattr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21024 struct LxmlElement *__pyx_v_root = 0;
21025 PyObject *__pyx_v_value = 0;
21026 PyObject *__pyx_r = NULL;
21027 PyObject *__pyx_t_1 = NULL;
21028 static PyObject **__pyx_pyargnames[] = {&__pyx_n_ui_root,&__pyx_n_ui_value,0};
21029 __Pyx_SetupRefcountContext("addattr");
21030 if (unlikely(__pyx_kwds)) {
21031 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
21032 PyObject* values[2] = {0,0};
21033 switch (PyTuple_GET_SIZE(__pyx_args)) {
21034 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21035 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21037 default: goto __pyx_L5_argtuple_error;
21039 switch (PyTuple_GET_SIZE(__pyx_args)) {
21041 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_root);
21042 if (likely(values[0])) kw_args--;
21043 else goto __pyx_L5_argtuple_error;
21045 values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_ui_value);
21046 if (likely(values[1])) kw_args--;
21048 __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, 1); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21051 if (unlikely(kw_args > 0)) {
21052 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "addattr") < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21054 __pyx_v_root = ((struct LxmlElement *)values[0]);
21055 __pyx_v_value = values[1];
21056 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
21057 goto __pyx_L5_argtuple_error;
21059 __pyx_v_root = ((struct LxmlElement *)PyTuple_GET_ITEM(__pyx_args, 0));
21060 __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
21062 goto __pyx_L4_argument_unpacking_done;
21063 __pyx_L5_argtuple_error:;
21064 __Pyx_RaiseArgtupleInvalid("addattr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
21066 __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr");
21068 __pyx_L4_argument_unpacking_done:;
21069 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_11etreepublic__Element, 0, "root", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21071 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":81
21072 * If any of the children on the path does not exist, it is created.
21074 * _createObjectPath(root, self._c_path, self._path_len, 0, value) # <<<<<<<<<<<<<<
21076 * cdef object __MATCH_PATH_SEGMENT
21078 __pyx_t_1 = __pyx_f_4lxml_9objectify__createObjectPath(__pyx_v_root, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_c_path, ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)__pyx_v_self)->_path_len, 0, __pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21079 __Pyx_GOTREF(__pyx_t_1);
21080 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21082 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21085 __Pyx_XDECREF(__pyx_t_1);
21086 __Pyx_AddTraceback("lxml.objectify.ObjectPath.addattr");
21089 __Pyx_XGIVEREF(__pyx_r);
21090 __Pyx_FinishRefcountContext();
21094 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":91
21095 * _RELATIVE_PATH_SEGMENT = (None, None, 0)
21097 * cdef _parseObjectPathString(path): # <<<<<<<<<<<<<<
21098 * u"""Parse object path string into a (ns, name, index) list.
21102 static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathString(PyObject *__pyx_v_path) {
21103 int __pyx_v_has_dot;
21104 PyObject *__pyx_v_new_path = 0;
21105 PyObject *__pyx_v_path_pos;
21106 PyObject *__pyx_v_match;
21107 PyObject *__pyx_v_dot;
21108 PyObject *__pyx_v_ns;
21109 PyObject *__pyx_v_name;
21110 PyObject *__pyx_v_index;
21111 PyObject *__pyx_r = NULL;
21112 PyObject *__pyx_t_1 = NULL;
21114 PyObject *__pyx_t_3 = NULL;
21115 PyObject *__pyx_t_4 = NULL;
21116 PyObject *__pyx_t_5 = NULL;
21117 PyObject *__pyx_t_6 = NULL;
21118 PyObject *__pyx_t_7 = NULL;
21122 __Pyx_SetupRefcountContext("_parseObjectPathString");
21123 __Pyx_INCREF(__pyx_v_path);
21124 __pyx_v_path_pos = Py_None; __Pyx_INCREF(Py_None);
21125 __pyx_v_match = Py_None; __Pyx_INCREF(Py_None);
21126 __pyx_v_dot = Py_None; __Pyx_INCREF(Py_None);
21127 __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
21128 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
21129 __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
21131 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":95
21133 * cdef bint has_dot
21134 * cdef list new_path = [] # <<<<<<<<<<<<<<
21135 * if python.PyString_Check(path):
21136 * path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21138 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21139 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
21140 __pyx_v_new_path = __pyx_t_1;
21143 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":96
21144 * cdef bint has_dot
21145 * cdef list new_path = []
21146 * if python.PyString_Check(path): # <<<<<<<<<<<<<<
21147 * path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21148 * path = path.strip()
21150 __pyx_t_2 = PyString_Check(__pyx_v_path);
21153 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":97
21154 * cdef list new_path = []
21155 * if python.PyString_Check(path):
21156 * path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL) # <<<<<<<<<<<<<<
21157 * path = path.strip()
21160 __pyx_t_1 = PyUnicode_FromEncodedObject(__pyx_v_path, __pyx_k_ASCII, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21161 __Pyx_GOTREF(__pyx_t_1);
21162 __Pyx_DECREF(__pyx_v_path);
21163 __pyx_v_path = __pyx_t_1;
21169 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":98
21170 * if python.PyString_Check(path):
21171 * path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21172 * path = path.strip() # <<<<<<<<<<<<<<
21174 * return [_RELATIVE_PATH_SEGMENT]
21176 __pyx_t_1 = PyObject_GetAttr(__pyx_v_path, __pyx_n_ui_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21177 __Pyx_GOTREF(__pyx_t_1);
21178 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21179 __Pyx_GOTREF(__pyx_t_3);
21180 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21181 __Pyx_DECREF(__pyx_v_path);
21182 __pyx_v_path = __pyx_t_3;
21185 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":99
21186 * path = python.PyUnicode_FromEncodedObject(path, 'ASCII', NULL)
21187 * path = path.strip()
21188 * if path == u'.': # <<<<<<<<<<<<<<
21189 * return [_RELATIVE_PATH_SEGMENT]
21192 __pyx_t_3 = PyObject_RichCompare(__pyx_v_path, ((PyObject *)__pyx_kp_u_9), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21193 __Pyx_GOTREF(__pyx_t_3);
21194 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21195 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21198 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":100
21199 * path = path.strip()
21201 * return [_RELATIVE_PATH_SEGMENT] # <<<<<<<<<<<<<<
21203 * while python.PyUnicode_GET_SIZE(path) > 0:
21205 __Pyx_XDECREF(__pyx_r);
21206 __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21207 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
21208 __Pyx_INCREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
21209 PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
21210 __Pyx_GIVEREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
21211 __pyx_r = ((PyObject *)__pyx_t_3);
21218 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":101
21220 * return [_RELATIVE_PATH_SEGMENT]
21221 * path_pos = 0 # <<<<<<<<<<<<<<
21222 * while python.PyUnicode_GET_SIZE(path) > 0:
21223 * match = __MATCH_PATH_SEGMENT(path, path_pos)
21225 __Pyx_INCREF(__pyx_int_0);
21226 __Pyx_DECREF(__pyx_v_path_pos);
21227 __pyx_v_path_pos = __pyx_int_0;
21229 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":102
21230 * return [_RELATIVE_PATH_SEGMENT]
21232 * while python.PyUnicode_GET_SIZE(path) > 0: # <<<<<<<<<<<<<<
21233 * match = __MATCH_PATH_SEGMENT(path, path_pos)
21234 * if match is None:
21237 __pyx_t_2 = (PyUnicode_GET_SIZE(__pyx_v_path) > 0);
21238 if (!__pyx_t_2) break;
21240 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":103
21242 * while python.PyUnicode_GET_SIZE(path) > 0:
21243 * match = __MATCH_PATH_SEGMENT(path, path_pos) # <<<<<<<<<<<<<<
21244 * if match is None:
21247 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21248 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
21249 __Pyx_INCREF(__pyx_v_path);
21250 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path);
21251 __Pyx_GIVEREF(__pyx_v_path);
21252 __Pyx_INCREF(__pyx_v_path_pos);
21253 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_path_pos);
21254 __Pyx_GIVEREF(__pyx_v_path_pos);
21255 __pyx_t_1 = PyObject_Call(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21256 __Pyx_GOTREF(__pyx_t_1);
21257 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
21258 __Pyx_DECREF(__pyx_v_match);
21259 __pyx_v_match = __pyx_t_1;
21262 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":104
21263 * while python.PyUnicode_GET_SIZE(path) > 0:
21264 * match = __MATCH_PATH_SEGMENT(path, path_pos)
21265 * if match is None: # <<<<<<<<<<<<<<
21269 __pyx_t_2 = (__pyx_v_match == Py_None);
21272 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":105
21273 * match = __MATCH_PATH_SEGMENT(path, path_pos)
21274 * if match is None:
21275 * break # <<<<<<<<<<<<<<
21277 * dot, ns, name, index = match.groups()
21279 goto __pyx_L6_break;
21284 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":107
21287 * dot, ns, name, index = match.groups() # <<<<<<<<<<<<<<
21288 * if index is None or not index:
21291 __pyx_t_1 = PyObject_GetAttr(__pyx_v_match, __pyx_n_ui_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21292 __Pyx_GOTREF(__pyx_t_1);
21293 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21294 __Pyx_GOTREF(__pyx_t_3);
21295 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21296 if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 4)) {
21297 PyObject* tuple = __pyx_t_3;
21298 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
21299 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
21300 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_5);
21301 __pyx_t_6 = PyTuple_GET_ITEM(tuple, 3); __Pyx_INCREF(__pyx_t_6);
21302 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21303 __Pyx_DECREF(__pyx_v_dot);
21304 __pyx_v_dot = __pyx_t_1;
21306 __Pyx_DECREF(__pyx_v_ns);
21307 __pyx_v_ns = __pyx_t_4;
21309 __Pyx_DECREF(__pyx_v_name);
21310 __pyx_v_name = __pyx_t_5;
21312 __Pyx_DECREF(__pyx_v_index);
21313 __pyx_v_index = __pyx_t_6;
21316 __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21317 __Pyx_GOTREF(__pyx_t_7);
21318 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21319 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21320 __Pyx_GOTREF(__pyx_t_1);
21321 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21322 __Pyx_GOTREF(__pyx_t_4);
21323 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21324 __Pyx_GOTREF(__pyx_t_5);
21325 __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_7, 3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21326 __Pyx_GOTREF(__pyx_t_6);
21327 if (__Pyx_EndUnpack(__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21328 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
21329 __Pyx_DECREF(__pyx_v_dot);
21330 __pyx_v_dot = __pyx_t_1;
21332 __Pyx_DECREF(__pyx_v_ns);
21333 __pyx_v_ns = __pyx_t_4;
21335 __Pyx_DECREF(__pyx_v_name);
21336 __pyx_v_name = __pyx_t_5;
21338 __Pyx_DECREF(__pyx_v_index);
21339 __pyx_v_index = __pyx_t_6;
21343 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":108
21345 * dot, ns, name, index = match.groups()
21346 * if index is None or not index: # <<<<<<<<<<<<<<
21350 __pyx_t_2 = (__pyx_v_index == Py_None);
21352 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21353 __pyx_t_9 = (!__pyx_t_8);
21355 __pyx_t_9 = __pyx_t_2;
21359 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":109
21360 * dot, ns, name, index = match.groups()
21361 * if index is None or not index:
21362 * index = 0 # <<<<<<<<<<<<<<
21364 * index = int(index)
21366 __Pyx_INCREF(__pyx_int_0);
21367 __Pyx_DECREF(__pyx_v_index);
21368 __pyx_v_index = __pyx_int_0;
21373 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":111
21376 * index = int(index) # <<<<<<<<<<<<<<
21377 * has_dot = dot == u'.'
21378 * if python.PyList_GET_SIZE(new_path) == 0:
21380 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21381 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
21382 __Pyx_INCREF(__pyx_v_index);
21383 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
21384 __Pyx_GIVEREF(__pyx_v_index);
21385 __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21386 __Pyx_GOTREF(__pyx_t_6);
21387 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
21388 __Pyx_DECREF(__pyx_v_index);
21389 __pyx_v_index = __pyx_t_6;
21394 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":112
21396 * index = int(index)
21397 * has_dot = dot == u'.' # <<<<<<<<<<<<<<
21398 * if python.PyList_GET_SIZE(new_path) == 0:
21401 __pyx_t_6 = PyObject_RichCompare(__pyx_v_dot, ((PyObject *)__pyx_kp_u_9), Py_EQ); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21402 __Pyx_GOTREF(__pyx_t_6);
21403 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21404 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21405 __pyx_v_has_dot = __pyx_t_9;
21407 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":113
21408 * index = int(index)
21409 * has_dot = dot == u'.'
21410 * if python.PyList_GET_SIZE(new_path) == 0: # <<<<<<<<<<<<<<
21412 * # path '.child' => ignore root
21414 __pyx_t_9 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21417 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":114
21418 * has_dot = dot == u'.'
21419 * if python.PyList_GET_SIZE(new_path) == 0:
21420 * if has_dot: # <<<<<<<<<<<<<<
21421 * # path '.child' => ignore root
21422 * new_path.append(_RELATIVE_PATH_SEGMENT)
21424 __pyx_t_9 = __pyx_v_has_dot;
21427 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":116
21429 * # path '.child' => ignore root
21430 * new_path.append(_RELATIVE_PATH_SEGMENT) # <<<<<<<<<<<<<<
21432 * raise ValueError, u"index not allowed on root node"
21434 if (unlikely(__pyx_v_new_path == Py_None)) {
21435 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21437 __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_new_path), __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21441 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":117
21442 * # path '.child' => ignore root
21443 * new_path.append(_RELATIVE_PATH_SEGMENT)
21444 * elif index != 0: # <<<<<<<<<<<<<<
21445 * raise ValueError, u"index not allowed on root node"
21446 * elif not has_dot:
21448 __pyx_t_6 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21449 __Pyx_GOTREF(__pyx_t_6);
21450 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21451 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21454 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":118
21455 * new_path.append(_RELATIVE_PATH_SEGMENT)
21457 * raise ValueError, u"index not allowed on root node" # <<<<<<<<<<<<<<
21458 * elif not has_dot:
21459 * raise ValueError, u"invalid path"
21461 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_47), 0);
21462 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21469 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":119
21471 * raise ValueError, u"index not allowed on root node"
21472 * elif not has_dot: # <<<<<<<<<<<<<<
21473 * raise ValueError, u"invalid path"
21474 * if ns is not None:
21476 __pyx_t_9 = (!__pyx_v_has_dot);
21479 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":120
21480 * raise ValueError, u"index not allowed on root node"
21481 * elif not has_dot:
21482 * raise ValueError, u"invalid path" # <<<<<<<<<<<<<<
21483 * if ns is not None:
21484 * ns = python.PyUnicode_AsUTF8String(ns)
21486 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_48), 0);
21487 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21492 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":121
21493 * elif not has_dot:
21494 * raise ValueError, u"invalid path"
21495 * if ns is not None: # <<<<<<<<<<<<<<
21496 * ns = python.PyUnicode_AsUTF8String(ns)
21497 * name = python.PyUnicode_AsUTF8String(name)
21499 __pyx_t_9 = (__pyx_v_ns != Py_None);
21502 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":122
21503 * raise ValueError, u"invalid path"
21504 * if ns is not None:
21505 * ns = python.PyUnicode_AsUTF8String(ns) # <<<<<<<<<<<<<<
21506 * name = python.PyUnicode_AsUTF8String(name)
21507 * new_path.append( (ns, name, index) )
21509 __pyx_t_6 = PyUnicode_AsUTF8String(__pyx_v_ns); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21510 __Pyx_GOTREF(__pyx_t_6);
21511 __Pyx_DECREF(__pyx_v_ns);
21512 __pyx_v_ns = __pyx_t_6;
21518 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":123
21519 * if ns is not None:
21520 * ns = python.PyUnicode_AsUTF8String(ns)
21521 * name = python.PyUnicode_AsUTF8String(name) # <<<<<<<<<<<<<<
21522 * new_path.append( (ns, name, index) )
21525 __pyx_t_6 = PyUnicode_AsUTF8String(__pyx_v_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21526 __Pyx_GOTREF(__pyx_t_6);
21527 __Pyx_DECREF(__pyx_v_name);
21528 __pyx_v_name = __pyx_t_6;
21531 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":124
21532 * ns = python.PyUnicode_AsUTF8String(ns)
21533 * name = python.PyUnicode_AsUTF8String(name)
21534 * new_path.append( (ns, name, index) ) # <<<<<<<<<<<<<<
21536 * path_pos = match.end()
21538 if (unlikely(__pyx_v_new_path == Py_None)) {
21539 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21541 __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21542 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
21543 __Pyx_INCREF(__pyx_v_ns);
21544 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_ns);
21545 __Pyx_GIVEREF(__pyx_v_ns);
21546 __Pyx_INCREF(__pyx_v_name);
21547 PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_name);
21548 __Pyx_GIVEREF(__pyx_v_name);
21549 __Pyx_INCREF(__pyx_v_index);
21550 PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_index);
21551 __Pyx_GIVEREF(__pyx_v_index);
21552 __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_new_path), ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21553 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
21555 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":126
21556 * new_path.append( (ns, name, index) )
21558 * path_pos = match.end() # <<<<<<<<<<<<<<
21559 * if python.PyList_GET_SIZE(new_path) == 0 or \
21560 * python.PyUnicode_GET_SIZE(path) > path_pos:
21562 __pyx_t_6 = PyObject_GetAttr(__pyx_v_match, __pyx_n_ui_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21563 __Pyx_GOTREF(__pyx_t_6);
21564 __pyx_t_3 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21565 __Pyx_GOTREF(__pyx_t_3);
21566 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21567 __Pyx_DECREF(__pyx_v_path_pos);
21568 __pyx_v_path_pos = __pyx_t_3;
21573 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":127
21575 * path_pos = match.end()
21576 * if python.PyList_GET_SIZE(new_path) == 0 or \ # <<<<<<<<<<<<<<
21577 * python.PyUnicode_GET_SIZE(path) > path_pos:
21578 * raise ValueError, u"invalid path"
21580 __pyx_t_9 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21583 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":128
21584 * path_pos = match.end()
21585 * if python.PyList_GET_SIZE(new_path) == 0 or \
21586 * python.PyUnicode_GET_SIZE(path) > path_pos: # <<<<<<<<<<<<<<
21587 * raise ValueError, u"invalid path"
21590 __pyx_t_3 = PyInt_FromSsize_t(PyUnicode_GET_SIZE(__pyx_v_path)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21591 __Pyx_GOTREF(__pyx_t_3);
21592 __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_path_pos, Py_GT); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21593 __Pyx_GOTREF(__pyx_t_6);
21594 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21595 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21596 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21597 __pyx_t_8 = __pyx_t_2;
21599 __pyx_t_8 = __pyx_t_9;
21603 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":129
21604 * if python.PyList_GET_SIZE(new_path) == 0 or \
21605 * python.PyUnicode_GET_SIZE(path) > path_pos:
21606 * raise ValueError, u"invalid path" # <<<<<<<<<<<<<<
21610 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_48), 0);
21611 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21616 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":130
21617 * python.PyUnicode_GET_SIZE(path) > path_pos:
21618 * raise ValueError, u"invalid path"
21619 * return new_path # <<<<<<<<<<<<<<
21621 * cdef _parseObjectPathList(path):
21623 __Pyx_XDECREF(__pyx_r);
21624 __Pyx_INCREF(((PyObject *)__pyx_v_new_path));
21625 __pyx_r = ((PyObject *)__pyx_v_new_path);
21628 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21631 __Pyx_XDECREF(__pyx_t_1);
21632 __Pyx_XDECREF(__pyx_t_3);
21633 __Pyx_XDECREF(__pyx_t_4);
21634 __Pyx_XDECREF(__pyx_t_5);
21635 __Pyx_XDECREF(__pyx_t_6);
21636 __Pyx_XDECREF(__pyx_t_7);
21637 __Pyx_AddTraceback("lxml.objectify._parseObjectPathString");
21640 __Pyx_XDECREF(__pyx_v_new_path);
21641 __Pyx_DECREF(__pyx_v_path_pos);
21642 __Pyx_DECREF(__pyx_v_match);
21643 __Pyx_DECREF(__pyx_v_dot);
21644 __Pyx_DECREF(__pyx_v_ns);
21645 __Pyx_DECREF(__pyx_v_name);
21646 __Pyx_DECREF(__pyx_v_index);
21647 __Pyx_DECREF(__pyx_v_path);
21648 __Pyx_XGIVEREF(__pyx_r);
21649 __Pyx_FinishRefcountContext();
21653 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":132
21656 * cdef _parseObjectPathList(path): # <<<<<<<<<<<<<<
21657 * u"""Parse object path sequence into a (ns, name, index) list.
21661 static PyObject *__pyx_f_4lxml_9objectify__parseObjectPathList(PyObject *__pyx_v_path) {
21662 char *__pyx_v_index_pos;
21663 char *__pyx_v_index_end;
21664 char *__pyx_v_c_name;
21665 PyObject *__pyx_v_new_path = 0;
21666 PyObject *__pyx_v_item;
21667 PyObject *__pyx_v_ns;
21668 PyObject *__pyx_v_name;
21669 PyObject *__pyx_v_index;
21670 PyObject *__pyx_r = NULL;
21671 PyObject *__pyx_t_1 = NULL;
21672 Py_ssize_t __pyx_t_2;
21673 PyObject *__pyx_t_3 = NULL;
21674 PyObject *__pyx_t_4 = NULL;
21678 PyObject *__pyx_t_8 = NULL;
21679 PyObject *__pyx_t_9 = NULL;
21681 __Pyx_SetupRefcountContext("_parseObjectPathList");
21682 __Pyx_INCREF(__pyx_v_path);
21683 __pyx_v_item = Py_None; __Pyx_INCREF(Py_None);
21684 __pyx_v_ns = Py_None; __Pyx_INCREF(Py_None);
21685 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
21686 __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
21688 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":138
21689 * cdef char* index_end
21690 * cdef char* c_name
21691 * cdef list new_path = [] # <<<<<<<<<<<<<<
21692 * for item in path:
21693 * item = item.strip()
21695 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21696 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
21697 __pyx_v_new_path = __pyx_t_1;
21700 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":139
21701 * cdef char* c_name
21702 * cdef list new_path = []
21703 * for item in path: # <<<<<<<<<<<<<<
21704 * item = item.strip()
21705 * if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
21707 if (PyList_CheckExact(__pyx_v_path) || PyTuple_CheckExact(__pyx_v_path)) {
21708 __pyx_t_2 = 0; __pyx_t_1 = __pyx_v_path; __Pyx_INCREF(__pyx_t_1);
21710 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21711 __Pyx_GOTREF(__pyx_t_1);
21714 if (likely(PyList_CheckExact(__pyx_t_1))) {
21715 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
21716 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
21717 } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
21718 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
21719 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
21721 __pyx_t_3 = PyIter_Next(__pyx_t_1);
21723 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21726 __Pyx_GOTREF(__pyx_t_3);
21728 __Pyx_DECREF(__pyx_v_item);
21729 __pyx_v_item = __pyx_t_3;
21732 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":140
21733 * cdef list new_path = []
21734 * for item in path:
21735 * item = item.strip() # <<<<<<<<<<<<<<
21736 * if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
21737 * # path '.child' => ignore root
21739 __pyx_t_3 = PyObject_GetAttr(__pyx_v_item, __pyx_n_ui_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21740 __Pyx_GOTREF(__pyx_t_3);
21741 __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21742 __Pyx_GOTREF(__pyx_t_4);
21743 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21744 __Pyx_DECREF(__pyx_v_item);
21745 __pyx_v_item = __pyx_t_4;
21748 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":141
21749 * for item in path:
21750 * item = item.strip()
21751 * if python.PyList_GET_SIZE(new_path) == 0 and item == u'': # <<<<<<<<<<<<<<
21752 * # path '.child' => ignore root
21755 __pyx_t_5 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21757 __pyx_t_4 = PyObject_RichCompare(__pyx_v_item, ((PyObject *)__pyx_kp_u_4), Py_EQ); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21758 __Pyx_GOTREF(__pyx_t_4);
21759 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21760 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21761 __pyx_t_7 = __pyx_t_6;
21763 __pyx_t_7 = __pyx_t_5;
21767 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":143
21768 * if python.PyList_GET_SIZE(new_path) == 0 and item == u'':
21769 * # path '.child' => ignore root
21770 * ns = name = None # <<<<<<<<<<<<<<
21774 __Pyx_INCREF(Py_None);
21775 __Pyx_DECREF(__pyx_v_ns);
21776 __pyx_v_ns = Py_None;
21777 __Pyx_INCREF(Py_None);
21778 __Pyx_DECREF(__pyx_v_name);
21779 __pyx_v_name = Py_None;
21781 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":144
21782 * # path '.child' => ignore root
21784 * index = 0 # <<<<<<<<<<<<<<
21786 * ns, name = cetree.getNsTag(item)
21788 __Pyx_INCREF(__pyx_int_0);
21789 __Pyx_DECREF(__pyx_v_index);
21790 __pyx_v_index = __pyx_int_0;
21795 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":146
21798 * ns, name = cetree.getNsTag(item) # <<<<<<<<<<<<<<
21799 * c_name = _cstr(name)
21800 * index_pos = cstd.strchr(c_name, c'[')
21802 __pyx_t_4 = getNsTag(__pyx_v_item); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21803 __Pyx_GOTREF(__pyx_t_4);
21804 if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
21805 PyObject* tuple = __pyx_t_4;
21806 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_3);
21807 __pyx_t_8 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_8);
21808 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21809 __Pyx_DECREF(__pyx_v_ns);
21810 __pyx_v_ns = __pyx_t_3;
21812 __Pyx_DECREF(__pyx_v_name);
21813 __pyx_v_name = __pyx_t_8;
21816 __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21817 __Pyx_GOTREF(__pyx_t_9);
21818 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21819 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_9, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21820 __Pyx_GOTREF(__pyx_t_3);
21821 __pyx_t_8 = __Pyx_UnpackItem(__pyx_t_9, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21822 __Pyx_GOTREF(__pyx_t_8);
21823 if (__Pyx_EndUnpack(__pyx_t_9) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21824 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
21825 __Pyx_DECREF(__pyx_v_ns);
21826 __pyx_v_ns = __pyx_t_3;
21828 __Pyx_DECREF(__pyx_v_name);
21829 __pyx_v_name = __pyx_t_8;
21833 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":147
21835 * ns, name = cetree.getNsTag(item)
21836 * c_name = _cstr(name) # <<<<<<<<<<<<<<
21837 * index_pos = cstd.strchr(c_name, c'[')
21838 * if index_pos is NULL:
21840 __pyx_v_c_name = PyString_AS_STRING(__pyx_v_name);
21842 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":148
21843 * ns, name = cetree.getNsTag(item)
21844 * c_name = _cstr(name)
21845 * index_pos = cstd.strchr(c_name, c'[') # <<<<<<<<<<<<<<
21846 * if index_pos is NULL:
21849 __pyx_v_index_pos = strchr(__pyx_v_c_name, '[');
21851 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":149
21852 * c_name = _cstr(name)
21853 * index_pos = cstd.strchr(c_name, c'[')
21854 * if index_pos is NULL: # <<<<<<<<<<<<<<
21858 __pyx_t_7 = (__pyx_v_index_pos == NULL);
21861 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":150
21862 * index_pos = cstd.strchr(c_name, c'[')
21863 * if index_pos is NULL:
21864 * index = 0 # <<<<<<<<<<<<<<
21866 * index_end = cstd.strchr(index_pos + 1, c']')
21868 __Pyx_INCREF(__pyx_int_0);
21869 __Pyx_DECREF(__pyx_v_index);
21870 __pyx_v_index = __pyx_int_0;
21875 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":152
21878 * index_end = cstd.strchr(index_pos + 1, c']') # <<<<<<<<<<<<<<
21879 * if index_end is NULL:
21880 * raise ValueError, u"index must be enclosed in []"
21882 __pyx_v_index_end = strchr((__pyx_v_index_pos + 1), ']');
21884 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":153
21886 * index_end = cstd.strchr(index_pos + 1, c']')
21887 * if index_end is NULL: # <<<<<<<<<<<<<<
21888 * raise ValueError, u"index must be enclosed in []"
21891 __pyx_t_7 = (__pyx_v_index_end == NULL);
21894 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":154
21895 * index_end = cstd.strchr(index_pos + 1, c']')
21896 * if index_end is NULL:
21897 * raise ValueError, u"index must be enclosed in []" # <<<<<<<<<<<<<<
21899 * python.PyString_FromStringAndSize(
21901 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_49), 0);
21902 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21907 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":157
21909 * python.PyString_FromStringAndSize(
21910 * index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1))) # <<<<<<<<<<<<<<
21911 * if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
21912 * raise ValueError, u"index not allowed on root node"
21914 __pyx_t_4 = PyString_FromStringAndSize((__pyx_v_index_pos + 1), ((Py_ssize_t)((__pyx_v_index_end - __pyx_v_index_pos) - 1))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21915 __Pyx_GOTREF(__pyx_t_4);
21916 __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21917 __Pyx_GOTREF(((PyObject *)__pyx_t_8));
21918 PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
21919 __Pyx_GIVEREF(__pyx_t_4);
21921 __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21922 __Pyx_GOTREF(__pyx_t_4);
21923 __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
21924 __Pyx_DECREF(__pyx_v_index);
21925 __pyx_v_index = __pyx_t_4;
21928 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":158
21929 * python.PyString_FromStringAndSize(
21930 * index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
21931 * if python.PyList_GET_SIZE(new_path) == 0 and index != 0: # <<<<<<<<<<<<<<
21932 * raise ValueError, u"index not allowed on root node"
21933 * name = python.PyString_FromStringAndSize(
21935 __pyx_t_7 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
21937 __pyx_t_4 = PyObject_RichCompare(__pyx_v_index, __pyx_int_0, Py_NE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21938 __Pyx_GOTREF(__pyx_t_4);
21939 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21940 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21941 __pyx_t_6 = __pyx_t_5;
21943 __pyx_t_6 = __pyx_t_7;
21947 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":159
21948 * index_pos + 1, <Py_ssize_t>(index_end - index_pos - 1)))
21949 * if python.PyList_GET_SIZE(new_path) == 0 and index != 0:
21950 * raise ValueError, u"index not allowed on root node" # <<<<<<<<<<<<<<
21951 * name = python.PyString_FromStringAndSize(
21952 * c_name, <Py_ssize_t>(index_pos - c_name))
21954 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_47), 0);
21955 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21960 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":161
21961 * raise ValueError, u"index not allowed on root node"
21962 * name = python.PyString_FromStringAndSize(
21963 * c_name, <Py_ssize_t>(index_pos - c_name)) # <<<<<<<<<<<<<<
21964 * new_path.append( (ns, name, index) )
21965 * if python.PyList_GET_SIZE(new_path) == 0:
21967 __pyx_t_4 = PyString_FromStringAndSize(__pyx_v_c_name, ((Py_ssize_t)(__pyx_v_index_pos - __pyx_v_c_name))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21968 __Pyx_GOTREF(__pyx_t_4);
21969 __Pyx_DECREF(__pyx_v_name);
21970 __pyx_v_name = __pyx_t_4;
21977 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":162
21978 * name = python.PyString_FromStringAndSize(
21979 * c_name, <Py_ssize_t>(index_pos - c_name))
21980 * new_path.append( (ns, name, index) ) # <<<<<<<<<<<<<<
21981 * if python.PyList_GET_SIZE(new_path) == 0:
21982 * raise ValueError, u"invalid path"
21984 if (unlikely(__pyx_v_new_path == Py_None)) {
21985 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21987 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21988 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
21989 __Pyx_INCREF(__pyx_v_ns);
21990 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_ns);
21991 __Pyx_GIVEREF(__pyx_v_ns);
21992 __Pyx_INCREF(__pyx_v_name);
21993 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_name);
21994 __Pyx_GIVEREF(__pyx_v_name);
21995 __Pyx_INCREF(__pyx_v_index);
21996 PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_index);
21997 __Pyx_GIVEREF(__pyx_v_index);
21998 __pyx_t_10 = PyList_Append(((PyObject *)__pyx_v_new_path), ((PyObject *)__pyx_t_4)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
21999 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
22001 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22003 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":163
22004 * c_name, <Py_ssize_t>(index_pos - c_name))
22005 * new_path.append( (ns, name, index) )
22006 * if python.PyList_GET_SIZE(new_path) == 0: # <<<<<<<<<<<<<<
22007 * raise ValueError, u"invalid path"
22010 __pyx_t_6 = (PyList_GET_SIZE(((PyObject *)__pyx_v_new_path)) == 0);
22013 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":164
22014 * new_path.append( (ns, name, index) )
22015 * if python.PyList_GET_SIZE(new_path) == 0:
22016 * raise ValueError, u"invalid path" # <<<<<<<<<<<<<<
22020 __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_kp_u_48), 0);
22021 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22026 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":165
22027 * if python.PyList_GET_SIZE(new_path) == 0:
22028 * raise ValueError, u"invalid path"
22029 * return new_path # <<<<<<<<<<<<<<
22031 * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL:
22033 __Pyx_XDECREF(__pyx_r);
22034 __Pyx_INCREF(((PyObject *)__pyx_v_new_path));
22035 __pyx_r = ((PyObject *)__pyx_v_new_path);
22038 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22041 __Pyx_XDECREF(__pyx_t_1);
22042 __Pyx_XDECREF(__pyx_t_3);
22043 __Pyx_XDECREF(__pyx_t_4);
22044 __Pyx_XDECREF(__pyx_t_8);
22045 __Pyx_XDECREF(__pyx_t_9);
22046 __Pyx_AddTraceback("lxml.objectify._parseObjectPathList");
22049 __Pyx_XDECREF(__pyx_v_new_path);
22050 __Pyx_DECREF(__pyx_v_item);
22051 __Pyx_DECREF(__pyx_v_ns);
22052 __Pyx_DECREF(__pyx_v_name);
22053 __Pyx_DECREF(__pyx_v_index);
22054 __Pyx_DECREF(__pyx_v_path);
22055 __Pyx_XGIVEREF(__pyx_r);
22056 __Pyx_FinishRefcountContext();
22060 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":167
22063 * cdef _ObjectPath* _buildObjectPathSegments(path_list) except NULL: # <<<<<<<<<<<<<<
22064 * cdef _ObjectPath* c_path
22065 * cdef _ObjectPath* c_path_segments
22068 static __pyx_t_4lxml_9objectify__ObjectPath *__pyx_f_4lxml_9objectify__buildObjectPathSegments(PyObject *__pyx_v_path_list) {
22069 __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path;
22070 __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path_segments;
22071 PyObject *__pyx_v_href;
22072 PyObject *__pyx_v_name;
22073 PyObject *__pyx_v_index;
22074 __pyx_t_4lxml_9objectify__ObjectPath *__pyx_r;
22076 PyObject *__pyx_t_2 = NULL;
22077 Py_ssize_t __pyx_t_3;
22078 PyObject *__pyx_t_4 = NULL;
22079 PyObject *__pyx_t_5 = NULL;
22080 PyObject *__pyx_t_6 = NULL;
22081 PyObject *__pyx_t_7 = NULL;
22082 PyObject *__pyx_t_8 = NULL;
22083 Py_ssize_t __pyx_t_9;
22084 __Pyx_SetupRefcountContext("_buildObjectPathSegments");
22085 __Pyx_INCREF(__pyx_v_path_list);
22086 __pyx_v_href = Py_None; __Pyx_INCREF(Py_None);
22087 __pyx_v_name = Py_None; __Pyx_INCREF(Py_None);
22088 __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
22090 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":171
22091 * cdef _ObjectPath* c_path_segments
22092 * c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
22093 * sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list)) # <<<<<<<<<<<<<<
22094 * if c_path_segments is NULL:
22095 * python.PyErr_NoMemory()
22097 __pyx_v_c_path_segments = ((__pyx_t_4lxml_9objectify__ObjectPath *)PyMem_Malloc(((sizeof(__pyx_t_4lxml_9objectify__ObjectPath)) * PyList_GET_SIZE(__pyx_v_path_list))));
22099 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":172
22100 * c_path_segments = <_ObjectPath*>python.PyMem_Malloc(
22101 * sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
22102 * if c_path_segments is NULL: # <<<<<<<<<<<<<<
22103 * python.PyErr_NoMemory()
22104 * c_path = c_path_segments
22106 __pyx_t_1 = (__pyx_v_c_path_segments == NULL);
22109 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":173
22110 * sizeof(_ObjectPath) * python.PyList_GET_SIZE(path_list))
22111 * if c_path_segments is NULL:
22112 * python.PyErr_NoMemory() # <<<<<<<<<<<<<<
22113 * c_path = c_path_segments
22114 * for href, name, index in path_list:
22116 __pyx_t_2 = PyErr_NoMemory(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22117 __Pyx_GOTREF(__pyx_t_2);
22118 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22123 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":174
22124 * if c_path_segments is NULL:
22125 * python.PyErr_NoMemory()
22126 * c_path = c_path_segments # <<<<<<<<<<<<<<
22127 * for href, name, index in path_list:
22130 __pyx_v_c_path = __pyx_v_c_path_segments;
22132 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":175
22133 * python.PyErr_NoMemory()
22134 * c_path = c_path_segments
22135 * for href, name, index in path_list: # <<<<<<<<<<<<<<
22137 * c_path[0].href = NULL
22139 if (PyList_CheckExact(__pyx_v_path_list) || PyTuple_CheckExact(__pyx_v_path_list)) {
22140 __pyx_t_3 = 0; __pyx_t_2 = __pyx_v_path_list; __Pyx_INCREF(__pyx_t_2);
22142 __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_path_list); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22143 __Pyx_GOTREF(__pyx_t_2);
22146 if (likely(PyList_CheckExact(__pyx_t_2))) {
22147 if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
22148 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
22149 } else if (likely(PyTuple_CheckExact(__pyx_t_2))) {
22150 if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
22151 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++;
22153 __pyx_t_4 = PyIter_Next(__pyx_t_2);
22155 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22158 __Pyx_GOTREF(__pyx_t_4);
22160 if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 3)) {
22161 PyObject* tuple = __pyx_t_4;
22162 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_5);
22163 __pyx_t_6 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_6);
22164 __pyx_t_7 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_7);
22165 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22166 __Pyx_DECREF(__pyx_v_href);
22167 __pyx_v_href = __pyx_t_5;
22169 __Pyx_DECREF(__pyx_v_name);
22170 __pyx_v_name = __pyx_t_6;
22172 __Pyx_DECREF(__pyx_v_index);
22173 __pyx_v_index = __pyx_t_7;
22176 __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22177 __Pyx_GOTREF(__pyx_t_8);
22178 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22179 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_8, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22180 __Pyx_GOTREF(__pyx_t_5);
22181 __pyx_t_6 = __Pyx_UnpackItem(__pyx_t_8, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22182 __Pyx_GOTREF(__pyx_t_6);
22183 __pyx_t_7 = __Pyx_UnpackItem(__pyx_t_8, 2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22184 __Pyx_GOTREF(__pyx_t_7);
22185 if (__Pyx_EndUnpack(__pyx_t_8) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22186 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
22187 __Pyx_DECREF(__pyx_v_href);
22188 __pyx_v_href = __pyx_t_5;
22190 __Pyx_DECREF(__pyx_v_name);
22191 __pyx_v_name = __pyx_t_6;
22193 __Pyx_DECREF(__pyx_v_index);
22194 __pyx_v_index = __pyx_t_7;
22198 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":176
22199 * c_path = c_path_segments
22200 * for href, name, index in path_list:
22201 * if href is None: # <<<<<<<<<<<<<<
22202 * c_path[0].href = NULL
22205 __pyx_t_1 = (__pyx_v_href == Py_None);
22208 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":177
22209 * for href, name, index in path_list:
22211 * c_path[0].href = NULL # <<<<<<<<<<<<<<
22213 * c_path[0].href = _cstr(href)
22215 (__pyx_v_c_path[0]).href = NULL;
22220 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":179
22221 * c_path[0].href = NULL
22223 * c_path[0].href = _cstr(href) # <<<<<<<<<<<<<<
22225 * c_path[0].name = NULL
22227 (__pyx_v_c_path[0]).href = PyString_AS_STRING(__pyx_v_href);
22231 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":180
22233 * c_path[0].href = _cstr(href)
22234 * if name is None: # <<<<<<<<<<<<<<
22235 * c_path[0].name = NULL
22238 __pyx_t_1 = (__pyx_v_name == Py_None);
22241 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":181
22242 * c_path[0].href = _cstr(href)
22244 * c_path[0].name = NULL # <<<<<<<<<<<<<<
22246 * c_path[0].name = _cstr(name)
22248 (__pyx_v_c_path[0]).name = NULL;
22253 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":183
22254 * c_path[0].name = NULL
22256 * c_path[0].name = _cstr(name) # <<<<<<<<<<<<<<
22257 * c_path[0].index = index
22258 * c_path = c_path + 1
22260 (__pyx_v_c_path[0]).name = PyString_AS_STRING(__pyx_v_name);
22264 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":184
22266 * c_path[0].name = _cstr(name)
22267 * c_path[0].index = index # <<<<<<<<<<<<<<
22268 * c_path = c_path + 1
22269 * return c_path_segments
22271 __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22272 (__pyx_v_c_path[0]).index = __pyx_t_9;
22274 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":185
22275 * c_path[0].name = _cstr(name)
22276 * c_path[0].index = index
22277 * c_path = c_path + 1 # <<<<<<<<<<<<<<
22278 * return c_path_segments
22281 __pyx_v_c_path = (__pyx_v_c_path + 1);
22283 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22285 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":186
22286 * c_path[0].index = index
22287 * c_path = c_path + 1
22288 * return c_path_segments # <<<<<<<<<<<<<<
22290 * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len,
22292 __pyx_r = __pyx_v_c_path_segments;
22298 __Pyx_XDECREF(__pyx_t_2);
22299 __Pyx_XDECREF(__pyx_t_4);
22300 __Pyx_XDECREF(__pyx_t_5);
22301 __Pyx_XDECREF(__pyx_t_6);
22302 __Pyx_XDECREF(__pyx_t_7);
22303 __Pyx_XDECREF(__pyx_t_8);
22304 __Pyx_AddTraceback("lxml.objectify._buildObjectPathSegments");
22307 __Pyx_DECREF(__pyx_v_href);
22308 __Pyx_DECREF(__pyx_v_name);
22309 __Pyx_DECREF(__pyx_v_index);
22310 __Pyx_DECREF(__pyx_v_path_list);
22311 __Pyx_FinishRefcountContext();
22315 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":188
22316 * return c_path_segments
22318 * cdef _findObjectPath(_Element root, _ObjectPath* c_path, Py_ssize_t c_path_len, # <<<<<<<<<<<<<<
22319 * default_value, int use_default):
22320 * u"""Follow the path to find the target element.
22323 static PyObject *__pyx_f_4lxml_9objectify__findObjectPath(struct LxmlElement *__pyx_v_root, __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path, Py_ssize_t __pyx_v_c_path_len, PyObject *__pyx_v_default_value, int __pyx_v_use_default) {
22324 xmlNode *__pyx_v_c_node;
22325 char *__pyx_v_c_href;
22326 char *__pyx_v_c_name;
22327 Py_ssize_t __pyx_v_c_index;
22328 PyObject *__pyx_v_tag;
22329 PyObject *__pyx_r = NULL;
22332 PyObject *__pyx_t_3 = NULL;
22333 PyObject *__pyx_t_4 = NULL;
22334 PyObject *__pyx_t_5 = NULL;
22335 __Pyx_SetupRefcountContext("_findObjectPath");
22336 __Pyx_INCREF((PyObject *)__pyx_v_root);
22337 __Pyx_INCREF(__pyx_v_default_value);
22338 __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
22340 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":196
22341 * cdef char* c_name
22342 * cdef Py_ssize_t c_index
22343 * c_node = root._c_node # <<<<<<<<<<<<<<
22344 * c_name = c_path[0].name
22345 * c_href = c_path[0].href
22347 __pyx_v_c_node = __pyx_v_root->_c_node;
22349 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":197
22350 * cdef Py_ssize_t c_index
22351 * c_node = root._c_node
22352 * c_name = c_path[0].name # <<<<<<<<<<<<<<
22353 * c_href = c_path[0].href
22354 * if c_href is NULL or c_href[0] == c'\0':
22356 __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22358 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":198
22359 * c_node = root._c_node
22360 * c_name = c_path[0].name
22361 * c_href = c_path[0].href # <<<<<<<<<<<<<<
22362 * if c_href is NULL or c_href[0] == c'\0':
22363 * c_href = tree._getNs(c_node)
22365 __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22367 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":199
22368 * c_name = c_path[0].name
22369 * c_href = c_path[0].href
22370 * if c_href is NULL or c_href[0] == c'\0': # <<<<<<<<<<<<<<
22371 * c_href = tree._getNs(c_node)
22372 * if not cetree.tagMatches(c_node, c_href, c_name):
22374 if (!(__pyx_v_c_href == NULL)) {
22375 __pyx_t_1 = ((__pyx_v_c_href[0]) == '\x00');
22377 __pyx_t_1 = (__pyx_v_c_href == NULL);
22381 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":200
22382 * c_href = c_path[0].href
22383 * if c_href is NULL or c_href[0] == c'\0':
22384 * c_href = tree._getNs(c_node) # <<<<<<<<<<<<<<
22385 * if not cetree.tagMatches(c_node, c_href, c_name):
22388 __pyx_v_c_href = _getNs(__pyx_v_c_node);
22393 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":201
22394 * if c_href is NULL or c_href[0] == c'\0':
22395 * c_href = tree._getNs(c_node)
22396 * if not cetree.tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<<
22398 * return default_value
22400 __pyx_t_1 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
22403 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":202
22404 * c_href = tree._getNs(c_node)
22405 * if not cetree.tagMatches(c_node, c_href, c_name):
22406 * if use_default: # <<<<<<<<<<<<<<
22407 * return default_value
22410 __pyx_t_2 = __pyx_v_use_default;
22413 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":203
22414 * if not cetree.tagMatches(c_node, c_href, c_name):
22416 * return default_value # <<<<<<<<<<<<<<
22418 * raise ValueError, \
22420 __Pyx_XDECREF(__pyx_r);
22421 __Pyx_INCREF(__pyx_v_default_value);
22422 __pyx_r = __pyx_v_default_value;
22428 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":207
22429 * raise ValueError, \
22430 * u"root element does not match: need %s, got %s" % \
22431 * (cetree.namespacedNameFromNsName(c_href, c_name), root.tag) # <<<<<<<<<<<<<<
22433 * while c_node is not NULL:
22435 __pyx_t_3 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22436 __Pyx_GOTREF(__pyx_t_3);
22437 __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_ui_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22438 __Pyx_GOTREF(__pyx_t_4);
22439 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22440 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
22441 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
22442 __Pyx_GIVEREF(__pyx_t_3);
22443 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
22444 __Pyx_GIVEREF(__pyx_t_4);
22447 __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_50), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22448 __Pyx_GOTREF(__pyx_t_4);
22449 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
22450 __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0);
22451 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22452 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22459 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":209
22460 * (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
22462 * while c_node is not NULL: # <<<<<<<<<<<<<<
22463 * c_path_len = c_path_len - 1
22464 * if c_path_len <= 0:
22467 __pyx_t_1 = (__pyx_v_c_node != NULL);
22468 if (!__pyx_t_1) break;
22470 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":210
22472 * while c_node is not NULL:
22473 * c_path_len = c_path_len - 1 # <<<<<<<<<<<<<<
22474 * if c_path_len <= 0:
22477 __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
22479 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":211
22480 * while c_node is not NULL:
22481 * c_path_len = c_path_len - 1
22482 * if c_path_len <= 0: # <<<<<<<<<<<<<<
22486 __pyx_t_1 = (__pyx_v_c_path_len <= 0);
22489 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":212
22490 * c_path_len = c_path_len - 1
22491 * if c_path_len <= 0:
22492 * break # <<<<<<<<<<<<<<
22494 * c_path = c_path + 1
22496 goto __pyx_L7_break;
22501 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":214
22504 * c_path = c_path + 1 # <<<<<<<<<<<<<<
22505 * if c_path[0].href is not NULL:
22506 * c_href = c_path[0].href # otherwise: keep parent namespace
22508 __pyx_v_c_path = (__pyx_v_c_path + 1);
22510 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":215
22512 * c_path = c_path + 1
22513 * if c_path[0].href is not NULL: # <<<<<<<<<<<<<<
22514 * c_href = c_path[0].href # otherwise: keep parent namespace
22515 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22517 __pyx_t_1 = ((__pyx_v_c_path[0]).href != NULL);
22520 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":216
22521 * c_path = c_path + 1
22522 * if c_path[0].href is not NULL:
22523 * c_href = c_path[0].href # otherwise: keep parent namespace # <<<<<<<<<<<<<<
22524 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22525 * if c_name is NULL:
22527 __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22532 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":217
22533 * if c_path[0].href is not NULL:
22534 * c_href = c_path[0].href # otherwise: keep parent namespace
22535 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1) # <<<<<<<<<<<<<<
22536 * if c_name is NULL:
22537 * c_name = c_path[0].name
22539 __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
22541 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":218
22542 * c_href = c_path[0].href # otherwise: keep parent namespace
22543 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22544 * if c_name is NULL: # <<<<<<<<<<<<<<
22545 * c_name = c_path[0].name
22548 __pyx_t_1 = (__pyx_v_c_name == NULL);
22551 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":219
22552 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22553 * if c_name is NULL:
22554 * c_name = c_path[0].name # <<<<<<<<<<<<<<
22558 __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22560 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":220
22561 * if c_name is NULL:
22562 * c_name = c_path[0].name
22563 * c_node = NULL # <<<<<<<<<<<<<<
22565 * c_index = c_path[0].index
22567 __pyx_v_c_node = NULL;
22569 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":221
22570 * c_name = c_path[0].name
22572 * break # <<<<<<<<<<<<<<
22573 * c_index = c_path[0].index
22576 goto __pyx_L7_break;
22581 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":222
22584 * c_index = c_path[0].index # <<<<<<<<<<<<<<
22588 __pyx_v_c_index = (__pyx_v_c_path[0]).index;
22590 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":224
22591 * c_index = c_path[0].index
22593 * if c_index < 0: # <<<<<<<<<<<<<<
22594 * c_node = c_node.last
22597 __pyx_t_1 = (__pyx_v_c_index < 0);
22600 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":225
22603 * c_node = c_node.last # <<<<<<<<<<<<<<
22605 * c_node = c_node.children
22607 __pyx_v_c_node = __pyx_v_c_node->last;
22612 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":227
22613 * c_node = c_node.last
22615 * c_node = c_node.children # <<<<<<<<<<<<<<
22616 * c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
22619 __pyx_v_c_node = __pyx_v_c_node->children;
22623 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":228
22625 * c_node = c_node.children
22626 * c_node = _findFollowingSibling(c_node, c_href, c_name, c_index) # <<<<<<<<<<<<<<
22628 * if c_node is not NULL:
22630 __pyx_v_c_node = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name, __pyx_v_c_index);
22634 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":230
22635 * c_node = _findFollowingSibling(c_node, c_href, c_name, c_index)
22637 * if c_node is not NULL: # <<<<<<<<<<<<<<
22638 * return cetree.elementFactory(root._doc, c_node)
22639 * elif use_default:
22641 __pyx_t_1 = (__pyx_v_c_node != NULL);
22644 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":231
22646 * if c_node is not NULL:
22647 * return cetree.elementFactory(root._doc, c_node) # <<<<<<<<<<<<<<
22648 * elif use_default:
22649 * return default_value
22651 __Pyx_XDECREF(__pyx_r);
22652 __pyx_t_4 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22653 __Pyx_GOTREF(__pyx_t_4);
22654 __pyx_r = __pyx_t_4;
22660 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":232
22661 * if c_node is not NULL:
22662 * return cetree.elementFactory(root._doc, c_node)
22663 * elif use_default: # <<<<<<<<<<<<<<
22664 * return default_value
22667 __pyx_t_2 = __pyx_v_use_default;
22670 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":233
22671 * return cetree.elementFactory(root._doc, c_node)
22672 * elif use_default:
22673 * return default_value # <<<<<<<<<<<<<<
22675 * tag = cetree.namespacedNameFromNsName(c_href, c_name)
22677 __Pyx_XDECREF(__pyx_r);
22678 __Pyx_INCREF(__pyx_v_default_value);
22679 __pyx_r = __pyx_v_default_value;
22685 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":235
22686 * return default_value
22688 * tag = cetree.namespacedNameFromNsName(c_href, c_name) # <<<<<<<<<<<<<<
22689 * raise AttributeError, u"no such child: " + tag
22692 __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22693 __Pyx_GOTREF(__pyx_t_4);
22694 __Pyx_DECREF(__pyx_v_tag);
22695 __pyx_v_tag = __pyx_t_4;
22698 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":236
22700 * tag = cetree.namespacedNameFromNsName(c_href, c_name)
22701 * raise AttributeError, u"no such child: " + tag # <<<<<<<<<<<<<<
22703 * cdef _createObjectPath(_Element root, _ObjectPath* c_path,
22705 __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_kp_u_10), __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22706 __Pyx_GOTREF(__pyx_t_4);
22707 __Pyx_Raise(__pyx_builtin_AttributeError, __pyx_t_4, 0);
22708 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22709 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22713 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22716 __Pyx_XDECREF(__pyx_t_3);
22717 __Pyx_XDECREF(__pyx_t_4);
22718 __Pyx_XDECREF(__pyx_t_5);
22719 __Pyx_AddTraceback("lxml.objectify._findObjectPath");
22722 __Pyx_DECREF(__pyx_v_tag);
22723 __Pyx_DECREF((PyObject *)__pyx_v_root);
22724 __Pyx_DECREF(__pyx_v_default_value);
22725 __Pyx_XGIVEREF(__pyx_r);
22726 __Pyx_FinishRefcountContext();
22730 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":238
22731 * raise AttributeError, u"no such child: " + tag
22733 * cdef _createObjectPath(_Element root, _ObjectPath* c_path, # <<<<<<<<<<<<<<
22734 * Py_ssize_t c_path_len, int replace, value):
22735 * u"""Follow the path to find the target element, build the missing children
22738 static PyObject *__pyx_f_4lxml_9objectify__createObjectPath(struct LxmlElement *__pyx_v_root, __pyx_t_4lxml_9objectify__ObjectPath *__pyx_v_c_path, Py_ssize_t __pyx_v_c_path_len, int __pyx_v_replace, PyObject *__pyx_v_value) {
22739 struct LxmlElement *__pyx_v_child;
22740 xmlNode *__pyx_v_c_node;
22741 xmlNode *__pyx_v_c_child;
22742 char *__pyx_v_c_href;
22743 char *__pyx_v_c_name;
22744 Py_ssize_t __pyx_v_c_index;
22745 PyObject *__pyx_v_element;
22746 PyObject *__pyx_r = NULL;
22748 PyObject *__pyx_t_2 = NULL;
22749 PyObject *__pyx_t_3 = NULL;
22750 PyObject *__pyx_t_4 = NULL;
22752 __Pyx_SetupRefcountContext("_createObjectPath");
22753 __Pyx_INCREF((PyObject *)__pyx_v_root);
22754 __Pyx_INCREF(__pyx_v_value);
22755 __pyx_v_child = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None);
22756 __pyx_v_element = Py_None; __Pyx_INCREF(Py_None);
22758 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":250
22759 * cdef char* c_name
22760 * cdef Py_ssize_t c_index
22761 * if c_path_len == 1: # <<<<<<<<<<<<<<
22762 * raise TypeError, u"cannot update root node"
22765 __pyx_t_1 = (__pyx_v_c_path_len == 1);
22768 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":251
22769 * cdef Py_ssize_t c_index
22770 * if c_path_len == 1:
22771 * raise TypeError, u"cannot update root node" # <<<<<<<<<<<<<<
22773 * c_node = root._c_node
22775 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_51), 0);
22776 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22781 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":253
22782 * raise TypeError, u"cannot update root node"
22784 * c_node = root._c_node # <<<<<<<<<<<<<<
22785 * c_name = c_path[0].name
22786 * c_href = c_path[0].href
22788 __pyx_v_c_node = __pyx_v_root->_c_node;
22790 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":254
22792 * c_node = root._c_node
22793 * c_name = c_path[0].name # <<<<<<<<<<<<<<
22794 * c_href = c_path[0].href
22795 * if c_href is NULL or c_href[0] == c'\0':
22797 __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22799 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":255
22800 * c_node = root._c_node
22801 * c_name = c_path[0].name
22802 * c_href = c_path[0].href # <<<<<<<<<<<<<<
22803 * if c_href is NULL or c_href[0] == c'\0':
22804 * c_href = tree._getNs(c_node)
22806 __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22808 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":256
22809 * c_name = c_path[0].name
22810 * c_href = c_path[0].href
22811 * if c_href is NULL or c_href[0] == c'\0': # <<<<<<<<<<<<<<
22812 * c_href = tree._getNs(c_node)
22813 * if not cetree.tagMatches(c_node, c_href, c_name):
22815 if (!(__pyx_v_c_href == NULL)) {
22816 __pyx_t_1 = ((__pyx_v_c_href[0]) == '\x00');
22818 __pyx_t_1 = (__pyx_v_c_href == NULL);
22822 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":257
22823 * c_href = c_path[0].href
22824 * if c_href is NULL or c_href[0] == c'\0':
22825 * c_href = tree._getNs(c_node) # <<<<<<<<<<<<<<
22826 * if not cetree.tagMatches(c_node, c_href, c_name):
22827 * raise ValueError, \
22829 __pyx_v_c_href = _getNs(__pyx_v_c_node);
22834 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":258
22835 * if c_href is NULL or c_href[0] == c'\0':
22836 * c_href = tree._getNs(c_node)
22837 * if not cetree.tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<<
22838 * raise ValueError, \
22839 * u"root element does not match: need %s, got %s" % \
22841 __pyx_t_1 = (!tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name));
22844 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":261
22845 * raise ValueError, \
22846 * u"root element does not match: need %s, got %s" % \
22847 * (cetree.namespacedNameFromNsName(c_href, c_name), root.tag) # <<<<<<<<<<<<<<
22849 * while c_path_len > 1:
22851 __pyx_t_2 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22852 __Pyx_GOTREF(__pyx_t_2);
22853 __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_root), __pyx_n_ui_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22854 __Pyx_GOTREF(__pyx_t_3);
22855 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22856 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
22857 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
22858 __Pyx_GIVEREF(__pyx_t_2);
22859 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
22860 __Pyx_GIVEREF(__pyx_t_3);
22863 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_50), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22864 __Pyx_GOTREF(__pyx_t_3);
22865 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
22866 __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_3, 0);
22867 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22868 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
22873 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":263
22874 * (cetree.namespacedNameFromNsName(c_href, c_name), root.tag)
22876 * while c_path_len > 1: # <<<<<<<<<<<<<<
22877 * c_path_len = c_path_len - 1
22878 * c_path = c_path + 1
22881 __pyx_t_1 = (__pyx_v_c_path_len > 1);
22882 if (!__pyx_t_1) break;
22884 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":264
22886 * while c_path_len > 1:
22887 * c_path_len = c_path_len - 1 # <<<<<<<<<<<<<<
22888 * c_path = c_path + 1
22889 * if c_path[0].href is not NULL:
22891 __pyx_v_c_path_len = (__pyx_v_c_path_len - 1);
22893 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":265
22894 * while c_path_len > 1:
22895 * c_path_len = c_path_len - 1
22896 * c_path = c_path + 1 # <<<<<<<<<<<<<<
22897 * if c_path[0].href is not NULL:
22898 * c_href = c_path[0].href # otherwise: keep parent namespace
22900 __pyx_v_c_path = (__pyx_v_c_path + 1);
22902 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":266
22903 * c_path_len = c_path_len - 1
22904 * c_path = c_path + 1
22905 * if c_path[0].href is not NULL: # <<<<<<<<<<<<<<
22906 * c_href = c_path[0].href # otherwise: keep parent namespace
22907 * c_index = c_path[0].index
22909 __pyx_t_1 = ((__pyx_v_c_path[0]).href != NULL);
22912 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":267
22913 * c_path = c_path + 1
22914 * if c_path[0].href is not NULL:
22915 * c_href = c_path[0].href # otherwise: keep parent namespace # <<<<<<<<<<<<<<
22916 * c_index = c_path[0].index
22917 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22919 __pyx_v_c_href = (__pyx_v_c_path[0]).href;
22924 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":268
22925 * if c_path[0].href is not NULL:
22926 * c_href = c_path[0].href # otherwise: keep parent namespace
22927 * c_index = c_path[0].index # <<<<<<<<<<<<<<
22928 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22929 * if c_name is NULL:
22931 __pyx_v_c_index = (__pyx_v_c_path[0]).index;
22933 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":269
22934 * c_href = c_path[0].href # otherwise: keep parent namespace
22935 * c_index = c_path[0].index
22936 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1) # <<<<<<<<<<<<<<
22937 * if c_name is NULL:
22938 * c_name = c_path[0].name
22940 __pyx_v_c_name = xmlDictExists(__pyx_v_c_node->doc->dict, (__pyx_v_c_path[0]).name, -1);
22942 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":270
22943 * c_index = c_path[0].index
22944 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22945 * if c_name is NULL: # <<<<<<<<<<<<<<
22946 * c_name = c_path[0].name
22949 __pyx_t_1 = (__pyx_v_c_name == NULL);
22952 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":271
22953 * c_name = tree.xmlDictExists(c_node.doc.dict, c_path[0].name, -1)
22954 * if c_name is NULL:
22955 * c_name = c_path[0].name # <<<<<<<<<<<<<<
22959 __pyx_v_c_name = (__pyx_v_c_path[0]).name;
22961 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":272
22962 * if c_name is NULL:
22963 * c_name = c_path[0].name
22964 * c_child = NULL # <<<<<<<<<<<<<<
22968 __pyx_v_c_child = NULL;
22973 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":274
22976 * if c_index < 0: # <<<<<<<<<<<<<<
22977 * c_child = c_node.last
22980 __pyx_t_1 = (__pyx_v_c_index < 0);
22983 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":275
22986 * c_child = c_node.last # <<<<<<<<<<<<<<
22988 * c_child = c_node.children
22990 __pyx_v_c_child = __pyx_v_c_node->last;
22995 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":277
22996 * c_child = c_node.last
22998 * c_child = c_node.children # <<<<<<<<<<<<<<
22999 * c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
23002 __pyx_v_c_child = __pyx_v_c_node->children;
23006 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":278
23008 * c_child = c_node.children
23009 * c_child = _findFollowingSibling(c_child, c_href, c_name, c_index) # <<<<<<<<<<<<<<
23011 * if c_child is not NULL:
23013 __pyx_v_c_child = __pyx_f_4lxml_9objectify__findFollowingSibling(__pyx_v_c_child, __pyx_v_c_href, __pyx_v_c_name, __pyx_v_c_index);
23017 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":280
23018 * c_child = _findFollowingSibling(c_child, c_href, c_name, c_index)
23020 * if c_child is not NULL: # <<<<<<<<<<<<<<
23022 * elif c_index != 0:
23024 __pyx_t_1 = (__pyx_v_c_child != NULL);
23027 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":281
23029 * if c_child is not NULL:
23030 * c_node = c_child # <<<<<<<<<<<<<<
23031 * elif c_index != 0:
23032 * raise TypeError, \
23034 __pyx_v_c_node = __pyx_v_c_child;
23038 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":282
23039 * if c_child is not NULL:
23041 * elif c_index != 0: # <<<<<<<<<<<<<<
23042 * raise TypeError, \
23043 * u"creating indexed path attributes is not supported"
23045 __pyx_t_1 = (__pyx_v_c_index != 0);
23048 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":283
23050 * elif c_index != 0:
23051 * raise TypeError, \ # <<<<<<<<<<<<<<
23052 * u"creating indexed path attributes is not supported"
23053 * elif c_path_len == 1:
23055 __Pyx_Raise(__pyx_builtin_TypeError, ((PyObject *)__pyx_kp_u_52), 0);
23056 {__pyx_filename = __pyx_f[1]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23060 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":285
23061 * raise TypeError, \
23062 * u"creating indexed path attributes is not supported"
23063 * elif c_path_len == 1: # <<<<<<<<<<<<<<
23064 * _appendValue(cetree.elementFactory(root._doc, c_node),
23065 * cetree.namespacedNameFromNsName(c_href, c_name),
23067 __pyx_t_1 = (__pyx_v_c_path_len == 1);
23070 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":286
23071 * u"creating indexed path attributes is not supported"
23072 * elif c_path_len == 1:
23073 * _appendValue(cetree.elementFactory(root._doc, c_node), # <<<<<<<<<<<<<<
23074 * cetree.namespacedNameFromNsName(c_href, c_name),
23077 __pyx_t_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23078 __Pyx_GOTREF(__pyx_t_3);
23080 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":287
23081 * elif c_path_len == 1:
23082 * _appendValue(cetree.elementFactory(root._doc, c_node),
23083 * cetree.namespacedNameFromNsName(c_href, c_name), # <<<<<<<<<<<<<<
23087 __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23088 __Pyx_GOTREF(__pyx_t_4);
23090 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":288
23091 * _appendValue(cetree.elementFactory(root._doc, c_node),
23092 * cetree.namespacedNameFromNsName(c_href, c_name),
23093 * value) # <<<<<<<<<<<<<<
23097 __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_3), __pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23098 __Pyx_GOTREF(__pyx_t_2);
23099 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23100 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23101 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23103 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":289
23104 * cetree.namespacedNameFromNsName(c_href, c_name),
23106 * return # <<<<<<<<<<<<<<
23108 * child = cetree.makeSubElement(
23110 __Pyx_XDECREF(__pyx_r);
23111 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23117 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":292
23119 * child = cetree.makeSubElement(
23120 * cetree.elementFactory(root._doc, c_node), # <<<<<<<<<<<<<<
23121 * cetree.namespacedNameFromNsName(c_href, c_name),
23122 * None, None, None, None)
23124 __pyx_t_2 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23125 __Pyx_GOTREF(__pyx_t_2);
23127 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":293
23128 * child = cetree.makeSubElement(
23129 * cetree.elementFactory(root._doc, c_node),
23130 * cetree.namespacedNameFromNsName(c_href, c_name), # <<<<<<<<<<<<<<
23131 * None, None, None, None)
23132 * c_node = child._c_node
23134 __pyx_t_4 = namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 293; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23135 __Pyx_GOTREF(__pyx_t_4);
23137 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":294
23138 * cetree.elementFactory(root._doc, c_node),
23139 * cetree.namespacedNameFromNsName(c_href, c_name),
23140 * None, None, None, None) # <<<<<<<<<<<<<<
23141 * c_node = child._c_node
23144 __pyx_t_3 = ((PyObject *)makeSubElement(((struct LxmlElement *)__pyx_t_2), __pyx_t_4, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23145 __Pyx_GOTREF(__pyx_t_3);
23146 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23147 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23148 __Pyx_DECREF(((PyObject *)__pyx_v_child));
23149 __pyx_v_child = ((struct LxmlElement *)__pyx_t_3);
23152 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":295
23153 * cetree.namespacedNameFromNsName(c_href, c_name),
23154 * None, None, None, None)
23155 * c_node = child._c_node # <<<<<<<<<<<<<<
23157 * # if we get here, the entire path was already there
23159 __pyx_v_c_node = __pyx_v_child->_c_node;
23164 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":298
23166 * # if we get here, the entire path was already there
23167 * if replace: # <<<<<<<<<<<<<<
23168 * element = cetree.elementFactory(root._doc, c_node)
23169 * _replaceElement(element, value)
23171 __pyx_t_5 = __pyx_v_replace;
23174 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":299
23175 * # if we get here, the entire path was already there
23177 * element = cetree.elementFactory(root._doc, c_node) # <<<<<<<<<<<<<<
23178 * _replaceElement(element, value)
23181 __pyx_t_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23182 __Pyx_GOTREF(__pyx_t_3);
23183 __Pyx_DECREF(__pyx_v_element);
23184 __pyx_v_element = __pyx_t_3;
23187 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":300
23189 * element = cetree.elementFactory(root._doc, c_node)
23190 * _replaceElement(element, value) # <<<<<<<<<<<<<<
23192 * _appendValue(cetree.elementFactory(root._doc, c_node.parent),
23194 if (!(__Pyx_TypeTest(__pyx_v_element, __pyx_ptype_4lxml_11etreepublic__Element))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23195 __pyx_t_3 = __pyx_f_4lxml_9objectify__replaceElement(((struct LxmlElement *)__pyx_v_element), __pyx_v_value); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23196 __Pyx_GOTREF(__pyx_t_3);
23197 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23202 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":302
23203 * _replaceElement(element, value)
23205 * _appendValue(cetree.elementFactory(root._doc, c_node.parent), # <<<<<<<<<<<<<<
23206 * cetree.namespacedName(c_node), value)
23209 __pyx_t_3 = ((PyObject *)elementFactory(__pyx_v_root->_doc, __pyx_v_c_node->parent)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23210 __Pyx_GOTREF(__pyx_t_3);
23212 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":303
23214 * _appendValue(cetree.elementFactory(root._doc, c_node.parent),
23215 * cetree.namespacedName(c_node), value) # <<<<<<<<<<<<<<
23217 * cdef list _buildDescendantPaths(tree.xmlNode* c_node, prefix_string):
23219 __pyx_t_4 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23220 __Pyx_GOTREF(__pyx_t_4);
23221 __pyx_t_2 = __pyx_f_4lxml_9objectify__appendValue(((struct LxmlElement *)__pyx_t_3), __pyx_t_4, __pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23222 __Pyx_GOTREF(__pyx_t_2);
23223 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23224 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23225 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23229 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23232 __Pyx_XDECREF(__pyx_t_2);
23233 __Pyx_XDECREF(__pyx_t_3);
23234 __Pyx_XDECREF(__pyx_t_4);
23235 __Pyx_AddTraceback("lxml.objectify._createObjectPath");
23238 __Pyx_DECREF((PyObject *)__pyx_v_child);
23239 __Pyx_DECREF(__pyx_v_element);
23240 __Pyx_DECREF((PyObject *)__pyx_v_root);
23241 __Pyx_DECREF(__pyx_v_value);
23242 __Pyx_XGIVEREF(__pyx_r);
23243 __Pyx_FinishRefcountContext();
23247 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":305
23248 * cetree.namespacedName(c_node), value)
23250 * cdef list _buildDescendantPaths(tree.xmlNode* c_node, prefix_string): # <<<<<<<<<<<<<<
23251 * u"""Returns a list of all descendant paths.
23255 static PyObject *__pyx_f_4lxml_9objectify__buildDescendantPaths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_prefix_string) {
23256 PyObject *__pyx_v_path;
23257 PyObject *__pyx_v_path_list;
23258 PyObject *__pyx_v_tag;
23259 PyObject *__pyx_r = NULL;
23260 PyObject *__pyx_t_1 = NULL;
23262 PyObject *__pyx_t_3 = NULL;
23264 __Pyx_SetupRefcountContext("_buildDescendantPaths");
23265 __Pyx_INCREF(__pyx_v_prefix_string);
23266 __pyx_v_path = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
23267 __pyx_v_path_list = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
23268 __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
23270 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":309
23272 * cdef list path, path_list
23273 * tag = cetree.namespacedName(c_node) # <<<<<<<<<<<<<<
23274 * if prefix_string:
23275 * if prefix_string[-1] != u'.':
23277 __pyx_t_1 = namespacedName(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23278 __Pyx_GOTREF(__pyx_t_1);
23279 __Pyx_DECREF(__pyx_v_tag);
23280 __pyx_v_tag = __pyx_t_1;
23283 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":310
23284 * cdef list path, path_list
23285 * tag = cetree.namespacedName(c_node)
23286 * if prefix_string: # <<<<<<<<<<<<<<
23287 * if prefix_string[-1] != u'.':
23288 * prefix_string = prefix_string + u'.'
23290 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_prefix_string); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23293 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":311
23294 * tag = cetree.namespacedName(c_node)
23295 * if prefix_string:
23296 * if prefix_string[-1] != u'.': # <<<<<<<<<<<<<<
23297 * prefix_string = prefix_string + u'.'
23298 * prefix_string = prefix_string + tag
23300 __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_prefix_string, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23301 __Pyx_GOTREF(__pyx_t_1);
23302 __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, ((PyObject *)__pyx_kp_u_9), Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23303 __Pyx_GOTREF(__pyx_t_3);
23304 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23305 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23306 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23309 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":312
23310 * if prefix_string:
23311 * if prefix_string[-1] != u'.':
23312 * prefix_string = prefix_string + u'.' # <<<<<<<<<<<<<<
23313 * prefix_string = prefix_string + tag
23316 __pyx_t_3 = PyNumber_Add(__pyx_v_prefix_string, ((PyObject *)__pyx_kp_u_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23317 __Pyx_GOTREF(__pyx_t_3);
23318 __Pyx_DECREF(__pyx_v_prefix_string);
23319 __pyx_v_prefix_string = __pyx_t_3;
23325 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":313
23326 * if prefix_string[-1] != u'.':
23327 * prefix_string = prefix_string + u'.'
23328 * prefix_string = prefix_string + tag # <<<<<<<<<<<<<<
23330 * prefix_string = tag
23332 __pyx_t_3 = PyNumber_Add(__pyx_v_prefix_string, __pyx_v_tag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23333 __Pyx_GOTREF(__pyx_t_3);
23334 __Pyx_DECREF(__pyx_v_prefix_string);
23335 __pyx_v_prefix_string = __pyx_t_3;
23341 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":315
23342 * prefix_string = prefix_string + tag
23344 * prefix_string = tag # <<<<<<<<<<<<<<
23345 * path = [prefix_string]
23348 __Pyx_INCREF(__pyx_v_tag);
23349 __Pyx_DECREF(__pyx_v_prefix_string);
23350 __pyx_v_prefix_string = __pyx_v_tag;
23354 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":316
23356 * prefix_string = tag
23357 * path = [prefix_string] # <<<<<<<<<<<<<<
23359 * _recursiveBuildDescendantPaths(c_node, path, path_list)
23361 __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23362 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
23363 __Pyx_INCREF(__pyx_v_prefix_string);
23364 PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_prefix_string);
23365 __Pyx_GIVEREF(__pyx_v_prefix_string);
23366 __Pyx_DECREF(((PyObject *)__pyx_v_path));
23367 __pyx_v_path = __pyx_t_3;
23370 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":317
23371 * prefix_string = tag
23372 * path = [prefix_string]
23373 * path_list = [] # <<<<<<<<<<<<<<
23374 * _recursiveBuildDescendantPaths(c_node, path, path_list)
23377 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23378 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
23379 __Pyx_DECREF(((PyObject *)__pyx_v_path_list));
23380 __pyx_v_path_list = __pyx_t_3;
23383 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":318
23384 * path = [prefix_string]
23386 * _recursiveBuildDescendantPaths(c_node, path, path_list) # <<<<<<<<<<<<<<
23390 __pyx_t_4 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_node, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23392 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":319
23394 * _recursiveBuildDescendantPaths(c_node, path, path_list)
23395 * return path_list # <<<<<<<<<<<<<<
23397 * cdef int _recursiveBuildDescendantPaths(tree.xmlNode* c_node,
23399 __Pyx_XDECREF(((PyObject *)__pyx_r));
23400 __Pyx_INCREF(((PyObject *)__pyx_v_path_list));
23401 __pyx_r = __pyx_v_path_list;
23404 __pyx_r = ((PyObject *)Py_None); __Pyx_INCREF(Py_None);
23407 __Pyx_XDECREF(__pyx_t_1);
23408 __Pyx_XDECREF(__pyx_t_3);
23409 __Pyx_AddTraceback("lxml.objectify._buildDescendantPaths");
23412 __Pyx_DECREF(__pyx_v_path);
23413 __Pyx_DECREF(__pyx_v_path_list);
23414 __Pyx_DECREF(__pyx_v_tag);
23415 __Pyx_DECREF(__pyx_v_prefix_string);
23416 __Pyx_XGIVEREF(__pyx_r);
23417 __Pyx_FinishRefcountContext();
23421 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":321
23424 * cdef int _recursiveBuildDescendantPaths(tree.xmlNode* c_node, # <<<<<<<<<<<<<<
23425 * list path, list path_list) except -1:
23426 * u"""Fills the list 'path_list' with all descendant paths, initial prefix
23429 static int __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_path, PyObject *__pyx_v_path_list) {
23430 PyObject *__pyx_v_dict_result;
23431 xmlNode *__pyx_v_c_child;
23432 char *__pyx_v_c_href;
23433 PyObject *__pyx_v_tags = 0;
23434 PyObject *__pyx_v_tag;
23435 PyObject *__pyx_v_count;
23437 PyObject *__pyx_t_1 = NULL;
23438 PyObject *__pyx_t_2 = NULL;
23439 PyObject *__pyx_t_3 = NULL;
23442 __Pyx_SetupRefcountContext("_recursiveBuildDescendantPaths");
23443 __Pyx_INCREF(__pyx_v_path);
23444 __Pyx_INCREF(__pyx_v_path_list);
23445 __pyx_v_tag = Py_None; __Pyx_INCREF(Py_None);
23446 __pyx_v_count = Py_None; __Pyx_INCREF(Py_None);
23448 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":329
23449 * cdef tree.xmlNode* c_child
23450 * cdef char* c_href
23451 * cdef dict tags = {} # <<<<<<<<<<<<<<
23452 * path_list.append( u'.'.join(path) )
23453 * c_href = tree._getNs(c_node)
23455 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23456 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
23457 __pyx_v_tags = __pyx_t_1;
23460 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":330
23461 * cdef char* c_href
23462 * cdef dict tags = {}
23463 * path_list.append( u'.'.join(path) ) # <<<<<<<<<<<<<<
23464 * c_href = tree._getNs(c_node)
23465 * c_child = c_node.children
23467 if (unlikely(__pyx_v_path_list == Py_None)) {
23468 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23470 __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_u_9), __pyx_n_ui_join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23471 __Pyx_GOTREF(__pyx_t_1);
23472 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23473 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
23474 __Pyx_INCREF(((PyObject *)__pyx_v_path));
23475 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_path));
23476 __Pyx_GIVEREF(((PyObject *)__pyx_v_path));
23477 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23478 __Pyx_GOTREF(__pyx_t_3);
23479 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23480 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
23481 __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_path_list), __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23482 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23484 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":331
23485 * cdef dict tags = {}
23486 * path_list.append( u'.'.join(path) )
23487 * c_href = tree._getNs(c_node) # <<<<<<<<<<<<<<
23488 * c_child = c_node.children
23489 * while c_child is not NULL:
23491 __pyx_v_c_href = _getNs(__pyx_v_c_node);
23493 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":332
23494 * path_list.append( u'.'.join(path) )
23495 * c_href = tree._getNs(c_node)
23496 * c_child = c_node.children # <<<<<<<<<<<<<<
23497 * while c_child is not NULL:
23498 * while c_child.type != tree.XML_ELEMENT_NODE:
23500 __pyx_v_c_child = __pyx_v_c_node->children;
23502 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":333
23503 * c_href = tree._getNs(c_node)
23504 * c_child = c_node.children
23505 * while c_child is not NULL: # <<<<<<<<<<<<<<
23506 * while c_child.type != tree.XML_ELEMENT_NODE:
23507 * c_child = c_child.next
23510 __pyx_t_5 = (__pyx_v_c_child != NULL);
23511 if (!__pyx_t_5) break;
23513 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":334
23514 * c_child = c_node.children
23515 * while c_child is not NULL:
23516 * while c_child.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<<
23517 * c_child = c_child.next
23518 * if c_child is NULL:
23521 __pyx_t_5 = (__pyx_v_c_child->type != XML_ELEMENT_NODE);
23522 if (!__pyx_t_5) break;
23524 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":335
23525 * while c_child is not NULL:
23526 * while c_child.type != tree.XML_ELEMENT_NODE:
23527 * c_child = c_child.next # <<<<<<<<<<<<<<
23528 * if c_child is NULL:
23531 __pyx_v_c_child = __pyx_v_c_child->next;
23533 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":336
23534 * while c_child.type != tree.XML_ELEMENT_NODE:
23535 * c_child = c_child.next
23536 * if c_child is NULL: # <<<<<<<<<<<<<<
23538 * if c_href is tree._getNs(c_child):
23540 __pyx_t_5 = (__pyx_v_c_child == NULL);
23543 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":337
23544 * c_child = c_child.next
23545 * if c_child is NULL:
23546 * return 0 # <<<<<<<<<<<<<<
23547 * if c_href is tree._getNs(c_child):
23548 * tag = pyunicode(c_child.name)
23557 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":338
23558 * if c_child is NULL:
23560 * if c_href is tree._getNs(c_child): # <<<<<<<<<<<<<<
23561 * tag = pyunicode(c_child.name)
23562 * elif c_href is not NULL and tree._getNs(c_child) is NULL:
23564 __pyx_t_5 = (__pyx_v_c_href == _getNs(__pyx_v_c_child));
23567 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":339
23569 * if c_href is tree._getNs(c_child):
23570 * tag = pyunicode(c_child.name) # <<<<<<<<<<<<<<
23571 * elif c_href is not NULL and tree._getNs(c_child) is NULL:
23572 * # special case: parent has namespace, child does not
23574 __pyx_t_3 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23575 __Pyx_GOTREF(__pyx_t_3);
23576 __Pyx_DECREF(__pyx_v_tag);
23577 __pyx_v_tag = __pyx_t_3;
23582 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":340
23583 * if c_href is tree._getNs(c_child):
23584 * tag = pyunicode(c_child.name)
23585 * elif c_href is not NULL and tree._getNs(c_child) is NULL: # <<<<<<<<<<<<<<
23586 * # special case: parent has namespace, child does not
23587 * tag = u'{}' + pyunicode(c_child.name)
23589 if ((__pyx_v_c_href != NULL)) {
23590 __pyx_t_5 = (_getNs(__pyx_v_c_child) == NULL);
23592 __pyx_t_5 = (__pyx_v_c_href != NULL);
23596 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":342
23597 * elif c_href is not NULL and tree._getNs(c_child) is NULL:
23598 * # special case: parent has namespace, child does not
23599 * tag = u'{}' + pyunicode(c_child.name) # <<<<<<<<<<<<<<
23601 * tag = cetree.namespacedName(c_child)
23603 __pyx_t_3 = pyunicode(__pyx_v_c_child->name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23604 __Pyx_GOTREF(__pyx_t_3);
23605 __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_kp_u_53), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23606 __Pyx_GOTREF(__pyx_t_2);
23607 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23608 __Pyx_DECREF(__pyx_v_tag);
23609 __pyx_v_tag = __pyx_t_2;
23615 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":344
23616 * tag = u'{}' + pyunicode(c_child.name)
23618 * tag = cetree.namespacedName(c_child) # <<<<<<<<<<<<<<
23619 * dict_result = python.PyDict_GetItem(tags, tag)
23620 * if dict_result is NULL:
23622 __pyx_t_2 = namespacedName(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23623 __Pyx_GOTREF(__pyx_t_2);
23624 __Pyx_DECREF(__pyx_v_tag);
23625 __pyx_v_tag = __pyx_t_2;
23630 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":345
23632 * tag = cetree.namespacedName(c_child)
23633 * dict_result = python.PyDict_GetItem(tags, tag) # <<<<<<<<<<<<<<
23634 * if dict_result is NULL:
23637 __pyx_v_dict_result = PyDict_GetItem(((PyObject *)__pyx_v_tags), __pyx_v_tag);
23639 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":346
23640 * tag = cetree.namespacedName(c_child)
23641 * dict_result = python.PyDict_GetItem(tags, tag)
23642 * if dict_result is NULL: # <<<<<<<<<<<<<<
23646 __pyx_t_5 = (__pyx_v_dict_result == NULL);
23649 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":347
23650 * dict_result = python.PyDict_GetItem(tags, tag)
23651 * if dict_result is NULL:
23652 * count = 0 # <<<<<<<<<<<<<<
23654 * count = (<object>dict_result) + 1
23656 __Pyx_INCREF(__pyx_int_0);
23657 __Pyx_DECREF(__pyx_v_count);
23658 __pyx_v_count = __pyx_int_0;
23663 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":349
23666 * count = (<object>dict_result) + 1 # <<<<<<<<<<<<<<
23667 * tags[tag] = count
23670 __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_dict_result), __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23671 __Pyx_GOTREF(__pyx_t_2);
23672 __Pyx_DECREF(__pyx_v_count);
23673 __pyx_v_count = __pyx_t_2;
23678 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":350
23680 * count = (<object>dict_result) + 1
23681 * tags[tag] = count # <<<<<<<<<<<<<<
23683 * tag += u'[%d]' % count
23685 if (PyDict_SetItem(((PyObject *)__pyx_v_tags), __pyx_v_tag, __pyx_v_count) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23687 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":351
23688 * count = (<object>dict_result) + 1
23689 * tags[tag] = count
23690 * if count > 0: # <<<<<<<<<<<<<<
23691 * tag += u'[%d]' % count
23694 __pyx_t_2 = PyObject_RichCompare(__pyx_v_count, __pyx_int_0, Py_GT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23695 __Pyx_GOTREF(__pyx_t_2);
23696 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23697 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23700 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":352
23701 * tags[tag] = count
23703 * tag += u'[%d]' % count # <<<<<<<<<<<<<<
23705 * _recursiveBuildDescendantPaths(c_child, path, path_list)
23707 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_54), __pyx_v_count); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23708 __Pyx_GOTREF(__pyx_t_2);
23709 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23710 __Pyx_GOTREF(__pyx_t_3);
23711 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23712 __Pyx_DECREF(__pyx_v_tag);
23713 __pyx_v_tag = __pyx_t_3;
23719 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":353
23721 * tag += u'[%d]' % count
23722 * path.append(tag) # <<<<<<<<<<<<<<
23723 * _recursiveBuildDescendantPaths(c_child, path, path_list)
23726 if (unlikely(__pyx_v_path == Py_None)) {
23727 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23729 __pyx_t_4 = PyList_Append(((PyObject *)__pyx_v_path), __pyx_v_tag); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23731 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":354
23732 * tag += u'[%d]' % count
23734 * _recursiveBuildDescendantPaths(c_child, path, path_list) # <<<<<<<<<<<<<<
23736 * c_child = c_child.next
23738 __pyx_t_4 = __pyx_f_4lxml_9objectify__recursiveBuildDescendantPaths(__pyx_v_c_child, __pyx_v_path, __pyx_v_path_list); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23740 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":355
23742 * _recursiveBuildDescendantPaths(c_child, path, path_list)
23743 * del path[-1] # <<<<<<<<<<<<<<
23744 * c_child = c_child.next
23747 if (__Pyx_DelItemInt(((PyObject *)__pyx_v_path), -1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
23749 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":356
23750 * _recursiveBuildDescendantPaths(c_child, path, path_list)
23752 * c_child = c_child.next # <<<<<<<<<<<<<<
23755 __pyx_v_c_child = __pyx_v_c_child->next;
23758 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":357
23760 * c_child = c_child.next
23761 * return 0 # <<<<<<<<<<<<<<
23769 __Pyx_XDECREF(__pyx_t_1);
23770 __Pyx_XDECREF(__pyx_t_2);
23771 __Pyx_XDECREF(__pyx_t_3);
23772 __Pyx_AddTraceback("lxml.objectify._recursiveBuildDescendantPaths");
23775 __Pyx_XDECREF(__pyx_v_tags);
23776 __Pyx_DECREF(__pyx_v_tag);
23777 __Pyx_DECREF(__pyx_v_count);
23778 __Pyx_DECREF(__pyx_v_path);
23779 __Pyx_DECREF(__pyx_v_path_list);
23780 __Pyx_FinishRefcountContext();
23784 static PyObject *__pyx_tp_new_4lxml_9objectify_PyType(PyTypeObject *t, PyObject *a, PyObject *k) {
23785 struct __pyx_obj_4lxml_9objectify_PyType *p;
23786 PyObject *o = (*t->tp_alloc)(t, 0);
23788 p = ((struct __pyx_obj_4lxml_9objectify_PyType *)o);
23789 p->name = Py_None; Py_INCREF(Py_None);
23790 p->type_check = Py_None; Py_INCREF(Py_None);
23791 p->stringify = Py_None; Py_INCREF(Py_None);
23792 p->_type = Py_None; Py_INCREF(Py_None);
23793 p->_schema_types = ((PyObject *)Py_None); Py_INCREF(Py_None);
23797 static void __pyx_tp_dealloc_4lxml_9objectify_PyType(PyObject *o) {
23798 struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
23799 Py_XDECREF(p->name);
23800 Py_XDECREF(p->type_check);
23801 Py_XDECREF(p->stringify);
23802 Py_XDECREF(p->_type);
23803 Py_XDECREF(((PyObject *)p->_schema_types));
23804 (*Py_TYPE(o)->tp_free)(o);
23807 static int __pyx_tp_traverse_4lxml_9objectify_PyType(PyObject *o, visitproc v, void *a) {
23809 struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
23811 e = (*v)(p->name, a); if (e) return e;
23813 if (p->type_check) {
23814 e = (*v)(p->type_check, a); if (e) return e;
23816 if (p->stringify) {
23817 e = (*v)(p->stringify, a); if (e) return e;
23820 e = (*v)(p->_type, a); if (e) return e;
23822 if (p->_schema_types) {
23823 e = (*v)(p->_schema_types, a); if (e) return e;
23828 static int __pyx_tp_clear_4lxml_9objectify_PyType(PyObject *o) {
23829 struct __pyx_obj_4lxml_9objectify_PyType *p = (struct __pyx_obj_4lxml_9objectify_PyType *)o;
23831 tmp = ((PyObject*)p->name);
23832 p->name = Py_None; Py_INCREF(Py_None);
23834 tmp = ((PyObject*)p->type_check);
23835 p->type_check = Py_None; Py_INCREF(Py_None);
23837 tmp = ((PyObject*)p->stringify);
23838 p->stringify = Py_None; Py_INCREF(Py_None);
23840 tmp = ((PyObject*)p->_type);
23841 p->_type = Py_None; Py_INCREF(Py_None);
23843 tmp = ((PyObject*)p->_schema_types);
23844 p->_schema_types = ((PyObject *)Py_None); Py_INCREF(Py_None);
23849 static PyObject *__pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, void *x) {
23850 return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(o);
23853 static int __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes(PyObject *o, PyObject *v, void *x) {
23855 return __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___set__(o, v);
23858 PyErr_SetString(PyExc_NotImplementedError, "__del__");
23863 static struct PyMethodDef __pyx_methods_4lxml_9objectify_PyType[] = {
23864 {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
23865 {__Pyx_NAMESTR("register"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_register, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_register)},
23866 {__Pyx_NAMESTR("unregister"), (PyCFunction)__pyx_pf_4lxml_9objectify_6PyType_unregister, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_6PyType_unregister)},
23870 static struct PyMemberDef __pyx_members_4lxml_9objectify_PyType[] = {
23871 {(char *)"name", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, name), READONLY, 0},
23872 {(char *)"type_check", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, type_check), READONLY, 0},
23873 {(char *)"stringify", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_PyType, stringify), READONLY, 0},
23877 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_PyType[] = {
23878 {(char *)"xmlSchemaTypes", __pyx_getprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __pyx_setprop_4lxml_9objectify_6PyType_xmlSchemaTypes, __Pyx_DOCSTR(__pyx_k_55), 0},
23882 static PyNumberMethods __pyx_tp_as_number_PyType = {
23886 #if PY_MAJOR_VERSION < 3
23889 0, /*nb_remainder*/
23902 #if PY_MAJOR_VERSION < 3
23906 #if PY_MAJOR_VERSION >= 3
23912 #if PY_MAJOR_VERSION < 3
23915 #if PY_MAJOR_VERSION < 3
23918 0, /*nb_inplace_add*/
23919 0, /*nb_inplace_subtract*/
23920 0, /*nb_inplace_multiply*/
23921 #if PY_MAJOR_VERSION < 3
23922 0, /*nb_inplace_divide*/
23924 0, /*nb_inplace_remainder*/
23925 0, /*nb_inplace_power*/
23926 0, /*nb_inplace_lshift*/
23927 0, /*nb_inplace_rshift*/
23928 0, /*nb_inplace_and*/
23929 0, /*nb_inplace_xor*/
23930 0, /*nb_inplace_or*/
23931 0, /*nb_floor_divide*/
23932 0, /*nb_true_divide*/
23933 0, /*nb_inplace_floor_divide*/
23934 0, /*nb_inplace_true_divide*/
23935 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
23940 static PySequenceMethods __pyx_tp_as_sequence_PyType = {
23947 0, /*sq_ass_slice*/
23949 0, /*sq_inplace_concat*/
23950 0, /*sq_inplace_repeat*/
23953 static PyMappingMethods __pyx_tp_as_mapping_PyType = {
23955 0, /*mp_subscript*/
23956 0, /*mp_ass_subscript*/
23959 static PyBufferProcs __pyx_tp_as_buffer_PyType = {
23960 #if PY_MAJOR_VERSION < 3
23961 0, /*bf_getreadbuffer*/
23963 #if PY_MAJOR_VERSION < 3
23964 0, /*bf_getwritebuffer*/
23966 #if PY_MAJOR_VERSION < 3
23967 0, /*bf_getsegcount*/
23969 #if PY_MAJOR_VERSION < 3
23970 0, /*bf_getcharbuffer*/
23972 #if PY_VERSION_HEX >= 0x02060000
23973 0, /*bf_getbuffer*/
23975 #if PY_VERSION_HEX >= 0x02060000
23976 0, /*bf_releasebuffer*/
23980 PyTypeObject __pyx_type_4lxml_9objectify_PyType = {
23981 PyVarObject_HEAD_INIT(0, 0)
23982 __Pyx_NAMESTR("lxml.objectify.PyType"), /*tp_name*/
23983 sizeof(struct __pyx_obj_4lxml_9objectify_PyType), /*tp_basicsize*/
23985 __pyx_tp_dealloc_4lxml_9objectify_PyType, /*tp_dealloc*/
23990 __pyx_pf_4lxml_9objectify_6PyType___repr__, /*tp_repr*/
23991 &__pyx_tp_as_number_PyType, /*tp_as_number*/
23992 &__pyx_tp_as_sequence_PyType, /*tp_as_sequence*/
23993 &__pyx_tp_as_mapping_PyType, /*tp_as_mapping*/
23999 &__pyx_tp_as_buffer_PyType, /*tp_as_buffer*/
24000 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24001 __Pyx_DOCSTR("PyType(self, name, type_check, type_class, stringify=None)\n User defined type.\n\n Named type that contains a type check function and a type class that\n inherits from ObjectifiedDataElement. The type check must take a string\n as argument and raise ValueError or TypeError if it cannot handle the\n string value. It may be None in which case it is not considered for type\n guessing.\n\n Example::\n\n PyType('int', int, MyIntClass).register()\n\n Note that the order in which types are registered matters. The first\n matching type will be used.\n "), /*tp_doc*/
24002 __pyx_tp_traverse_4lxml_9objectify_PyType, /*tp_traverse*/
24003 __pyx_tp_clear_4lxml_9objectify_PyType, /*tp_clear*/
24004 0, /*tp_richcompare*/
24005 0, /*tp_weaklistoffset*/
24008 __pyx_methods_4lxml_9objectify_PyType, /*tp_methods*/
24009 __pyx_members_4lxml_9objectify_PyType, /*tp_members*/
24010 __pyx_getsets_4lxml_9objectify_PyType, /*tp_getset*/
24013 0, /*tp_descr_get*/
24014 0, /*tp_descr_set*/
24015 0, /*tp_dictoffset*/
24016 __pyx_pf_4lxml_9objectify_6PyType___init__, /*tp_init*/
24018 __pyx_tp_new_4lxml_9objectify_PyType, /*tp_new*/
24024 0, /*tp_subclasses*/
24028 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24029 PyObject *o = __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_new(t, a, k);
24034 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
24035 __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_dealloc(o);
24038 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(PyObject *o, visitproc v, void *a) {
24040 if (__pyx_ptype_4lxml_11etreepublic_ElementBase->tp_traverse) {
24041 e = __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_traverse(o, v, a); if (e) return e;
24046 static int __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(PyObject *o) {
24047 if (__pyx_ptype_4lxml_11etreepublic_ElementBase->tp_clear) {
24048 __pyx_ptype_4lxml_11etreepublic_ElementBase->tp_clear(o);
24052 static PyObject *__pyx_sq_item_4lxml_9objectify_ObjectifiedElement(PyObject *o, Py_ssize_t i) {
24054 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
24055 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
24060 static int __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *i, PyObject *v) {
24062 return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setitem__(o, i, v);
24065 return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delitem__(o, i);
24069 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n) {
24070 PyObject *v = PyObject_GenericGetAttr(o, n);
24071 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
24073 v = __pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__(o, n);
24078 static int __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement(PyObject *o, PyObject *n, PyObject *v) {
24080 return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___setattr__(o, n, v);
24083 return __pyx_pf_4lxml_9objectify_18ObjectifiedElement___delattr__(o, n);
24087 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text(PyObject *o, void *x) {
24088 return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(o);
24091 static PyObject *__pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__(PyObject *o, void *x) {
24092 return __pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get__(o);
24095 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedElement[] = {
24096 {__Pyx_NAMESTR("__iter__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___iter__)},
24097 {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24098 {__Pyx_NAMESTR("countchildren"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_countchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_countchildren)},
24099 {__Pyx_NAMESTR("getchildren"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_getchildren, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_getchildren)},
24100 {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___getattr__)},
24101 {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_addattr)},
24102 {__Pyx_NAMESTR("__getitem__"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement___getitem__)},
24103 {__Pyx_NAMESTR("iterfind"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_iterfind, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_iterfind)},
24104 {__Pyx_NAMESTR("findall"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findall, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_findall)},
24105 {__Pyx_NAMESTR("find"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_find, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_find)},
24106 {__Pyx_NAMESTR("findtext"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_findtext, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_findtext)},
24107 {__Pyx_NAMESTR("descendantpaths"), (PyCFunction)__pyx_pf_4lxml_9objectify_18ObjectifiedElement_descendantpaths, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_18ObjectifiedElement_descendantpaths)},
24111 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedElement[] = {
24112 {(char *)"text", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement_text, 0, 0, 0},
24113 {(char *)"__dict__", __pyx_getprop_4lxml_9objectify_18ObjectifiedElement___dict__, 0, __Pyx_DOCSTR(__pyx_k_56), 0},
24117 static PyNumberMethods __pyx_tp_as_number_ObjectifiedElement = {
24121 #if PY_MAJOR_VERSION < 3
24124 0, /*nb_remainder*/
24137 #if PY_MAJOR_VERSION < 3
24141 #if PY_MAJOR_VERSION >= 3
24147 #if PY_MAJOR_VERSION < 3
24150 #if PY_MAJOR_VERSION < 3
24153 0, /*nb_inplace_add*/
24154 0, /*nb_inplace_subtract*/
24155 0, /*nb_inplace_multiply*/
24156 #if PY_MAJOR_VERSION < 3
24157 0, /*nb_inplace_divide*/
24159 0, /*nb_inplace_remainder*/
24160 0, /*nb_inplace_power*/
24161 0, /*nb_inplace_lshift*/
24162 0, /*nb_inplace_rshift*/
24163 0, /*nb_inplace_and*/
24164 0, /*nb_inplace_xor*/
24165 0, /*nb_inplace_or*/
24166 0, /*nb_floor_divide*/
24167 0, /*nb_true_divide*/
24168 0, /*nb_inplace_floor_divide*/
24169 0, /*nb_inplace_true_divide*/
24170 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24175 static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedElement = {
24176 __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__, /*sq_length*/
24179 __pyx_sq_item_4lxml_9objectify_ObjectifiedElement, /*sq_item*/
24182 0, /*sq_ass_slice*/
24184 0, /*sq_inplace_concat*/
24185 0, /*sq_inplace_repeat*/
24188 static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedElement = {
24189 __pyx_pf_4lxml_9objectify_18ObjectifiedElement___len__, /*mp_length*/
24190 __pyx_pf_4lxml_9objectify_18ObjectifiedElement___getitem__, /*mp_subscript*/
24191 __pyx_mp_ass_subscript_4lxml_9objectify_ObjectifiedElement, /*mp_ass_subscript*/
24194 static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedElement = {
24195 #if PY_MAJOR_VERSION < 3
24196 0, /*bf_getreadbuffer*/
24198 #if PY_MAJOR_VERSION < 3
24199 0, /*bf_getwritebuffer*/
24201 #if PY_MAJOR_VERSION < 3
24202 0, /*bf_getsegcount*/
24204 #if PY_MAJOR_VERSION < 3
24205 0, /*bf_getcharbuffer*/
24207 #if PY_VERSION_HEX >= 0x02060000
24208 0, /*bf_getbuffer*/
24210 #if PY_VERSION_HEX >= 0x02060000
24211 0, /*bf_releasebuffer*/
24215 PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedElement = {
24216 PyVarObject_HEAD_INIT(0, 0)
24217 __Pyx_NAMESTR("lxml.objectify.ObjectifiedElement"), /*tp_name*/
24218 sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedElement), /*tp_basicsize*/
24220 __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
24226 &__pyx_tp_as_number_ObjectifiedElement, /*tp_as_number*/
24227 &__pyx_tp_as_sequence_ObjectifiedElement, /*tp_as_sequence*/
24228 &__pyx_tp_as_mapping_ObjectifiedElement, /*tp_as_mapping*/
24231 __pyx_pf_4lxml_9objectify_18ObjectifiedElement___str__, /*tp_str*/
24232 __pyx_tp_getattro_4lxml_9objectify_ObjectifiedElement, /*tp_getattro*/
24233 __pyx_tp_setattro_4lxml_9objectify_ObjectifiedElement, /*tp_setattro*/
24234 &__pyx_tp_as_buffer_ObjectifiedElement, /*tp_as_buffer*/
24235 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24236 __Pyx_DOCSTR("Main XML Element class.\n\n Element children are accessed as object attributes. Multiple children\n with the same name are available through a list index. Example::\n\n >>> root = XML(\"<root><c1><c2>0</c2><c2>1</c2></c1></root>\")\n >>> second_c2 = root.c1.c2[1]\n >>> print(second_c2.text)\n 1\n\n Note that you cannot (and must not) instantiate this class or its\n subclasses.\n "), /*tp_doc*/
24237 __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
24238 __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
24239 0, /*tp_richcompare*/
24240 0, /*tp_weaklistoffset*/
24241 __pyx_pf_4lxml_9objectify_18ObjectifiedElement___iter__, /*tp_iter*/
24243 __pyx_methods_4lxml_9objectify_ObjectifiedElement, /*tp_methods*/
24245 __pyx_getsets_4lxml_9objectify_ObjectifiedElement, /*tp_getset*/
24248 0, /*tp_descr_get*/
24249 0, /*tp_descr_set*/
24250 0, /*tp_dictoffset*/
24253 __pyx_tp_new_4lxml_9objectify_ObjectifiedElement, /*tp_new*/
24259 0, /*tp_subclasses*/
24263 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24264 PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
24269 static PyObject *__pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval(PyObject *o, void *x) {
24270 return __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get__(o);
24273 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifiedDataElement[] = {
24274 {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24275 {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24276 {__Pyx_NAMESTR("_setText"), (PyCFunction)__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement__setText, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_22ObjectifiedDataElement__setText)},
24280 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement[] = {
24281 {(char *)"pyval", __pyx_getprop_4lxml_9objectify_22ObjectifiedDataElement_pyval, 0, 0, 0},
24285 static PyNumberMethods __pyx_tp_as_number_ObjectifiedDataElement = {
24289 #if PY_MAJOR_VERSION < 3
24292 0, /*nb_remainder*/
24305 #if PY_MAJOR_VERSION < 3
24309 #if PY_MAJOR_VERSION >= 3
24315 #if PY_MAJOR_VERSION < 3
24318 #if PY_MAJOR_VERSION < 3
24321 0, /*nb_inplace_add*/
24322 0, /*nb_inplace_subtract*/
24323 0, /*nb_inplace_multiply*/
24324 #if PY_MAJOR_VERSION < 3
24325 0, /*nb_inplace_divide*/
24327 0, /*nb_inplace_remainder*/
24328 0, /*nb_inplace_power*/
24329 0, /*nb_inplace_lshift*/
24330 0, /*nb_inplace_rshift*/
24331 0, /*nb_inplace_and*/
24332 0, /*nb_inplace_xor*/
24333 0, /*nb_inplace_or*/
24334 0, /*nb_floor_divide*/
24335 0, /*nb_true_divide*/
24336 0, /*nb_inplace_floor_divide*/
24337 0, /*nb_inplace_true_divide*/
24338 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24343 static PySequenceMethods __pyx_tp_as_sequence_ObjectifiedDataElement = {
24350 0, /*sq_ass_slice*/
24352 0, /*sq_inplace_concat*/
24353 0, /*sq_inplace_repeat*/
24356 static PyMappingMethods __pyx_tp_as_mapping_ObjectifiedDataElement = {
24358 0, /*mp_subscript*/
24359 0, /*mp_ass_subscript*/
24362 static PyBufferProcs __pyx_tp_as_buffer_ObjectifiedDataElement = {
24363 #if PY_MAJOR_VERSION < 3
24364 0, /*bf_getreadbuffer*/
24366 #if PY_MAJOR_VERSION < 3
24367 0, /*bf_getwritebuffer*/
24369 #if PY_MAJOR_VERSION < 3
24370 0, /*bf_getsegcount*/
24372 #if PY_MAJOR_VERSION < 3
24373 0, /*bf_getcharbuffer*/
24375 #if PY_VERSION_HEX >= 0x02060000
24376 0, /*bf_getbuffer*/
24378 #if PY_VERSION_HEX >= 0x02060000
24379 0, /*bf_releasebuffer*/
24383 PyTypeObject __pyx_type_4lxml_9objectify_ObjectifiedDataElement = {
24384 PyVarObject_HEAD_INIT(0, 0)
24385 __Pyx_NAMESTR("lxml.objectify.ObjectifiedDataElement"), /*tp_name*/
24386 sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifiedDataElement), /*tp_basicsize*/
24388 __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
24393 __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___repr__, /*tp_repr*/
24394 &__pyx_tp_as_number_ObjectifiedDataElement, /*tp_as_number*/
24395 &__pyx_tp_as_sequence_ObjectifiedDataElement, /*tp_as_sequence*/
24396 &__pyx_tp_as_mapping_ObjectifiedDataElement, /*tp_as_mapping*/
24399 __pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__, /*tp_str*/
24402 &__pyx_tp_as_buffer_ObjectifiedDataElement, /*tp_as_buffer*/
24403 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24404 __Pyx_DOCSTR("This is the base class for all data type Elements. Subclasses should\n override the 'pyval' property and possibly the __str__ method.\n "), /*tp_doc*/
24405 __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
24406 __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
24407 0, /*tp_richcompare*/
24408 0, /*tp_weaklistoffset*/
24411 __pyx_methods_4lxml_9objectify_ObjectifiedDataElement, /*tp_methods*/
24413 __pyx_getsets_4lxml_9objectify_ObjectifiedDataElement, /*tp_getset*/
24416 0, /*tp_descr_get*/
24417 0, /*tp_descr_set*/
24418 0, /*tp_dictoffset*/
24421 __pyx_tp_new_4lxml_9objectify_ObjectifiedDataElement, /*tp_new*/
24427 0, /*tp_subclasses*/
24431 static PyObject *__pyx_tp_new_4lxml_9objectify_NumberElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24432 struct __pyx_obj_4lxml_9objectify_NumberElement *p;
24433 PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
24435 p = ((struct __pyx_obj_4lxml_9objectify_NumberElement *)o);
24436 p->_parse_value = Py_None; Py_INCREF(Py_None);
24440 static void __pyx_tp_dealloc_4lxml_9objectify_NumberElement(PyObject *o) {
24441 struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
24442 Py_XDECREF(p->_parse_value);
24443 __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement(o);
24446 static int __pyx_tp_traverse_4lxml_9objectify_NumberElement(PyObject *o, visitproc v, void *a) {
24448 struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
24449 e = __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement(o, v, a); if (e) return e;
24450 if (p->_parse_value) {
24451 e = (*v)(p->_parse_value, a); if (e) return e;
24456 static int __pyx_tp_clear_4lxml_9objectify_NumberElement(PyObject *o) {
24457 struct __pyx_obj_4lxml_9objectify_NumberElement *p = (struct __pyx_obj_4lxml_9objectify_NumberElement *)o;
24459 __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement(o);
24460 tmp = ((PyObject*)p->_parse_value);
24461 p->_parse_value = Py_None; Py_INCREF(Py_None);
24466 static PyObject *__pyx_getprop_4lxml_9objectify_13NumberElement_pyval(PyObject *o, void *x) {
24467 return __pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(o);
24470 static struct PyMethodDef __pyx_methods_4lxml_9objectify_NumberElement[] = {
24471 {__Pyx_NAMESTR("_setValueParser"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_13NumberElement__setValueParser)},
24472 {__Pyx_NAMESTR("__int__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___int__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24473 {__Pyx_NAMESTR("__long__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___long__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24474 {__Pyx_NAMESTR("__float__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___float__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24475 {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___complex__, METH_NOARGS, __Pyx_DOCSTR(0)},
24476 {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24477 {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24478 {__Pyx_NAMESTR("__oct__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___oct__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24479 {__Pyx_NAMESTR("__hex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___hex__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24480 {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___add__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24481 {__Pyx_NAMESTR("__sub__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___sub__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24482 {__Pyx_NAMESTR("__mul__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mul__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24483 {__Pyx_NAMESTR("__div__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___div__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24484 {__Pyx_NAMESTR("__truediv__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___truediv__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24485 {__Pyx_NAMESTR("__mod__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___mod__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24486 {__Pyx_NAMESTR("__neg__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___neg__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24487 {__Pyx_NAMESTR("__pos__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___pos__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24488 {__Pyx_NAMESTR("__abs__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___abs__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24489 {__Pyx_NAMESTR("__invert__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___invert__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
24490 {__Pyx_NAMESTR("__lshift__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___lshift__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24491 {__Pyx_NAMESTR("__rshift__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___rshift__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24492 {__Pyx_NAMESTR("__and__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___and__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24493 {__Pyx_NAMESTR("__or__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___or__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24494 {__Pyx_NAMESTR("__xor__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13NumberElement___xor__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
24498 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NumberElement[] = {
24499 {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13NumberElement_pyval, 0, 0, 0},
24503 static PyNumberMethods __pyx_tp_as_number_NumberElement = {
24504 __pyx_pf_4lxml_9objectify_13NumberElement___add__, /*nb_add*/
24505 __pyx_pf_4lxml_9objectify_13NumberElement___sub__, /*nb_subtract*/
24506 __pyx_pf_4lxml_9objectify_13NumberElement___mul__, /*nb_multiply*/
24507 #if PY_MAJOR_VERSION < 3
24508 __pyx_pf_4lxml_9objectify_13NumberElement___div__, /*nb_divide*/
24510 __pyx_pf_4lxml_9objectify_13NumberElement___mod__, /*nb_remainder*/
24512 __pyx_pf_4lxml_9objectify_13NumberElement___pow__, /*nb_power*/
24513 __pyx_pf_4lxml_9objectify_13NumberElement___neg__, /*nb_negative*/
24514 __pyx_pf_4lxml_9objectify_13NumberElement___pos__, /*nb_positive*/
24515 __pyx_pf_4lxml_9objectify_13NumberElement___abs__, /*nb_absolute*/
24516 __pyx_pf_4lxml_9objectify_13NumberElement___nonzero__, /*nb_nonzero*/
24517 __pyx_pf_4lxml_9objectify_13NumberElement___invert__, /*nb_invert*/
24518 __pyx_pf_4lxml_9objectify_13NumberElement___lshift__, /*nb_lshift*/
24519 __pyx_pf_4lxml_9objectify_13NumberElement___rshift__, /*nb_rshift*/
24520 __pyx_pf_4lxml_9objectify_13NumberElement___and__, /*nb_and*/
24521 __pyx_pf_4lxml_9objectify_13NumberElement___xor__, /*nb_xor*/
24522 __pyx_pf_4lxml_9objectify_13NumberElement___or__, /*nb_or*/
24523 #if PY_MAJOR_VERSION < 3
24526 __pyx_pf_4lxml_9objectify_13NumberElement___int__, /*nb_int*/
24527 #if PY_MAJOR_VERSION >= 3
24530 __pyx_pf_4lxml_9objectify_13NumberElement___long__, /*nb_long*/
24532 __pyx_pf_4lxml_9objectify_13NumberElement___float__, /*nb_float*/
24533 #if PY_MAJOR_VERSION < 3
24534 __pyx_pf_4lxml_9objectify_13NumberElement___oct__, /*nb_oct*/
24536 #if PY_MAJOR_VERSION < 3
24537 __pyx_pf_4lxml_9objectify_13NumberElement___hex__, /*nb_hex*/
24539 0, /*nb_inplace_add*/
24540 0, /*nb_inplace_subtract*/
24541 0, /*nb_inplace_multiply*/
24542 #if PY_MAJOR_VERSION < 3
24543 0, /*nb_inplace_divide*/
24545 0, /*nb_inplace_remainder*/
24546 0, /*nb_inplace_power*/
24547 0, /*nb_inplace_lshift*/
24548 0, /*nb_inplace_rshift*/
24549 0, /*nb_inplace_and*/
24550 0, /*nb_inplace_xor*/
24551 0, /*nb_inplace_or*/
24552 0, /*nb_floor_divide*/
24553 __pyx_pf_4lxml_9objectify_13NumberElement___truediv__, /*nb_true_divide*/
24554 0, /*nb_inplace_floor_divide*/
24555 0, /*nb_inplace_true_divide*/
24556 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24561 static PySequenceMethods __pyx_tp_as_sequence_NumberElement = {
24568 0, /*sq_ass_slice*/
24570 0, /*sq_inplace_concat*/
24571 0, /*sq_inplace_repeat*/
24574 static PyMappingMethods __pyx_tp_as_mapping_NumberElement = {
24576 0, /*mp_subscript*/
24577 0, /*mp_ass_subscript*/
24580 static PyBufferProcs __pyx_tp_as_buffer_NumberElement = {
24581 #if PY_MAJOR_VERSION < 3
24582 0, /*bf_getreadbuffer*/
24584 #if PY_MAJOR_VERSION < 3
24585 0, /*bf_getwritebuffer*/
24587 #if PY_MAJOR_VERSION < 3
24588 0, /*bf_getsegcount*/
24590 #if PY_MAJOR_VERSION < 3
24591 0, /*bf_getcharbuffer*/
24593 #if PY_VERSION_HEX >= 0x02060000
24594 0, /*bf_getbuffer*/
24596 #if PY_VERSION_HEX >= 0x02060000
24597 0, /*bf_releasebuffer*/
24601 PyTypeObject __pyx_type_4lxml_9objectify_NumberElement = {
24602 PyVarObject_HEAD_INIT(0, 0)
24603 __Pyx_NAMESTR("lxml.objectify.NumberElement"), /*tp_name*/
24604 sizeof(struct __pyx_obj_4lxml_9objectify_NumberElement), /*tp_basicsize*/
24606 __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
24611 __pyx_pf_4lxml_9objectify_13NumberElement___repr__, /*tp_repr*/
24612 &__pyx_tp_as_number_NumberElement, /*tp_as_number*/
24613 &__pyx_tp_as_sequence_NumberElement, /*tp_as_sequence*/
24614 &__pyx_tp_as_mapping_NumberElement, /*tp_as_mapping*/
24617 __pyx_pf_4lxml_9objectify_13NumberElement___str__, /*tp_str*/
24620 &__pyx_tp_as_buffer_NumberElement, /*tp_as_buffer*/
24621 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24623 __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
24624 __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
24625 __pyx_pf_4lxml_9objectify_13NumberElement___richcmp__, /*tp_richcompare*/
24626 0, /*tp_weaklistoffset*/
24629 __pyx_methods_4lxml_9objectify_NumberElement, /*tp_methods*/
24631 __pyx_getsets_4lxml_9objectify_NumberElement, /*tp_getset*/
24634 0, /*tp_descr_get*/
24635 0, /*tp_descr_set*/
24636 0, /*tp_dictoffset*/
24639 __pyx_tp_new_4lxml_9objectify_NumberElement, /*tp_new*/
24645 0, /*tp_subclasses*/
24649 static PyObject *__pyx_tp_new_4lxml_9objectify_IntElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24650 PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
24655 static struct PyMethodDef __pyx_methods_4lxml_9objectify_IntElement[] = {
24656 {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_10IntElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
24660 static PyNumberMethods __pyx_tp_as_number_IntElement = {
24664 #if PY_MAJOR_VERSION < 3
24667 0, /*nb_remainder*/
24680 #if PY_MAJOR_VERSION < 3
24684 #if PY_MAJOR_VERSION >= 3
24690 #if PY_MAJOR_VERSION < 3
24693 #if PY_MAJOR_VERSION < 3
24696 0, /*nb_inplace_add*/
24697 0, /*nb_inplace_subtract*/
24698 0, /*nb_inplace_multiply*/
24699 #if PY_MAJOR_VERSION < 3
24700 0, /*nb_inplace_divide*/
24702 0, /*nb_inplace_remainder*/
24703 0, /*nb_inplace_power*/
24704 0, /*nb_inplace_lshift*/
24705 0, /*nb_inplace_rshift*/
24706 0, /*nb_inplace_and*/
24707 0, /*nb_inplace_xor*/
24708 0, /*nb_inplace_or*/
24709 0, /*nb_floor_divide*/
24710 0, /*nb_true_divide*/
24711 0, /*nb_inplace_floor_divide*/
24712 0, /*nb_inplace_true_divide*/
24713 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24718 static PySequenceMethods __pyx_tp_as_sequence_IntElement = {
24725 0, /*sq_ass_slice*/
24727 0, /*sq_inplace_concat*/
24728 0, /*sq_inplace_repeat*/
24731 static PyMappingMethods __pyx_tp_as_mapping_IntElement = {
24733 0, /*mp_subscript*/
24734 0, /*mp_ass_subscript*/
24737 static PyBufferProcs __pyx_tp_as_buffer_IntElement = {
24738 #if PY_MAJOR_VERSION < 3
24739 0, /*bf_getreadbuffer*/
24741 #if PY_MAJOR_VERSION < 3
24742 0, /*bf_getwritebuffer*/
24744 #if PY_MAJOR_VERSION < 3
24745 0, /*bf_getsegcount*/
24747 #if PY_MAJOR_VERSION < 3
24748 0, /*bf_getcharbuffer*/
24750 #if PY_VERSION_HEX >= 0x02060000
24751 0, /*bf_getbuffer*/
24753 #if PY_VERSION_HEX >= 0x02060000
24754 0, /*bf_releasebuffer*/
24758 PyTypeObject __pyx_type_4lxml_9objectify_IntElement = {
24759 PyVarObject_HEAD_INIT(0, 0)
24760 __Pyx_NAMESTR("lxml.objectify.IntElement"), /*tp_name*/
24761 sizeof(struct __pyx_obj_4lxml_9objectify_IntElement), /*tp_basicsize*/
24763 __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
24769 &__pyx_tp_as_number_IntElement, /*tp_as_number*/
24770 &__pyx_tp_as_sequence_IntElement, /*tp_as_sequence*/
24771 &__pyx_tp_as_mapping_IntElement, /*tp_as_mapping*/
24777 &__pyx_tp_as_buffer_IntElement, /*tp_as_buffer*/
24778 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24780 __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
24781 __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
24782 0, /*tp_richcompare*/
24783 0, /*tp_weaklistoffset*/
24786 __pyx_methods_4lxml_9objectify_IntElement, /*tp_methods*/
24791 0, /*tp_descr_get*/
24792 0, /*tp_descr_set*/
24793 0, /*tp_dictoffset*/
24796 __pyx_tp_new_4lxml_9objectify_IntElement, /*tp_new*/
24802 0, /*tp_subclasses*/
24806 static PyObject *__pyx_tp_new_4lxml_9objectify_LongElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24807 PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
24812 static struct PyMethodDef __pyx_methods_4lxml_9objectify_LongElement[] = {
24813 {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_11LongElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
24817 static PyNumberMethods __pyx_tp_as_number_LongElement = {
24821 #if PY_MAJOR_VERSION < 3
24824 0, /*nb_remainder*/
24837 #if PY_MAJOR_VERSION < 3
24841 #if PY_MAJOR_VERSION >= 3
24847 #if PY_MAJOR_VERSION < 3
24850 #if PY_MAJOR_VERSION < 3
24853 0, /*nb_inplace_add*/
24854 0, /*nb_inplace_subtract*/
24855 0, /*nb_inplace_multiply*/
24856 #if PY_MAJOR_VERSION < 3
24857 0, /*nb_inplace_divide*/
24859 0, /*nb_inplace_remainder*/
24860 0, /*nb_inplace_power*/
24861 0, /*nb_inplace_lshift*/
24862 0, /*nb_inplace_rshift*/
24863 0, /*nb_inplace_and*/
24864 0, /*nb_inplace_xor*/
24865 0, /*nb_inplace_or*/
24866 0, /*nb_floor_divide*/
24867 0, /*nb_true_divide*/
24868 0, /*nb_inplace_floor_divide*/
24869 0, /*nb_inplace_true_divide*/
24870 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
24875 static PySequenceMethods __pyx_tp_as_sequence_LongElement = {
24882 0, /*sq_ass_slice*/
24884 0, /*sq_inplace_concat*/
24885 0, /*sq_inplace_repeat*/
24888 static PyMappingMethods __pyx_tp_as_mapping_LongElement = {
24890 0, /*mp_subscript*/
24891 0, /*mp_ass_subscript*/
24894 static PyBufferProcs __pyx_tp_as_buffer_LongElement = {
24895 #if PY_MAJOR_VERSION < 3
24896 0, /*bf_getreadbuffer*/
24898 #if PY_MAJOR_VERSION < 3
24899 0, /*bf_getwritebuffer*/
24901 #if PY_MAJOR_VERSION < 3
24902 0, /*bf_getsegcount*/
24904 #if PY_MAJOR_VERSION < 3
24905 0, /*bf_getcharbuffer*/
24907 #if PY_VERSION_HEX >= 0x02060000
24908 0, /*bf_getbuffer*/
24910 #if PY_VERSION_HEX >= 0x02060000
24911 0, /*bf_releasebuffer*/
24915 PyTypeObject __pyx_type_4lxml_9objectify_LongElement = {
24916 PyVarObject_HEAD_INIT(0, 0)
24917 __Pyx_NAMESTR("lxml.objectify.LongElement"), /*tp_name*/
24918 sizeof(struct __pyx_obj_4lxml_9objectify_LongElement), /*tp_basicsize*/
24920 __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
24926 &__pyx_tp_as_number_LongElement, /*tp_as_number*/
24927 &__pyx_tp_as_sequence_LongElement, /*tp_as_sequence*/
24928 &__pyx_tp_as_mapping_LongElement, /*tp_as_mapping*/
24934 &__pyx_tp_as_buffer_LongElement, /*tp_as_buffer*/
24935 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
24937 __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
24938 __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
24939 0, /*tp_richcompare*/
24940 0, /*tp_weaklistoffset*/
24943 __pyx_methods_4lxml_9objectify_LongElement, /*tp_methods*/
24948 0, /*tp_descr_get*/
24949 0, /*tp_descr_set*/
24950 0, /*tp_dictoffset*/
24953 __pyx_tp_new_4lxml_9objectify_LongElement, /*tp_new*/
24959 0, /*tp_subclasses*/
24963 static PyObject *__pyx_tp_new_4lxml_9objectify_FloatElement(PyTypeObject *t, PyObject *a, PyObject *k) {
24964 PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
24969 static struct PyMethodDef __pyx_methods_4lxml_9objectify_FloatElement[] = {
24970 {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_12FloatElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
24974 static PyNumberMethods __pyx_tp_as_number_FloatElement = {
24978 #if PY_MAJOR_VERSION < 3
24981 0, /*nb_remainder*/
24994 #if PY_MAJOR_VERSION < 3
24998 #if PY_MAJOR_VERSION >= 3
25004 #if PY_MAJOR_VERSION < 3
25007 #if PY_MAJOR_VERSION < 3
25010 0, /*nb_inplace_add*/
25011 0, /*nb_inplace_subtract*/
25012 0, /*nb_inplace_multiply*/
25013 #if PY_MAJOR_VERSION < 3
25014 0, /*nb_inplace_divide*/
25016 0, /*nb_inplace_remainder*/
25017 0, /*nb_inplace_power*/
25018 0, /*nb_inplace_lshift*/
25019 0, /*nb_inplace_rshift*/
25020 0, /*nb_inplace_and*/
25021 0, /*nb_inplace_xor*/
25022 0, /*nb_inplace_or*/
25023 0, /*nb_floor_divide*/
25024 0, /*nb_true_divide*/
25025 0, /*nb_inplace_floor_divide*/
25026 0, /*nb_inplace_true_divide*/
25027 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25032 static PySequenceMethods __pyx_tp_as_sequence_FloatElement = {
25039 0, /*sq_ass_slice*/
25041 0, /*sq_inplace_concat*/
25042 0, /*sq_inplace_repeat*/
25045 static PyMappingMethods __pyx_tp_as_mapping_FloatElement = {
25047 0, /*mp_subscript*/
25048 0, /*mp_ass_subscript*/
25051 static PyBufferProcs __pyx_tp_as_buffer_FloatElement = {
25052 #if PY_MAJOR_VERSION < 3
25053 0, /*bf_getreadbuffer*/
25055 #if PY_MAJOR_VERSION < 3
25056 0, /*bf_getwritebuffer*/
25058 #if PY_MAJOR_VERSION < 3
25059 0, /*bf_getsegcount*/
25061 #if PY_MAJOR_VERSION < 3
25062 0, /*bf_getcharbuffer*/
25064 #if PY_VERSION_HEX >= 0x02060000
25065 0, /*bf_getbuffer*/
25067 #if PY_VERSION_HEX >= 0x02060000
25068 0, /*bf_releasebuffer*/
25072 PyTypeObject __pyx_type_4lxml_9objectify_FloatElement = {
25073 PyVarObject_HEAD_INIT(0, 0)
25074 __Pyx_NAMESTR("lxml.objectify.FloatElement"), /*tp_name*/
25075 sizeof(struct __pyx_obj_4lxml_9objectify_FloatElement), /*tp_basicsize*/
25077 __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
25083 &__pyx_tp_as_number_FloatElement, /*tp_as_number*/
25084 &__pyx_tp_as_sequence_FloatElement, /*tp_as_sequence*/
25085 &__pyx_tp_as_mapping_FloatElement, /*tp_as_mapping*/
25091 &__pyx_tp_as_buffer_FloatElement, /*tp_as_buffer*/
25092 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25094 __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
25095 __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
25096 0, /*tp_richcompare*/
25097 0, /*tp_weaklistoffset*/
25100 __pyx_methods_4lxml_9objectify_FloatElement, /*tp_methods*/
25105 0, /*tp_descr_get*/
25106 0, /*tp_descr_set*/
25107 0, /*tp_dictoffset*/
25110 __pyx_tp_new_4lxml_9objectify_FloatElement, /*tp_new*/
25116 0, /*tp_subclasses*/
25120 static PyObject *__pyx_tp_new_4lxml_9objectify_StringElement(PyTypeObject *t, PyObject *a, PyObject *k) {
25121 PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
25126 static PyObject *__pyx_getprop_4lxml_9objectify_13StringElement_pyval(PyObject *o, void *x) {
25127 return __pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(o);
25130 static struct PyMethodDef __pyx_methods_4lxml_9objectify_StringElement[] = {
25131 {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25132 {__Pyx_NAMESTR("strlen"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement_strlen, METH_NOARGS, __Pyx_DOCSTR(0)},
25133 {__Pyx_NAMESTR("__add__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___add__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25134 {__Pyx_NAMESTR("__mul__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mul__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25135 {__Pyx_NAMESTR("__mod__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___mod__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25136 {__Pyx_NAMESTR("__int__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___int__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25137 {__Pyx_NAMESTR("__long__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___long__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25138 {__Pyx_NAMESTR("__float__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___float__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25139 {__Pyx_NAMESTR("__complex__"), (PyCFunction)__pyx_pf_4lxml_9objectify_13StringElement___complex__, METH_NOARGS, __Pyx_DOCSTR(0)},
25143 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_StringElement[] = {
25144 {(char *)"pyval", __pyx_getprop_4lxml_9objectify_13StringElement_pyval, 0, 0, 0},
25148 static PyNumberMethods __pyx_tp_as_number_StringElement = {
25149 __pyx_pf_4lxml_9objectify_13StringElement___add__, /*nb_add*/
25151 __pyx_pf_4lxml_9objectify_13StringElement___mul__, /*nb_multiply*/
25152 #if PY_MAJOR_VERSION < 3
25155 __pyx_pf_4lxml_9objectify_13StringElement___mod__, /*nb_remainder*/
25161 __pyx_pf_4lxml_9objectify_13StringElement___nonzero__, /*nb_nonzero*/
25168 #if PY_MAJOR_VERSION < 3
25171 __pyx_pf_4lxml_9objectify_13StringElement___int__, /*nb_int*/
25172 #if PY_MAJOR_VERSION >= 3
25175 __pyx_pf_4lxml_9objectify_13StringElement___long__, /*nb_long*/
25177 __pyx_pf_4lxml_9objectify_13StringElement___float__, /*nb_float*/
25178 #if PY_MAJOR_VERSION < 3
25181 #if PY_MAJOR_VERSION < 3
25184 0, /*nb_inplace_add*/
25185 0, /*nb_inplace_subtract*/
25186 0, /*nb_inplace_multiply*/
25187 #if PY_MAJOR_VERSION < 3
25188 0, /*nb_inplace_divide*/
25190 0, /*nb_inplace_remainder*/
25191 0, /*nb_inplace_power*/
25192 0, /*nb_inplace_lshift*/
25193 0, /*nb_inplace_rshift*/
25194 0, /*nb_inplace_and*/
25195 0, /*nb_inplace_xor*/
25196 0, /*nb_inplace_or*/
25197 0, /*nb_floor_divide*/
25198 0, /*nb_true_divide*/
25199 0, /*nb_inplace_floor_divide*/
25200 0, /*nb_inplace_true_divide*/
25201 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25206 static PySequenceMethods __pyx_tp_as_sequence_StringElement = {
25213 0, /*sq_ass_slice*/
25215 0, /*sq_inplace_concat*/
25216 0, /*sq_inplace_repeat*/
25219 static PyMappingMethods __pyx_tp_as_mapping_StringElement = {
25221 0, /*mp_subscript*/
25222 0, /*mp_ass_subscript*/
25225 static PyBufferProcs __pyx_tp_as_buffer_StringElement = {
25226 #if PY_MAJOR_VERSION < 3
25227 0, /*bf_getreadbuffer*/
25229 #if PY_MAJOR_VERSION < 3
25230 0, /*bf_getwritebuffer*/
25232 #if PY_MAJOR_VERSION < 3
25233 0, /*bf_getsegcount*/
25235 #if PY_MAJOR_VERSION < 3
25236 0, /*bf_getcharbuffer*/
25238 #if PY_VERSION_HEX >= 0x02060000
25239 0, /*bf_getbuffer*/
25241 #if PY_VERSION_HEX >= 0x02060000
25242 0, /*bf_releasebuffer*/
25246 PyTypeObject __pyx_type_4lxml_9objectify_StringElement = {
25247 PyVarObject_HEAD_INIT(0, 0)
25248 __Pyx_NAMESTR("lxml.objectify.StringElement"), /*tp_name*/
25249 sizeof(struct __pyx_obj_4lxml_9objectify_StringElement), /*tp_basicsize*/
25251 __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
25256 __pyx_pf_4lxml_9objectify_13StringElement___repr__, /*tp_repr*/
25257 &__pyx_tp_as_number_StringElement, /*tp_as_number*/
25258 &__pyx_tp_as_sequence_StringElement, /*tp_as_sequence*/
25259 &__pyx_tp_as_mapping_StringElement, /*tp_as_mapping*/
25265 &__pyx_tp_as_buffer_StringElement, /*tp_as_buffer*/
25266 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25267 __Pyx_DOCSTR("String data class.\n\n Note that this class does *not* support the sequence protocol of strings:\n len(), iter(), str_attr[0], str_attr[0:1], etc. are *not* supported.\n Instead, use the .text attribute to get a 'real' string.\n "), /*tp_doc*/
25268 __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
25269 __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
25270 __pyx_pf_4lxml_9objectify_13StringElement___richcmp__, /*tp_richcompare*/
25271 0, /*tp_weaklistoffset*/
25274 __pyx_methods_4lxml_9objectify_StringElement, /*tp_methods*/
25276 __pyx_getsets_4lxml_9objectify_StringElement, /*tp_getset*/
25279 0, /*tp_descr_get*/
25280 0, /*tp_descr_set*/
25281 0, /*tp_dictoffset*/
25284 __pyx_tp_new_4lxml_9objectify_StringElement, /*tp_new*/
25290 0, /*tp_subclasses*/
25294 static PyObject *__pyx_tp_new_4lxml_9objectify_NoneElement(PyTypeObject *t, PyObject *a, PyObject *k) {
25295 PyObject *o = __pyx_tp_new_4lxml_9objectify_ObjectifiedElement(t, a, k);
25300 static PyObject *__pyx_getprop_4lxml_9objectify_11NoneElement_pyval(PyObject *o, void *x) {
25301 return __pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(o);
25304 static struct PyMethodDef __pyx_methods_4lxml_9objectify_NoneElement[] = {
25305 {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25306 {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11NoneElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25310 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_NoneElement[] = {
25311 {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11NoneElement_pyval, 0, 0, 0},
25315 static PyNumberMethods __pyx_tp_as_number_NoneElement = {
25319 #if PY_MAJOR_VERSION < 3
25322 0, /*nb_remainder*/
25328 __pyx_pf_4lxml_9objectify_11NoneElement___nonzero__, /*nb_nonzero*/
25335 #if PY_MAJOR_VERSION < 3
25339 #if PY_MAJOR_VERSION >= 3
25345 #if PY_MAJOR_VERSION < 3
25348 #if PY_MAJOR_VERSION < 3
25351 0, /*nb_inplace_add*/
25352 0, /*nb_inplace_subtract*/
25353 0, /*nb_inplace_multiply*/
25354 #if PY_MAJOR_VERSION < 3
25355 0, /*nb_inplace_divide*/
25357 0, /*nb_inplace_remainder*/
25358 0, /*nb_inplace_power*/
25359 0, /*nb_inplace_lshift*/
25360 0, /*nb_inplace_rshift*/
25361 0, /*nb_inplace_and*/
25362 0, /*nb_inplace_xor*/
25363 0, /*nb_inplace_or*/
25364 0, /*nb_floor_divide*/
25365 0, /*nb_true_divide*/
25366 0, /*nb_inplace_floor_divide*/
25367 0, /*nb_inplace_true_divide*/
25368 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25373 static PySequenceMethods __pyx_tp_as_sequence_NoneElement = {
25380 0, /*sq_ass_slice*/
25382 0, /*sq_inplace_concat*/
25383 0, /*sq_inplace_repeat*/
25386 static PyMappingMethods __pyx_tp_as_mapping_NoneElement = {
25388 0, /*mp_subscript*/
25389 0, /*mp_ass_subscript*/
25392 static PyBufferProcs __pyx_tp_as_buffer_NoneElement = {
25393 #if PY_MAJOR_VERSION < 3
25394 0, /*bf_getreadbuffer*/
25396 #if PY_MAJOR_VERSION < 3
25397 0, /*bf_getwritebuffer*/
25399 #if PY_MAJOR_VERSION < 3
25400 0, /*bf_getsegcount*/
25402 #if PY_MAJOR_VERSION < 3
25403 0, /*bf_getcharbuffer*/
25405 #if PY_VERSION_HEX >= 0x02060000
25406 0, /*bf_getbuffer*/
25408 #if PY_VERSION_HEX >= 0x02060000
25409 0, /*bf_releasebuffer*/
25413 PyTypeObject __pyx_type_4lxml_9objectify_NoneElement = {
25414 PyVarObject_HEAD_INIT(0, 0)
25415 __Pyx_NAMESTR("lxml.objectify.NoneElement"), /*tp_name*/
25416 sizeof(struct __pyx_obj_4lxml_9objectify_NoneElement), /*tp_basicsize*/
25418 __pyx_tp_dealloc_4lxml_9objectify_ObjectifiedElement, /*tp_dealloc*/
25423 __pyx_pf_4lxml_9objectify_11NoneElement___repr__, /*tp_repr*/
25424 &__pyx_tp_as_number_NoneElement, /*tp_as_number*/
25425 &__pyx_tp_as_sequence_NoneElement, /*tp_as_sequence*/
25426 &__pyx_tp_as_mapping_NoneElement, /*tp_as_mapping*/
25429 __pyx_pf_4lxml_9objectify_11NoneElement___str__, /*tp_str*/
25432 &__pyx_tp_as_buffer_NoneElement, /*tp_as_buffer*/
25433 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25435 __pyx_tp_traverse_4lxml_9objectify_ObjectifiedElement, /*tp_traverse*/
25436 __pyx_tp_clear_4lxml_9objectify_ObjectifiedElement, /*tp_clear*/
25437 __pyx_pf_4lxml_9objectify_11NoneElement___richcmp__, /*tp_richcompare*/
25438 0, /*tp_weaklistoffset*/
25441 __pyx_methods_4lxml_9objectify_NoneElement, /*tp_methods*/
25443 __pyx_getsets_4lxml_9objectify_NoneElement, /*tp_getset*/
25446 0, /*tp_descr_get*/
25447 0, /*tp_descr_set*/
25448 0, /*tp_dictoffset*/
25451 __pyx_tp_new_4lxml_9objectify_NoneElement, /*tp_new*/
25457 0, /*tp_subclasses*/
25461 static PyObject *__pyx_tp_new_4lxml_9objectify_BoolElement(PyTypeObject *t, PyObject *a, PyObject *k) {
25462 PyObject *o = __pyx_tp_new_4lxml_9objectify_NumberElement(t, a, k);
25467 static PyObject *__pyx_getprop_4lxml_9objectify_11BoolElement_pyval(PyObject *o, void *x) {
25468 return __pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(o);
25471 static struct PyMethodDef __pyx_methods_4lxml_9objectify_BoolElement[] = {
25472 {__Pyx_NAMESTR("_init"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement__init, METH_NOARGS, __Pyx_DOCSTR(0)},
25473 {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25474 {__Pyx_NAMESTR("__repr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_11BoolElement___repr__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
25478 static struct PyGetSetDef __pyx_getsets_4lxml_9objectify_BoolElement[] = {
25479 {(char *)"pyval", __pyx_getprop_4lxml_9objectify_11BoolElement_pyval, 0, 0, 0},
25483 static PyNumberMethods __pyx_tp_as_number_BoolElement = {
25487 #if PY_MAJOR_VERSION < 3
25490 0, /*nb_remainder*/
25496 __pyx_pf_4lxml_9objectify_11BoolElement___nonzero__, /*nb_nonzero*/
25503 #if PY_MAJOR_VERSION < 3
25507 #if PY_MAJOR_VERSION >= 3
25513 #if PY_MAJOR_VERSION < 3
25516 #if PY_MAJOR_VERSION < 3
25519 0, /*nb_inplace_add*/
25520 0, /*nb_inplace_subtract*/
25521 0, /*nb_inplace_multiply*/
25522 #if PY_MAJOR_VERSION < 3
25523 0, /*nb_inplace_divide*/
25525 0, /*nb_inplace_remainder*/
25526 0, /*nb_inplace_power*/
25527 0, /*nb_inplace_lshift*/
25528 0, /*nb_inplace_rshift*/
25529 0, /*nb_inplace_and*/
25530 0, /*nb_inplace_xor*/
25531 0, /*nb_inplace_or*/
25532 0, /*nb_floor_divide*/
25533 0, /*nb_true_divide*/
25534 0, /*nb_inplace_floor_divide*/
25535 0, /*nb_inplace_true_divide*/
25536 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25541 static PySequenceMethods __pyx_tp_as_sequence_BoolElement = {
25548 0, /*sq_ass_slice*/
25550 0, /*sq_inplace_concat*/
25551 0, /*sq_inplace_repeat*/
25554 static PyMappingMethods __pyx_tp_as_mapping_BoolElement = {
25556 0, /*mp_subscript*/
25557 0, /*mp_ass_subscript*/
25560 static PyBufferProcs __pyx_tp_as_buffer_BoolElement = {
25561 #if PY_MAJOR_VERSION < 3
25562 0, /*bf_getreadbuffer*/
25564 #if PY_MAJOR_VERSION < 3
25565 0, /*bf_getwritebuffer*/
25567 #if PY_MAJOR_VERSION < 3
25568 0, /*bf_getsegcount*/
25570 #if PY_MAJOR_VERSION < 3
25571 0, /*bf_getcharbuffer*/
25573 #if PY_VERSION_HEX >= 0x02060000
25574 0, /*bf_getbuffer*/
25576 #if PY_VERSION_HEX >= 0x02060000
25577 0, /*bf_releasebuffer*/
25581 PyTypeObject __pyx_type_4lxml_9objectify_BoolElement = {
25582 PyVarObject_HEAD_INIT(0, 0)
25583 __Pyx_NAMESTR("lxml.objectify.BoolElement"), /*tp_name*/
25584 sizeof(struct __pyx_obj_4lxml_9objectify_BoolElement), /*tp_basicsize*/
25586 __pyx_tp_dealloc_4lxml_9objectify_NumberElement, /*tp_dealloc*/
25591 __pyx_pf_4lxml_9objectify_11BoolElement___repr__, /*tp_repr*/
25592 &__pyx_tp_as_number_BoolElement, /*tp_as_number*/
25593 &__pyx_tp_as_sequence_BoolElement, /*tp_as_sequence*/
25594 &__pyx_tp_as_mapping_BoolElement, /*tp_as_mapping*/
25597 __pyx_pf_4lxml_9objectify_11BoolElement___str__, /*tp_str*/
25600 &__pyx_tp_as_buffer_BoolElement, /*tp_as_buffer*/
25601 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25602 __Pyx_DOCSTR("Boolean type base on string values: 'true' or 'false'.\n\n Note that this inherits from IntElement to mimic the behaviour of\n Python's bool type.\n "), /*tp_doc*/
25603 __pyx_tp_traverse_4lxml_9objectify_NumberElement, /*tp_traverse*/
25604 __pyx_tp_clear_4lxml_9objectify_NumberElement, /*tp_clear*/
25605 __pyx_pf_4lxml_9objectify_11BoolElement___richcmp__, /*tp_richcompare*/
25606 0, /*tp_weaklistoffset*/
25609 __pyx_methods_4lxml_9objectify_BoolElement, /*tp_methods*/
25611 __pyx_getsets_4lxml_9objectify_BoolElement, /*tp_getset*/
25614 0, /*tp_descr_get*/
25615 0, /*tp_descr_set*/
25616 0, /*tp_dictoffset*/
25619 __pyx_tp_new_4lxml_9objectify_BoolElement, /*tp_new*/
25625 0, /*tp_subclasses*/
25629 static PyObject *__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(PyTypeObject *t, PyObject *a, PyObject *k) {
25630 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p;
25631 PyObject *o = (*t->tp_alloc)(t, 0);
25633 p = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o);
25634 p->_tag = Py_None; Py_INCREF(Py_None);
25635 p->_nsmap = Py_None; Py_INCREF(Py_None);
25636 p->_element_factory = Py_None; Py_INCREF(Py_None);
25640 static void __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
25641 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
25642 Py_XDECREF(p->_tag);
25643 Py_XDECREF(p->_nsmap);
25644 Py_XDECREF(p->_element_factory);
25645 (*Py_TYPE(o)->tp_free)(o);
25648 static int __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o, visitproc v, void *a) {
25650 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
25652 e = (*v)(p->_tag, a); if (e) return e;
25655 e = (*v)(p->_nsmap, a); if (e) return e;
25657 if (p->_element_factory) {
25658 e = (*v)(p->_element_factory, a); if (e) return e;
25663 static int __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller(PyObject *o) {
25664 struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *p = (struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)o;
25666 tmp = ((PyObject*)p->_tag);
25667 p->_tag = Py_None; Py_INCREF(Py_None);
25669 tmp = ((PyObject*)p->_nsmap);
25670 p->_nsmap = Py_None; Py_INCREF(Py_None);
25672 tmp = ((PyObject*)p->_element_factory);
25673 p->_element_factory = Py_None; Py_INCREF(Py_None);
25678 static struct PyMethodDef __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller[] = {
25679 {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__)},
25683 static PyNumberMethods __pyx_tp_as_number__ObjectifyElementMakerCaller = {
25687 #if PY_MAJOR_VERSION < 3
25690 0, /*nb_remainder*/
25703 #if PY_MAJOR_VERSION < 3
25707 #if PY_MAJOR_VERSION >= 3
25713 #if PY_MAJOR_VERSION < 3
25716 #if PY_MAJOR_VERSION < 3
25719 0, /*nb_inplace_add*/
25720 0, /*nb_inplace_subtract*/
25721 0, /*nb_inplace_multiply*/
25722 #if PY_MAJOR_VERSION < 3
25723 0, /*nb_inplace_divide*/
25725 0, /*nb_inplace_remainder*/
25726 0, /*nb_inplace_power*/
25727 0, /*nb_inplace_lshift*/
25728 0, /*nb_inplace_rshift*/
25729 0, /*nb_inplace_and*/
25730 0, /*nb_inplace_xor*/
25731 0, /*nb_inplace_or*/
25732 0, /*nb_floor_divide*/
25733 0, /*nb_true_divide*/
25734 0, /*nb_inplace_floor_divide*/
25735 0, /*nb_inplace_true_divide*/
25736 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25741 static PySequenceMethods __pyx_tp_as_sequence__ObjectifyElementMakerCaller = {
25748 0, /*sq_ass_slice*/
25750 0, /*sq_inplace_concat*/
25751 0, /*sq_inplace_repeat*/
25754 static PyMappingMethods __pyx_tp_as_mapping__ObjectifyElementMakerCaller = {
25756 0, /*mp_subscript*/
25757 0, /*mp_ass_subscript*/
25760 static PyBufferProcs __pyx_tp_as_buffer__ObjectifyElementMakerCaller = {
25761 #if PY_MAJOR_VERSION < 3
25762 0, /*bf_getreadbuffer*/
25764 #if PY_MAJOR_VERSION < 3
25765 0, /*bf_getwritebuffer*/
25767 #if PY_MAJOR_VERSION < 3
25768 0, /*bf_getsegcount*/
25770 #if PY_MAJOR_VERSION < 3
25771 0, /*bf_getcharbuffer*/
25773 #if PY_VERSION_HEX >= 0x02060000
25774 0, /*bf_getbuffer*/
25776 #if PY_VERSION_HEX >= 0x02060000
25777 0, /*bf_releasebuffer*/
25781 PyTypeObject __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller = {
25782 PyVarObject_HEAD_INIT(0, 0)
25783 __Pyx_NAMESTR("lxml.objectify._ObjectifyElementMakerCaller"), /*tp_name*/
25784 sizeof(struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller), /*tp_basicsize*/
25786 __pyx_tp_dealloc_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_dealloc*/
25792 &__pyx_tp_as_number__ObjectifyElementMakerCaller, /*tp_as_number*/
25793 &__pyx_tp_as_sequence__ObjectifyElementMakerCaller, /*tp_as_sequence*/
25794 &__pyx_tp_as_mapping__ObjectifyElementMakerCaller, /*tp_as_mapping*/
25796 __pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__, /*tp_call*/
25800 &__pyx_tp_as_buffer__ObjectifyElementMakerCaller, /*tp_as_buffer*/
25801 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
25803 __pyx_tp_traverse_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_traverse*/
25804 __pyx_tp_clear_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_clear*/
25805 0, /*tp_richcompare*/
25806 0, /*tp_weaklistoffset*/
25809 __pyx_methods_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_methods*/
25814 0, /*tp_descr_get*/
25815 0, /*tp_descr_set*/
25816 0, /*tp_dictoffset*/
25819 __pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller, /*tp_new*/
25825 0, /*tp_subclasses*/
25829 static PyObject *__pyx_tp_new_4lxml_9objectify_ElementMaker(PyTypeObject *t, PyObject *a, PyObject *k) {
25830 struct __pyx_obj_4lxml_9objectify_ElementMaker *p;
25831 PyObject *o = (*t->tp_alloc)(t, 0);
25833 p = ((struct __pyx_obj_4lxml_9objectify_ElementMaker *)o);
25834 p->_makeelement = Py_None; Py_INCREF(Py_None);
25835 p->_namespace = Py_None; Py_INCREF(Py_None);
25836 p->_nsmap = Py_None; Py_INCREF(Py_None);
25840 static void __pyx_tp_dealloc_4lxml_9objectify_ElementMaker(PyObject *o) {
25841 struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
25842 Py_XDECREF(p->_makeelement);
25843 Py_XDECREF(p->_namespace);
25844 Py_XDECREF(p->_nsmap);
25845 (*Py_TYPE(o)->tp_free)(o);
25848 static int __pyx_tp_traverse_4lxml_9objectify_ElementMaker(PyObject *o, visitproc v, void *a) {
25850 struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
25851 if (p->_makeelement) {
25852 e = (*v)(p->_makeelement, a); if (e) return e;
25854 if (p->_namespace) {
25855 e = (*v)(p->_namespace, a); if (e) return e;
25858 e = (*v)(p->_nsmap, a); if (e) return e;
25863 static int __pyx_tp_clear_4lxml_9objectify_ElementMaker(PyObject *o) {
25864 struct __pyx_obj_4lxml_9objectify_ElementMaker *p = (struct __pyx_obj_4lxml_9objectify_ElementMaker *)o;
25866 tmp = ((PyObject*)p->_makeelement);
25867 p->_makeelement = Py_None; Py_INCREF(Py_None);
25869 tmp = ((PyObject*)p->_namespace);
25870 p->_namespace = Py_None; Py_INCREF(Py_None);
25872 tmp = ((PyObject*)p->_nsmap);
25873 p->_nsmap = Py_None; Py_INCREF(Py_None);
25878 static PyObject *__pyx_tp_getattro_4lxml_9objectify_ElementMaker(PyObject *o, PyObject *n) {
25879 PyObject *v = PyObject_GenericGetAttr(o, n);
25880 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
25882 v = __pyx_pf_4lxml_9objectify_12ElementMaker___getattr__(o, n);
25887 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ElementMaker[] = {
25888 {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_4lxml_9objectify_12ElementMaker___getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
25892 static PyNumberMethods __pyx_tp_as_number_ElementMaker = {
25896 #if PY_MAJOR_VERSION < 3
25899 0, /*nb_remainder*/
25912 #if PY_MAJOR_VERSION < 3
25916 #if PY_MAJOR_VERSION >= 3
25922 #if PY_MAJOR_VERSION < 3
25925 #if PY_MAJOR_VERSION < 3
25928 0, /*nb_inplace_add*/
25929 0, /*nb_inplace_subtract*/
25930 0, /*nb_inplace_multiply*/
25931 #if PY_MAJOR_VERSION < 3
25932 0, /*nb_inplace_divide*/
25934 0, /*nb_inplace_remainder*/
25935 0, /*nb_inplace_power*/
25936 0, /*nb_inplace_lshift*/
25937 0, /*nb_inplace_rshift*/
25938 0, /*nb_inplace_and*/
25939 0, /*nb_inplace_xor*/
25940 0, /*nb_inplace_or*/
25941 0, /*nb_floor_divide*/
25942 0, /*nb_true_divide*/
25943 0, /*nb_inplace_floor_divide*/
25944 0, /*nb_inplace_true_divide*/
25945 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
25950 static PySequenceMethods __pyx_tp_as_sequence_ElementMaker = {
25957 0, /*sq_ass_slice*/
25959 0, /*sq_inplace_concat*/
25960 0, /*sq_inplace_repeat*/
25963 static PyMappingMethods __pyx_tp_as_mapping_ElementMaker = {
25965 0, /*mp_subscript*/
25966 0, /*mp_ass_subscript*/
25969 static PyBufferProcs __pyx_tp_as_buffer_ElementMaker = {
25970 #if PY_MAJOR_VERSION < 3
25971 0, /*bf_getreadbuffer*/
25973 #if PY_MAJOR_VERSION < 3
25974 0, /*bf_getwritebuffer*/
25976 #if PY_MAJOR_VERSION < 3
25977 0, /*bf_getsegcount*/
25979 #if PY_MAJOR_VERSION < 3
25980 0, /*bf_getcharbuffer*/
25982 #if PY_VERSION_HEX >= 0x02060000
25983 0, /*bf_getbuffer*/
25985 #if PY_VERSION_HEX >= 0x02060000
25986 0, /*bf_releasebuffer*/
25990 PyTypeObject __pyx_type_4lxml_9objectify_ElementMaker = {
25991 PyVarObject_HEAD_INIT(0, 0)
25992 __Pyx_NAMESTR("lxml.objectify.ElementMaker"), /*tp_name*/
25993 sizeof(struct __pyx_obj_4lxml_9objectify_ElementMaker), /*tp_basicsize*/
25995 __pyx_tp_dealloc_4lxml_9objectify_ElementMaker, /*tp_dealloc*/
26001 &__pyx_tp_as_number_ElementMaker, /*tp_as_number*/
26002 &__pyx_tp_as_sequence_ElementMaker, /*tp_as_sequence*/
26003 &__pyx_tp_as_mapping_ElementMaker, /*tp_as_mapping*/
26007 __pyx_tp_getattro_4lxml_9objectify_ElementMaker, /*tp_getattro*/
26009 &__pyx_tp_as_buffer_ElementMaker, /*tp_as_buffer*/
26010 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
26011 __Pyx_DOCSTR("ElementMaker(self, namespace=None, nsmap=None, annotate=True, makeelement=None)\n\n An ElementMaker that can be used for constructing trees.\n\n Example::\n\n >>> M = ElementMaker(annotate=False)\n >>> html = M.html( M.body( M.p('hello', M.br, 'objectify') ) )\n\n >>> from lxml.etree import tostring\n >>> print(tostring(html, method='html').decode('ASCII'))\n <html><body><p>hello<br>objectify</p></body></html>\n\n Note that this module has a predefined ElementMaker instance called ``E``.\n "), /*tp_doc*/
26012 __pyx_tp_traverse_4lxml_9objectify_ElementMaker, /*tp_traverse*/
26013 __pyx_tp_clear_4lxml_9objectify_ElementMaker, /*tp_clear*/
26014 0, /*tp_richcompare*/
26015 0, /*tp_weaklistoffset*/
26018 __pyx_methods_4lxml_9objectify_ElementMaker, /*tp_methods*/
26023 0, /*tp_descr_get*/
26024 0, /*tp_descr_set*/
26025 0, /*tp_dictoffset*/
26026 __pyx_pf_4lxml_9objectify_12ElementMaker___init__, /*tp_init*/
26028 __pyx_tp_new_4lxml_9objectify_ElementMaker, /*tp_new*/
26034 0, /*tp_subclasses*/
26038 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
26039 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p;
26040 PyObject *o = __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_new(t, a, k);
26042 p = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o);
26043 p->empty_data_class = Py_None; Py_INCREF(Py_None);
26044 p->tree_class = Py_None; Py_INCREF(Py_None);
26048 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
26049 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
26050 Py_XDECREF(p->empty_data_class);
26051 Py_XDECREF(p->tree_class);
26052 __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_dealloc(o);
26055 static int __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o, visitproc v, void *a) {
26057 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
26058 if (__pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_traverse) {
26059 e = __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_traverse(o, v, a); if (e) return e;
26061 if (p->empty_data_class) {
26062 e = (*v)(p->empty_data_class, a); if (e) return e;
26064 if (p->tree_class) {
26065 e = (*v)(p->tree_class, a); if (e) return e;
26070 static int __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup(PyObject *o) {
26071 struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *p = (struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)o;
26073 if (__pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_clear) {
26074 __pyx_ptype_4lxml_11etreepublic_ElementClassLookup->tp_clear(o);
26076 tmp = ((PyObject*)p->empty_data_class);
26077 p->empty_data_class = Py_None; Py_INCREF(Py_None);
26079 tmp = ((PyObject*)p->tree_class);
26080 p->tree_class = Py_None; Py_INCREF(Py_None);
26085 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup[] = {
26089 static PyNumberMethods __pyx_tp_as_number_ObjectifyElementClassLookup = {
26093 #if PY_MAJOR_VERSION < 3
26096 0, /*nb_remainder*/
26109 #if PY_MAJOR_VERSION < 3
26113 #if PY_MAJOR_VERSION >= 3
26119 #if PY_MAJOR_VERSION < 3
26122 #if PY_MAJOR_VERSION < 3
26125 0, /*nb_inplace_add*/
26126 0, /*nb_inplace_subtract*/
26127 0, /*nb_inplace_multiply*/
26128 #if PY_MAJOR_VERSION < 3
26129 0, /*nb_inplace_divide*/
26131 0, /*nb_inplace_remainder*/
26132 0, /*nb_inplace_power*/
26133 0, /*nb_inplace_lshift*/
26134 0, /*nb_inplace_rshift*/
26135 0, /*nb_inplace_and*/
26136 0, /*nb_inplace_xor*/
26137 0, /*nb_inplace_or*/
26138 0, /*nb_floor_divide*/
26139 0, /*nb_true_divide*/
26140 0, /*nb_inplace_floor_divide*/
26141 0, /*nb_inplace_true_divide*/
26142 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
26147 static PySequenceMethods __pyx_tp_as_sequence_ObjectifyElementClassLookup = {
26154 0, /*sq_ass_slice*/
26156 0, /*sq_inplace_concat*/
26157 0, /*sq_inplace_repeat*/
26160 static PyMappingMethods __pyx_tp_as_mapping_ObjectifyElementClassLookup = {
26162 0, /*mp_subscript*/
26163 0, /*mp_ass_subscript*/
26166 static PyBufferProcs __pyx_tp_as_buffer_ObjectifyElementClassLookup = {
26167 #if PY_MAJOR_VERSION < 3
26168 0, /*bf_getreadbuffer*/
26170 #if PY_MAJOR_VERSION < 3
26171 0, /*bf_getwritebuffer*/
26173 #if PY_MAJOR_VERSION < 3
26174 0, /*bf_getsegcount*/
26176 #if PY_MAJOR_VERSION < 3
26177 0, /*bf_getcharbuffer*/
26179 #if PY_VERSION_HEX >= 0x02060000
26180 0, /*bf_getbuffer*/
26182 #if PY_VERSION_HEX >= 0x02060000
26183 0, /*bf_releasebuffer*/
26187 PyTypeObject __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup = {
26188 PyVarObject_HEAD_INIT(0, 0)
26189 __Pyx_NAMESTR("lxml.objectify.ObjectifyElementClassLookup"), /*tp_name*/
26190 sizeof(struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup), /*tp_basicsize*/
26192 __pyx_tp_dealloc_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_dealloc*/
26198 &__pyx_tp_as_number_ObjectifyElementClassLookup, /*tp_as_number*/
26199 &__pyx_tp_as_sequence_ObjectifyElementClassLookup, /*tp_as_sequence*/
26200 &__pyx_tp_as_mapping_ObjectifyElementClassLookup, /*tp_as_mapping*/
26206 &__pyx_tp_as_buffer_ObjectifyElementClassLookup, /*tp_as_buffer*/
26207 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
26208 __Pyx_DOCSTR("ObjectifyElementClassLookup(self, tree_class=None, empty_data_class=None)\n Element class lookup method that uses the objectify classes.\n "), /*tp_doc*/
26209 __pyx_tp_traverse_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_traverse*/
26210 __pyx_tp_clear_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_clear*/
26211 0, /*tp_richcompare*/
26212 0, /*tp_weaklistoffset*/
26215 __pyx_methods_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_methods*/
26220 0, /*tp_descr_get*/
26221 0, /*tp_descr_set*/
26222 0, /*tp_dictoffset*/
26223 __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__, /*tp_init*/
26225 __pyx_tp_new_4lxml_9objectify_ObjectifyElementClassLookup, /*tp_new*/
26231 0, /*tp_subclasses*/
26235 static PyObject *__pyx_tp_new_4lxml_9objectify_ObjectPath(PyTypeObject *t, PyObject *a, PyObject *k) {
26236 struct __pyx_obj_4lxml_9objectify_ObjectPath *p;
26237 PyObject *o = (*t->tp_alloc)(t, 0);
26239 p = ((struct __pyx_obj_4lxml_9objectify_ObjectPath *)o);
26240 p->find = Py_None; Py_INCREF(Py_None);
26241 p->_path = Py_None; Py_INCREF(Py_None);
26242 p->_path_str = Py_None; Py_INCREF(Py_None);
26246 static void __pyx_tp_dealloc_4lxml_9objectify_ObjectPath(PyObject *o) {
26247 struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
26249 PyObject *etype, *eval, *etb;
26250 PyErr_Fetch(&etype, &eval, &etb);
26252 __pyx_pf_4lxml_9objectify_10ObjectPath___dealloc__(o);
26253 if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
26255 PyErr_Restore(etype, eval, etb);
26257 Py_XDECREF(p->find);
26258 Py_XDECREF(p->_path);
26259 Py_XDECREF(p->_path_str);
26260 (*Py_TYPE(o)->tp_free)(o);
26263 static int __pyx_tp_traverse_4lxml_9objectify_ObjectPath(PyObject *o, visitproc v, void *a) {
26265 struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
26267 e = (*v)(p->find, a); if (e) return e;
26270 e = (*v)(p->_path, a); if (e) return e;
26272 if (p->_path_str) {
26273 e = (*v)(p->_path_str, a); if (e) return e;
26278 static int __pyx_tp_clear_4lxml_9objectify_ObjectPath(PyObject *o) {
26279 struct __pyx_obj_4lxml_9objectify_ObjectPath *p = (struct __pyx_obj_4lxml_9objectify_ObjectPath *)o;
26281 tmp = ((PyObject*)p->find);
26282 p->find = Py_None; Py_INCREF(Py_None);
26284 tmp = ((PyObject*)p->_path);
26285 p->_path = Py_None; Py_INCREF(Py_None);
26287 tmp = ((PyObject*)p->_path_str);
26288 p->_path_str = Py_None; Py_INCREF(Py_None);
26293 static struct PyMethodDef __pyx_methods_4lxml_9objectify_ObjectPath[] = {
26294 {__Pyx_NAMESTR("__str__"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___str__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
26295 {__Pyx_NAMESTR("__call__"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath___call__, METH_VARARGS|METH_KEYWORDS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath___call__)},
26296 {__Pyx_NAMESTR("hasattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_hasattr, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_hasattr)},
26297 {__Pyx_NAMESTR("setattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_setattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_setattr)},
26298 {__Pyx_NAMESTR("addattr"), (PyCFunction)__pyx_pf_4lxml_9objectify_10ObjectPath_addattr, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_10ObjectPath_addattr)},
26302 static struct PyMemberDef __pyx_members_4lxml_9objectify_ObjectPath[] = {
26303 {(char *)"find", T_OBJECT, offsetof(struct __pyx_obj_4lxml_9objectify_ObjectPath, find), READONLY, 0},
26307 static PyNumberMethods __pyx_tp_as_number_ObjectPath = {
26311 #if PY_MAJOR_VERSION < 3
26314 0, /*nb_remainder*/
26327 #if PY_MAJOR_VERSION < 3
26331 #if PY_MAJOR_VERSION >= 3
26337 #if PY_MAJOR_VERSION < 3
26340 #if PY_MAJOR_VERSION < 3
26343 0, /*nb_inplace_add*/
26344 0, /*nb_inplace_subtract*/
26345 0, /*nb_inplace_multiply*/
26346 #if PY_MAJOR_VERSION < 3
26347 0, /*nb_inplace_divide*/
26349 0, /*nb_inplace_remainder*/
26350 0, /*nb_inplace_power*/
26351 0, /*nb_inplace_lshift*/
26352 0, /*nb_inplace_rshift*/
26353 0, /*nb_inplace_and*/
26354 0, /*nb_inplace_xor*/
26355 0, /*nb_inplace_or*/
26356 0, /*nb_floor_divide*/
26357 0, /*nb_true_divide*/
26358 0, /*nb_inplace_floor_divide*/
26359 0, /*nb_inplace_true_divide*/
26360 #if (PY_MAJOR_VERSION >= 3) || (Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX)
26365 static PySequenceMethods __pyx_tp_as_sequence_ObjectPath = {
26372 0, /*sq_ass_slice*/
26374 0, /*sq_inplace_concat*/
26375 0, /*sq_inplace_repeat*/
26378 static PyMappingMethods __pyx_tp_as_mapping_ObjectPath = {
26380 0, /*mp_subscript*/
26381 0, /*mp_ass_subscript*/
26384 static PyBufferProcs __pyx_tp_as_buffer_ObjectPath = {
26385 #if PY_MAJOR_VERSION < 3
26386 0, /*bf_getreadbuffer*/
26388 #if PY_MAJOR_VERSION < 3
26389 0, /*bf_getwritebuffer*/
26391 #if PY_MAJOR_VERSION < 3
26392 0, /*bf_getsegcount*/
26394 #if PY_MAJOR_VERSION < 3
26395 0, /*bf_getcharbuffer*/
26397 #if PY_VERSION_HEX >= 0x02060000
26398 0, /*bf_getbuffer*/
26400 #if PY_VERSION_HEX >= 0x02060000
26401 0, /*bf_releasebuffer*/
26405 PyTypeObject __pyx_type_4lxml_9objectify_ObjectPath = {
26406 PyVarObject_HEAD_INIT(0, 0)
26407 __Pyx_NAMESTR("lxml.objectify.ObjectPath"), /*tp_name*/
26408 sizeof(struct __pyx_obj_4lxml_9objectify_ObjectPath), /*tp_basicsize*/
26410 __pyx_tp_dealloc_4lxml_9objectify_ObjectPath, /*tp_dealloc*/
26416 &__pyx_tp_as_number_ObjectPath, /*tp_as_number*/
26417 &__pyx_tp_as_sequence_ObjectPath, /*tp_as_sequence*/
26418 &__pyx_tp_as_mapping_ObjectPath, /*tp_as_mapping*/
26420 __pyx_pf_4lxml_9objectify_10ObjectPath___call__, /*tp_call*/
26421 __pyx_pf_4lxml_9objectify_10ObjectPath___str__, /*tp_str*/
26424 &__pyx_tp_as_buffer_ObjectPath, /*tp_as_buffer*/
26425 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
26426 __Pyx_DOCSTR("ObjectPath(path)\n Immutable object that represents a compiled object path.\n\n Example for a path: 'root.child[1].{other}child[25]'\n "), /*tp_doc*/
26427 __pyx_tp_traverse_4lxml_9objectify_ObjectPath, /*tp_traverse*/
26428 __pyx_tp_clear_4lxml_9objectify_ObjectPath, /*tp_clear*/
26429 0, /*tp_richcompare*/
26430 0, /*tp_weaklistoffset*/
26433 __pyx_methods_4lxml_9objectify_ObjectPath, /*tp_methods*/
26434 __pyx_members_4lxml_9objectify_ObjectPath, /*tp_members*/
26438 0, /*tp_descr_get*/
26439 0, /*tp_descr_set*/
26440 0, /*tp_dictoffset*/
26441 __pyx_pf_4lxml_9objectify_10ObjectPath___init__, /*tp_init*/
26443 __pyx_tp_new_4lxml_9objectify_ObjectPath, /*tp_new*/
26449 0, /*tp_subclasses*/
26453 static struct PyMethodDef __pyx_methods[] = {
26454 {__Pyx_NAMESTR("set_pytype_attribute_tag"), (PyCFunction)__pyx_pf_4lxml_9objectify_set_pytype_attribute_tag, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_set_pytype_attribute_tag)},
26455 {__Pyx_NAMESTR("__checkBool"), (PyCFunction)__pyx_pf_4lxml_9objectify___checkBool, METH_O, __Pyx_DOCSTR(0)},
26456 {__Pyx_NAMESTR("__parseBool"), (PyCFunction)__pyx_pf_4lxml_9objectify___parseBool, METH_O, __Pyx_DOCSTR(0)},
26457 {__Pyx_NAMESTR("__lower_bool"), (PyCFunction)__pyx_pf_4lxml_9objectify___lower_bool, METH_O, __Pyx_DOCSTR(0)},
26458 {__Pyx_NAMESTR("pytypename"), (PyCFunction)__pyx_pf_4lxml_9objectify_pytypename, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_pytypename)},
26459 {__Pyx_NAMESTR("getRegisteredTypes"), (PyCFunction)__pyx_pf_4lxml_9objectify_getRegisteredTypes, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_getRegisteredTypes)},
26460 {__Pyx_NAMESTR("enable_recursive_str"), (PyCFunction)__pyx_pf_4lxml_9objectify_enable_recursive_str, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_enable_recursive_str)},
26461 {__Pyx_NAMESTR("dump"), (PyCFunction)__pyx_pf_4lxml_9objectify_dump, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_dump)},
26462 {__Pyx_NAMESTR("__unpickleElementTree"), (PyCFunction)__pyx_pf_4lxml_9objectify___unpickleElementTree, METH_O, __Pyx_DOCSTR(0)},
26463 {__Pyx_NAMESTR("pickleReduceElement"), (PyCFunction)__pyx_pf_4lxml_9objectify_pickleReduceElement, METH_O, __Pyx_DOCSTR(0)},
26464 {__Pyx_NAMESTR("pickleReduceElementTree"), (PyCFunction)__pyx_pf_4lxml_9objectify_pickleReduceElementTree, METH_O, __Pyx_DOCSTR(0)},
26465 {__Pyx_NAMESTR("pyannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_pyannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_pyannotate)},
26466 {__Pyx_NAMESTR("xsiannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_xsiannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_xsiannotate)},
26467 {__Pyx_NAMESTR("annotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_annotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_annotate)},
26468 {__Pyx_NAMESTR("deannotate"), (PyCFunction)__pyx_pf_4lxml_9objectify_deannotate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_deannotate)},
26469 {__Pyx_NAMESTR("set_default_parser"), (PyCFunction)__pyx_pf_4lxml_9objectify_set_default_parser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_set_default_parser)},
26470 {__Pyx_NAMESTR("makeparser"), (PyCFunction)__pyx_pf_4lxml_9objectify_makeparser, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_makeparser)},
26471 {__Pyx_NAMESTR("fromstring"), (PyCFunction)__pyx_pf_4lxml_9objectify_fromstring, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_fromstring)},
26472 {__Pyx_NAMESTR("XML"), (PyCFunction)__pyx_pf_4lxml_9objectify_XML, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_XML)},
26473 {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pf_4lxml_9objectify_parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_parse)},
26474 {__Pyx_NAMESTR("Element"), (PyCFunction)__pyx_pf_4lxml_9objectify_Element, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_Element)},
26475 {__Pyx_NAMESTR("DataElement"), (PyCFunction)__pyx_pf_4lxml_9objectify_DataElement, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_9objectify_DataElement)},
26479 static void __pyx_init_filenames(void); /*proto*/
26481 #if PY_MAJOR_VERSION >= 3
26482 static struct PyModuleDef __pyx_moduledef = {
26483 PyModuleDef_HEAD_INIT,
26484 __Pyx_NAMESTR("objectify"),
26485 __Pyx_DOCSTR(__pyx_k_57), /* m_doc */
26487 __pyx_methods /* m_methods */,
26488 NULL, /* m_reload */
26489 NULL, /* m_traverse */
26490 NULL, /* m_clear */
26495 static __Pyx_StringTabEntry __pyx_string_tab[] = {
26496 {&__pyx_kp_u_0, __pyx_k_0, sizeof(__pyx_k_0), 1, 0, 0},
26497 {&__pyx_kp_u_1, __pyx_k_1, sizeof(__pyx_k_1), 1, 0, 0},
26498 {&__pyx_kp_u_10, __pyx_k_10, sizeof(__pyx_k_10), 1, 0, 0},
26499 {&__pyx_kp_u_11, __pyx_k_11, sizeof(__pyx_k_11), 1, 0, 0},
26500 {&__pyx_kp_u_12, __pyx_k_12, sizeof(__pyx_k_12), 1, 0, 0},
26501 {&__pyx_kp_u_13, __pyx_k_13, sizeof(__pyx_k_13), 1, 0, 0},
26502 {&__pyx_kp_u_14, __pyx_k_14, sizeof(__pyx_k_14), 1, 0, 0},
26503 {&__pyx_kp_u_15, __pyx_k_15, sizeof(__pyx_k_15), 1, 0, 0},
26504 {&__pyx_kp_u_16, __pyx_k_16, sizeof(__pyx_k_16), 1, 0, 0},
26505 {&__pyx_kp_u_17, __pyx_k_17, sizeof(__pyx_k_17), 1, 0, 0},
26506 {&__pyx_kp_u_18, __pyx_k_18, sizeof(__pyx_k_18), 1, 0, 0},
26507 {&__pyx_kp_u_19, __pyx_k_19, sizeof(__pyx_k_19), 1, 0, 0},
26508 {&__pyx_kp_u_20, __pyx_k_20, sizeof(__pyx_k_20), 1, 0, 0},
26509 {&__pyx_kp_u_21, __pyx_k_21, sizeof(__pyx_k_21), 1, 0, 0},
26510 {&__pyx_kp_u_23, __pyx_k_23, sizeof(__pyx_k_23), 1, 0, 0},
26511 {&__pyx_kp_u_24, __pyx_k_24, sizeof(__pyx_k_24), 1, 0, 0},
26512 {&__pyx_kp_u_26, __pyx_k_26, sizeof(__pyx_k_26), 1, 0, 0},
26513 {&__pyx_kp_u_27, __pyx_k_27, sizeof(__pyx_k_27), 1, 0, 0},
26514 {&__pyx_kp_u_28, __pyx_k_28, sizeof(__pyx_k_28), 1, 0, 0},
26515 {&__pyx_kp_u_29, __pyx_k_29, sizeof(__pyx_k_29), 1, 0, 0},
26516 {&__pyx_n_ui_3, __pyx_k_3, sizeof(__pyx_k_3), 1, 1, 1},
26517 {&__pyx_kp_u_30, __pyx_k_30, sizeof(__pyx_k_30), 1, 0, 0},
26518 {&__pyx_n_ui_31, __pyx_k_31, sizeof(__pyx_k_31), 1, 1, 1},
26519 {&__pyx_kp_b_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 0},
26520 {&__pyx_kp_u_32, __pyx_k_32, sizeof(__pyx_k_32), 1, 0, 0},
26521 {&__pyx_kp_u_4, __pyx_k_4, sizeof(__pyx_k_4), 1, 0, 0},
26522 {&__pyx_kp_u_42, __pyx_k_42, sizeof(__pyx_k_42), 1, 0, 0},
26523 {&__pyx_n_ui_43, __pyx_k_43, sizeof(__pyx_k_43), 1, 1, 1},
26524 {&__pyx_kp_u_44, __pyx_k_44, sizeof(__pyx_k_44), 1, 0, 0},
26525 {&__pyx_kp_u_45, __pyx_k_45, sizeof(__pyx_k_45), 1, 0, 0},
26526 {&__pyx_kp_u_46, __pyx_k_46, sizeof(__pyx_k_46), 1, 0, 0},
26527 {&__pyx_kp_u_47, __pyx_k_47, sizeof(__pyx_k_47), 1, 0, 0},
26528 {&__pyx_kp_u_48, __pyx_k_48, sizeof(__pyx_k_48), 1, 0, 0},
26529 {&__pyx_kp_u_49, __pyx_k_49, sizeof(__pyx_k_49), 1, 0, 0},
26530 {&__pyx_kp_u_5, __pyx_k_5, sizeof(__pyx_k_5), 1, 0, 0},
26531 {&__pyx_kp_u_50, __pyx_k_50, sizeof(__pyx_k_50), 1, 0, 0},
26532 {&__pyx_kp_u_51, __pyx_k_51, sizeof(__pyx_k_51), 1, 0, 0},
26533 {&__pyx_kp_u_52, __pyx_k_52, sizeof(__pyx_k_52), 1, 0, 0},
26534 {&__pyx_kp_u_53, __pyx_k_53, sizeof(__pyx_k_53), 1, 0, 0},
26535 {&__pyx_kp_u_54, __pyx_k_54, sizeof(__pyx_k_54), 1, 0, 0},
26536 {&__pyx_n_u_58, __pyx_k_58, sizeof(__pyx_k_58), 1, 1, 0},
26537 {&__pyx_n_u_59, __pyx_k_59, sizeof(__pyx_k_59), 1, 1, 0},
26538 {&__pyx_kp_u_6, __pyx_k_6, sizeof(__pyx_k_6), 1, 0, 0},
26539 {&__pyx_n_u_60, __pyx_k_60, sizeof(__pyx_k_60), 1, 1, 0},
26540 {&__pyx_n_u_61, __pyx_k_61, sizeof(__pyx_k_61), 1, 1, 0},
26541 {&__pyx_n_ui_61, __pyx_k_61, sizeof(__pyx_k_61), 1, 1, 1},
26542 {&__pyx_kp_u_62, __pyx_k_62, sizeof(__pyx_k_62), 1, 0, 0},
26543 {&__pyx_kp_u_63, __pyx_k_63, sizeof(__pyx_k_63), 1, 0, 0},
26544 {&__pyx_kp_u_64, __pyx_k_64, sizeof(__pyx_k_64), 1, 0, 0},
26545 {&__pyx_kp_u_65, __pyx_k_65, sizeof(__pyx_k_65), 1, 0, 0},
26546 {&__pyx_kp_u_66, __pyx_k_66, sizeof(__pyx_k_66), 1, 0, 0},
26547 {&__pyx_n_ui_67, __pyx_k_67, sizeof(__pyx_k_67), 1, 1, 1},
26548 {&__pyx_kp_u_68, __pyx_k_68, sizeof(__pyx_k_68), 1, 0, 0},
26549 {&__pyx_kp_u_7, __pyx_k_7, sizeof(__pyx_k_7), 1, 0, 0},
26550 {&__pyx_kp_u_8, __pyx_k_8, sizeof(__pyx_k_8), 1, 0, 0},
26551 {&__pyx_kp_u_9, __pyx_k_9, sizeof(__pyx_k_9), 1, 0, 0},
26552 {&__pyx_n_ui_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 1, 1, 1},
26553 {&__pyx_n_u_BoolElement, __pyx_k_BoolElement, sizeof(__pyx_k_BoolElement), 1, 1, 0},
26554 {&__pyx_n_u_DataElement, __pyx_k_DataElement, sizeof(__pyx_k_DataElement), 1, 1, 0},
26555 {&__pyx_n_u_E, __pyx_k_E, sizeof(__pyx_k_E), 1, 1, 0},
26556 {&__pyx_n_ui_E, __pyx_k_E, sizeof(__pyx_k_E), 1, 1, 1},
26557 {&__pyx_n_u_ENTITY, __pyx_k_ENTITY, sizeof(__pyx_k_ENTITY), 1, 1, 0},
26558 {&__pyx_n_ui_ETXPath, __pyx_k_ETXPath, sizeof(__pyx_k_ETXPath), 1, 1, 1},
26559 {&__pyx_n_u_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 1, 1, 0},
26560 {&__pyx_n_u_ElementMaker, __pyx_k_ElementMaker, sizeof(__pyx_k_ElementMaker), 1, 1, 0},
26561 {&__pyx_n_ui_ElementTree, __pyx_k_ElementTree, sizeof(__pyx_k_ElementTree), 1, 1, 1},
26562 {&__pyx_n_u_FloatElement, __pyx_k_FloatElement, sizeof(__pyx_k_FloatElement), 1, 1, 0},
26563 {&__pyx_n_u_ID, __pyx_k_ID, sizeof(__pyx_k_ID), 1, 1, 0},
26564 {&__pyx_n_u_IDREF, __pyx_k_IDREF, sizeof(__pyx_k_IDREF), 1, 1, 0},
26565 {&__pyx_n_ui_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 1, 1, 1},
26566 {&__pyx_n_u_IntElement, __pyx_k_IntElement, sizeof(__pyx_k_IntElement), 1, 1, 0},
26567 {&__pyx_n_u_LongElement, __pyx_k_LongElement, sizeof(__pyx_k_LongElement), 1, 1, 0},
26568 {&__pyx_n_u_NCName, __pyx_k_NCName, sizeof(__pyx_k_NCName), 1, 1, 0},
26569 {&__pyx_n_u_NMTOKEN, __pyx_k_NMTOKEN, sizeof(__pyx_k_NMTOKEN), 1, 1, 0},
26570 {&__pyx_n_u_Name, __pyx_k_Name, sizeof(__pyx_k_Name), 1, 1, 0},
26571 {&__pyx_n_u_None, __pyx_k_None, sizeof(__pyx_k_None), 1, 1, 0},
26572 {&__pyx_n_u_NoneElement, __pyx_k_NoneElement, sizeof(__pyx_k_NoneElement), 1, 1, 0},
26573 {&__pyx_n_u_NoneType, __pyx_k_NoneType, sizeof(__pyx_k_NoneType), 1, 1, 0},
26574 {&__pyx_n_u_NumberElement, __pyx_k_NumberElement, sizeof(__pyx_k_NumberElement), 1, 1, 0},
26575 {&__pyx_n_u_ObjectPath, __pyx_k_ObjectPath, sizeof(__pyx_k_ObjectPath), 1, 1, 0},
26576 {&__pyx_n_u_ObjectifiedElement, __pyx_k_ObjectifiedElement, sizeof(__pyx_k_ObjectifiedElement), 1, 1, 0},
26577 {&__pyx_n_u_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 1, 1, 0},
26578 {&__pyx_n_ui_PYTYPE_ATTRIBUTE, __pyx_k_PYTYPE_ATTRIBUTE, sizeof(__pyx_k_PYTYPE_ATTRIBUTE), 1, 1, 1},
26579 {&__pyx_n_u_PyType, __pyx_k_PyType, sizeof(__pyx_k_PyType), 1, 1, 0},
26580 {&__pyx_n_u_StringElement, __pyx_k_StringElement, sizeof(__pyx_k_StringElement), 1, 1, 0},
26581 {&__pyx_n_u_TREE, __pyx_k_TREE, sizeof(__pyx_k_TREE), 1, 1, 0},
26582 {&__pyx_n_ui_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 1, 1, 1},
26583 {&__pyx_n_ui_U, __pyx_k_U, sizeof(__pyx_k_U), 1, 1, 1},
26584 {&__pyx_n_ui_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 1, 1, 1},
26585 {&__pyx_n_u_XML, __pyx_k_XML, sizeof(__pyx_k_XML), 1, 1, 0},
26586 {&__pyx_n_ui_XMLParser, __pyx_k_XMLParser, sizeof(__pyx_k_XMLParser), 1, 1, 1},
26587 {&__pyx_n_ui__ElementTree, __pyx_k__ElementTree, sizeof(__pyx_k__ElementTree), 1, 1, 1},
26588 {&__pyx_n_ui___all__, __pyx_k___all__, sizeof(__pyx_k___all__), 1, 1, 1},
26589 {&__pyx_n_ui___call__, __pyx_k___call__, sizeof(__pyx_k___call__), 1, 1, 1},
26590 {&__pyx_n_ui___checkBool, __pyx_k___checkBool, sizeof(__pyx_k___checkBool), 1, 1, 1},
26591 {&__pyx_n_ui___copy__, __pyx_k___copy__, sizeof(__pyx_k___copy__), 1, 1, 1},
26592 {&__pyx_n_ui___getattr__, __pyx_k___getattr__, sizeof(__pyx_k___getattr__), 1, 1, 1},
26593 {&__pyx_n_ui___getitem__, __pyx_k___getitem__, sizeof(__pyx_k___getitem__), 1, 1, 1},
26594 {&__pyx_n_ui___lower_bool, __pyx_k___lower_bool, sizeof(__pyx_k___lower_bool), 1, 1, 1},
26595 {&__pyx_n_ui___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
26596 {&__pyx_n_ui___name__, __pyx_k___name__, sizeof(__pyx_k___name__), 1, 1, 1},
26597 {&__pyx_n_ui___parseBool, __pyx_k___parseBool, sizeof(__pyx_k___parseBool), 1, 1, 1},
26598 {&__pyx_n_ui___set__, __pyx_k___set__, sizeof(__pyx_k___set__), 1, 1, 1},
26599 {&__pyx_n_ui___version__, __pyx_k___version__, sizeof(__pyx_k___version__), 1, 1, 1},
26600 {&__pyx_n_ui__annotate, __pyx_k__annotate, sizeof(__pyx_k__annotate), 1, 1, 1},
26601 {&__pyx_n_ui__c_node, __pyx_k__c_node, sizeof(__pyx_k__c_node), 1, 1, 1},
26602 {&__pyx_n_ui__c_path, __pyx_k__c_path, sizeof(__pyx_k__c_path), 1, 1, 1},
26603 {&__pyx_n_ui__doc, __pyx_k__doc, sizeof(__pyx_k__doc), 1, 1, 1},
26604 {&__pyx_n_ui__element_factory, __pyx_k__element_factory, sizeof(__pyx_k__element_factory), 1, 1, 1},
26605 {&__pyx_n_ui__lookup_function, __pyx_k__lookup_function, sizeof(__pyx_k__lookup_function), 1, 1, 1},
26606 {&__pyx_n_ui__makeelement, __pyx_k__makeelement, sizeof(__pyx_k__makeelement), 1, 1, 1},
26607 {&__pyx_n_ui__namespace, __pyx_k__namespace, sizeof(__pyx_k__namespace), 1, 1, 1},
26608 {&__pyx_n_ui__nsmap, __pyx_k__nsmap, sizeof(__pyx_k__nsmap), 1, 1, 1},
26609 {&__pyx_n_ui__parse_value, __pyx_k__parse_value, sizeof(__pyx_k__parse_value), 1, 1, 1},
26610 {&__pyx_n_ui__path, __pyx_k__path, sizeof(__pyx_k__path), 1, 1, 1},
26611 {&__pyx_n_ui__path_len, __pyx_k__path_len, sizeof(__pyx_k__path_len), 1, 1, 1},
26612 {&__pyx_n_ui__path_str, __pyx_k__path_str, sizeof(__pyx_k__path_str), 1, 1, 1},
26613 {&__pyx_n_ui__pytype, __pyx_k__pytype, sizeof(__pyx_k__pytype), 1, 1, 1},
26614 {&__pyx_n_ui__schema_types, __pyx_k__schema_types, sizeof(__pyx_k__schema_types), 1, 1, 1},
26615 {&__pyx_n_ui__tag, __pyx_k__tag, sizeof(__pyx_k__tag), 1, 1, 1},
26616 {&__pyx_n_ui__type, __pyx_k__type, sizeof(__pyx_k__type), 1, 1, 1},
26617 {&__pyx_n_ui__value, __pyx_k__value, sizeof(__pyx_k__value), 1, 1, 1},
26618 {&__pyx_n_ui__xsi, __pyx_k__xsi, sizeof(__pyx_k__xsi), 1, 1, 1},
26619 {&__pyx_n_ui_add, __pyx_k_add, sizeof(__pyx_k_add), 1, 1, 1},
26620 {&__pyx_n_ui_addnext, __pyx_k_addnext, sizeof(__pyx_k_addnext), 1, 1, 1},
26621 {&__pyx_n_ui_after, __pyx_k_after, sizeof(__pyx_k_after), 1, 1, 1},
26622 {&__pyx_n_u_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 1, 1, 0},
26623 {&__pyx_n_ui_annotate, __pyx_k_annotate, sizeof(__pyx_k_annotate), 1, 1, 1},
26624 {&__pyx_n_ui_annotate_pytype, __pyx_k_annotate_pytype, sizeof(__pyx_k_annotate_pytype), 1, 1, 1},
26625 {&__pyx_n_ui_annotate_xsi, __pyx_k_annotate_xsi, sizeof(__pyx_k_annotate_xsi), 1, 1, 1},
26626 {&__pyx_n_ui_attrib, __pyx_k_attrib, sizeof(__pyx_k_attrib), 1, 1, 1},
26627 {&__pyx_n_ui_attribute_tag, __pyx_k_attribute_tag, sizeof(__pyx_k_attribute_tag), 1, 1, 1},
26628 {&__pyx_n_u_base, __pyx_k_base, sizeof(__pyx_k_base), 1, 1, 0},
26629 {&__pyx_n_ui_base, __pyx_k_base, sizeof(__pyx_k_base), 1, 1, 1},
26630 {&__pyx_n_ui_base_url, __pyx_k_base_url, sizeof(__pyx_k_base_url), 1, 1, 1},
26631 {&__pyx_n_ui_before, __pyx_k_before, sizeof(__pyx_k_before), 1, 1, 1},
26632 {&__pyx_n_u_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 1, 1, 0},
26633 {&__pyx_n_u_boolean, __pyx_k_boolean, sizeof(__pyx_k_boolean), 1, 1, 0},
26634 {&__pyx_n_u_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 1, 1, 0},
26635 {&__pyx_n_ui_children, __pyx_k_children, sizeof(__pyx_k_children), 1, 1, 1},
26636 {&__pyx_n_ui_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 1, 1, 1},
26637 {&__pyx_n_ui_constructor, __pyx_k_constructor, sizeof(__pyx_k_constructor), 1, 1, 1},
26638 {&__pyx_n_ui_copy_reg, __pyx_k_copy_reg, sizeof(__pyx_k_copy_reg), 1, 1, 1},
26639 {&__pyx_n_ui_copyreg, __pyx_k_copyreg, sizeof(__pyx_k_copyreg), 1, 1, 1},
26640 {&__pyx_n_u_deannotate, __pyx_k_deannotate, sizeof(__pyx_k_deannotate), 1, 1, 0},
26641 {&__pyx_n_ui_default, __pyx_k_default, sizeof(__pyx_k_default), 1, 1, 1},
26642 {&__pyx_n_ui_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 1, 1, 1},
26643 {&__pyx_n_ui_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 1, 1, 1},
26644 {&__pyx_n_u_double, __pyx_k_double, sizeof(__pyx_k_double), 1, 1, 0},
26645 {&__pyx_n_u_dump, __pyx_k_dump, sizeof(__pyx_k_dump), 1, 1, 0},
26646 {&__pyx_n_ui_element_or_tree, __pyx_k_element_or_tree, sizeof(__pyx_k_element_or_tree), 1, 1, 1},
26647 {&__pyx_n_ui_empty_data_class, __pyx_k_empty_data_class, sizeof(__pyx_k_empty_data_class), 1, 1, 1},
26648 {&__pyx_n_ui_empty_pytype, __pyx_k_empty_pytype, sizeof(__pyx_k_empty_pytype), 1, 1, 1},
26649 {&__pyx_n_ui_empty_type, __pyx_k_empty_type, sizeof(__pyx_k_empty_type), 1, 1, 1},
26650 {&__pyx_n_ui_end, __pyx_k_end, sizeof(__pyx_k_end), 1, 1, 1},
26651 {&__pyx_n_ui_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 1, 1, 1},
26652 {&__pyx_n_bi_etree, __pyx_k_etree, sizeof(__pyx_k_etree), 0, 1, 1},
26653 {&__pyx_n_ui_etree, __pyx_k_etree, sizeof(__pyx_k_etree), 1, 1, 1},
26654 {&__pyx_n_ui_f, __pyx_k_f, sizeof(__pyx_k_f), 1, 1, 1},
26655 {&__pyx_n_u_false, __pyx_k_false, sizeof(__pyx_k_false), 1, 1, 0},
26656 {&__pyx_n_ui_find, __pyx_k_find, sizeof(__pyx_k_find), 1, 1, 1},
26657 {&__pyx_n_ui_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 1, 1, 1},
26658 {&__pyx_n_u_float, __pyx_k_float, sizeof(__pyx_k_float), 1, 1, 0},
26659 {&__pyx_n_u_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 1, 1, 0},
26660 {&__pyx_n_ui_fromstring, __pyx_k_fromstring, sizeof(__pyx_k_fromstring), 1, 1, 1},
26661 {&__pyx_n_ui_get, __pyx_k_get, sizeof(__pyx_k_get), 1, 1, 1},
26662 {&__pyx_n_u_getRegisteredTypes, __pyx_k_getRegisteredTypes, sizeof(__pyx_k_getRegisteredTypes), 1, 1, 0},
26663 {&__pyx_n_ui_getparent, __pyx_k_getparent, sizeof(__pyx_k_getparent), 1, 1, 1},
26664 {&__pyx_n_ui_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 1, 1, 1},
26665 {&__pyx_n_ui_hex, __pyx_k_hex, sizeof(__pyx_k_hex), 1, 1, 1},
26666 {&__pyx_n_ui_href, __pyx_k_href, sizeof(__pyx_k_href), 1, 1, 1},
26667 {&__pyx_n_ui_ignore_old, __pyx_k_ignore_old, sizeof(__pyx_k_ignore_old), 1, 1, 1},
26668 {&__pyx_n_ui_ignore_pytype, __pyx_k_ignore_pytype, sizeof(__pyx_k_ignore_pytype), 1, 1, 1},
26669 {&__pyx_n_ui_ignore_xsi, __pyx_k_ignore_xsi, sizeof(__pyx_k_ignore_xsi), 1, 1, 1},
26670 {&__pyx_n_ui_index, __pyx_k_index, sizeof(__pyx_k_index), 1, 1, 1},
26671 {&__pyx_n_ui_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 1, 1, 1},
26672 {&__pyx_n_u_int, __pyx_k_int, sizeof(__pyx_k_int), 1, 1, 0},
26673 {&__pyx_n_u_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 1, 1, 0},
26674 {&__pyx_n_bi_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 0, 1, 1},
26675 {&__pyx_n_ui_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 1, 1, 1},
26676 {&__pyx_n_ui_items, __pyx_k_items, sizeof(__pyx_k_items), 1, 1, 1},
26677 {&__pyx_n_ui_iterchildren, __pyx_k_iterchildren, sizeof(__pyx_k_iterchildren), 1, 1, 1},
26678 {&__pyx_n_ui_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 1, 1, 1},
26679 {&__pyx_n_ui_join, __pyx_k_join, sizeof(__pyx_k_join), 1, 1, 1},
26680 {&__pyx_n_u_language, __pyx_k_language, sizeof(__pyx_k_language), 1, 1, 0},
26681 {&__pyx_n_ui_last, __pyx_k_last, sizeof(__pyx_k_last), 1, 1, 1},
26682 {&__pyx_n_u_long, __pyx_k_long, sizeof(__pyx_k_long), 1, 1, 0},
26683 {&__pyx_n_ui_lxml, __pyx_k_lxml, sizeof(__pyx_k_lxml), 1, 1, 1},
26684 {&__pyx_n_ui_makeelement, __pyx_k_makeelement, sizeof(__pyx_k_makeelement), 1, 1, 1},
26685 {&__pyx_n_u_makeparser, __pyx_k_makeparser, sizeof(__pyx_k_makeparser), 1, 1, 0},
26686 {&__pyx_n_ui_map, __pyx_k_map, sizeof(__pyx_k_map), 1, 1, 1},
26687 {&__pyx_n_ui_match, __pyx_k_match, sizeof(__pyx_k_match), 1, 1, 1},
26688 {&__pyx_n_ui_name, __pyx_k_name, sizeof(__pyx_k_name), 1, 1, 1},
26689 {&__pyx_n_ui_namespace, __pyx_k_namespace, sizeof(__pyx_k_namespace), 1, 1, 1},
26690 {&__pyx_n_u_negativeInteger, __pyx_k_negativeInteger, sizeof(__pyx_k_negativeInteger), 1, 1, 0},
26691 {&__pyx_n_ui_new_parser, __pyx_k_new_parser, sizeof(__pyx_k_new_parser), 1, 1, 1},
26692 {&__pyx_n_ui_next, __pyx_k_next, sizeof(__pyx_k_next), 1, 1, 1},
26693 {&__pyx_n_u_nonNegativeInteger, __pyx_k_nonNegativeInteger, sizeof(__pyx_k_nonNegativeInteger), 1, 1, 0},
26694 {&__pyx_n_u_nonPositiveInteger, __pyx_k_nonPositiveInteger, sizeof(__pyx_k_nonPositiveInteger), 1, 1, 0},
26695 {&__pyx_n_u_none, __pyx_k_none, sizeof(__pyx_k_none), 1, 1, 0},
26696 {&__pyx_n_u_normalizedString, __pyx_k_normalizedString, sizeof(__pyx_k_normalizedString), 1, 1, 0},
26697 {&__pyx_n_ui_nsmap, __pyx_k_nsmap, sizeof(__pyx_k_nsmap), 1, 1, 1},
26698 {&__pyx_n_ui_object, __pyx_k_object, sizeof(__pyx_k_object), 1, 1, 1},
26699 {&__pyx_n_ui_oct, __pyx_k_oct, sizeof(__pyx_k_oct), 1, 1, 1},
26700 {&__pyx_n_ui_on, __pyx_k_on, sizeof(__pyx_k_on), 1, 1, 1},
26701 {&__pyx_n_ui_parent, __pyx_k_parent, sizeof(__pyx_k_parent), 1, 1, 1},
26702 {&__pyx_n_u_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 1, 1, 0},
26703 {&__pyx_n_ui_parse, __pyx_k_parse, sizeof(__pyx_k_parse), 1, 1, 1},
26704 {&__pyx_n_ui_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 1, 1, 1},
26705 {&__pyx_n_ui_path, __pyx_k_path, sizeof(__pyx_k_path), 1, 1, 1},
26706 {&__pyx_n_ui_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 1, 1, 1},
26707 {&__pyx_n_ui_pickleReduceElement, __pyx_k_pickleReduceElement, sizeof(__pyx_k_pickleReduceElement), 1, 1, 1},
26708 {&__pyx_n_u_positiveInteger, __pyx_k_positiveInteger, sizeof(__pyx_k_positiveInteger), 1, 1, 0},
26709 {&__pyx_n_ui_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 1, 1, 1},
26710 {&__pyx_n_ui_prev, __pyx_k_prev, sizeof(__pyx_k_prev), 1, 1, 1},
26711 {&__pyx_n_u_py, __pyx_k_py, sizeof(__pyx_k_py), 1, 1, 0},
26712 {&__pyx_n_u_pyannotate, __pyx_k_pyannotate, sizeof(__pyx_k_pyannotate), 1, 1, 0},
26713 {&__pyx_n_u_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 1, 1, 0},
26714 {&__pyx_n_ui_pytype, __pyx_k_pytype, sizeof(__pyx_k_pytype), 1, 1, 1},
26715 {&__pyx_n_u_pytypename, __pyx_k_pytypename, sizeof(__pyx_k_pytypename), 1, 1, 0},
26716 {&__pyx_n_u_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 1, 1, 0},
26717 {&__pyx_n_ui_pyval, __pyx_k_pyval, sizeof(__pyx_k_pyval), 1, 1, 1},
26718 {&__pyx_n_ui_re, __pyx_k_re, sizeof(__pyx_k_re), 1, 1, 1},
26719 {&__pyx_n_ui_register, __pyx_k_register, sizeof(__pyx_k_register), 1, 1, 1},
26720 {&__pyx_n_ui_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 1, 1, 1},
26721 {&__pyx_n_b_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 0, 1, 0},
26722 {&__pyx_n_u_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 1, 1, 0},
26723 {&__pyx_n_ui_remove_blank_text, __pyx_k_remove_blank_text, sizeof(__pyx_k_remove_blank_text), 1, 1, 1},
26724 {&__pyx_n_ui_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 1, 1, 1},
26725 {&__pyx_n_ui_root, __pyx_k_root, sizeof(__pyx_k_root), 1, 1, 1},
26726 {&__pyx_n_u_set_default_parser, __pyx_k_set_default_parser, sizeof(__pyx_k_set_default_parser), 1, 1, 0},
26727 {&__pyx_n_u_short, __pyx_k_short, sizeof(__pyx_k_short), 1, 1, 0},
26728 {&__pyx_n_ui_split, __pyx_k_split, sizeof(__pyx_k_split), 1, 1, 1},
26729 {&__pyx_n_ui_start, __pyx_k_start, sizeof(__pyx_k_start), 1, 1, 1},
26730 {&__pyx_n_ui_step, __pyx_k_step, sizeof(__pyx_k_step), 1, 1, 1},
26731 {&__pyx_n_u_str, __pyx_k_str, sizeof(__pyx_k_str), 1, 1, 0},
26732 {&__pyx_n_u_string, __pyx_k_string, sizeof(__pyx_k_string), 1, 1, 0},
26733 {&__pyx_n_ui_stringify, __pyx_k_stringify, sizeof(__pyx_k_stringify), 1, 1, 1},
26734 {&__pyx_n_ui_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 1, 1, 1},
26735 {&__pyx_n_ui_strip_attributes, __pyx_k_strip_attributes, sizeof(__pyx_k_strip_attributes), 1, 1, 1},
26736 {&__pyx_n_u_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 1, 1, 0},
26737 {&__pyx_n_ui_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 1, 1, 1},
26738 {&__pyx_n_u_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 1, 1, 0},
26739 {&__pyx_n_u_text, __pyx_k_text, sizeof(__pyx_k_text), 1, 1, 0},
26740 {&__pyx_n_ui_text, __pyx_k_text, sizeof(__pyx_k_text), 1, 1, 1},
26741 {&__pyx_n_u_token, __pyx_k_token, sizeof(__pyx_k_token), 1, 1, 0},
26742 {&__pyx_n_ui_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 1, 1, 1},
26743 {&__pyx_n_ui_tree_class, __pyx_k_tree_class, sizeof(__pyx_k_tree_class), 1, 1, 1},
26744 {&__pyx_n_u_true, __pyx_k_true, sizeof(__pyx_k_true), 1, 1, 0},
26745 {&__pyx_n_ui_type, __pyx_k_type, sizeof(__pyx_k_type), 1, 1, 1},
26746 {&__pyx_n_ui_type_check, __pyx_k_type_check, sizeof(__pyx_k_type_check), 1, 1, 1},
26747 {&__pyx_n_ui_type_class, __pyx_k_type_class, sizeof(__pyx_k_type_class), 1, 1, 1},
26748 {&__pyx_n_u_unsignedByte, __pyx_k_unsignedByte, sizeof(__pyx_k_unsignedByte), 1, 1, 0},
26749 {&__pyx_n_u_unsignedInt, __pyx_k_unsignedInt, sizeof(__pyx_k_unsignedInt), 1, 1, 0},
26750 {&__pyx_n_u_unsignedLong, __pyx_k_unsignedLong, sizeof(__pyx_k_unsignedLong), 1, 1, 0},
26751 {&__pyx_n_u_unsignedShort, __pyx_k_unsignedShort, sizeof(__pyx_k_unsignedShort), 1, 1, 0},
26752 {&__pyx_n_ui_update, __pyx_k_update, sizeof(__pyx_k_update), 1, 1, 1},
26753 {&__pyx_n_u_value, __pyx_k_value, sizeof(__pyx_k_value), 1, 1, 0},
26754 {&__pyx_n_ui_value, __pyx_k_value, sizeof(__pyx_k_value), 1, 1, 1},
26755 {&__pyx_n_ui_values, __pyx_k_values, sizeof(__pyx_k_values), 1, 1, 1},
26756 {&__pyx_n_ui_xml, __pyx_k_xml, sizeof(__pyx_k_xml), 1, 1, 1},
26757 {&__pyx_n_ui_xmlSchemaTypes, __pyx_k_xmlSchemaTypes, sizeof(__pyx_k_xmlSchemaTypes), 1, 1, 1},
26758 {&__pyx_n_u_xsd, __pyx_k_xsd, sizeof(__pyx_k_xsd), 1, 1, 0},
26759 {&__pyx_n_u_xsi, __pyx_k_xsi, sizeof(__pyx_k_xsi), 1, 1, 0},
26760 {&__pyx_n_ui_xsi, __pyx_k_xsi, sizeof(__pyx_k_xsi), 1, 1, 1},
26761 {&__pyx_n_ui_xsi_nil, __pyx_k_xsi_nil, sizeof(__pyx_k_xsi_nil), 1, 1, 1},
26762 {&__pyx_n_u_xsiannotate, __pyx_k_xsiannotate, sizeof(__pyx_k_xsiannotate), 1, 1, 0},
26765 static int __Pyx_InitCachedBuiltins(void) {
26766 __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_ui_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26767 __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_ui_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26768 __pyx_builtin_object = __Pyx_GetName(__pyx_b, __pyx_n_ui_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26769 __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_ui_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26770 __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_ui_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26771 __pyx_builtin_oct = __Pyx_GetName(__pyx_b, __pyx_n_ui_oct); if (!__pyx_builtin_oct) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26772 __pyx_builtin_hex = __Pyx_GetName(__pyx_b, __pyx_n_ui_hex); if (!__pyx_builtin_hex) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26773 __pyx_builtin_enumerate = __Pyx_GetName(__pyx_b, __pyx_n_ui_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26774 __pyx_builtin_map = __Pyx_GetName(__pyx_b, __pyx_n_ui_map); if (!__pyx_builtin_map) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26780 static int __Pyx_InitGlobals(void) {
26781 #if PY_VERSION_HEX < 0x02040000
26782 if (unlikely(__Pyx_Py23SetsImport() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26784 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26785 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26786 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26787 __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26793 #if PY_MAJOR_VERSION < 3
26794 PyMODINIT_FUNC initobjectify(void); /*proto*/
26795 PyMODINIT_FUNC initobjectify(void)
26797 PyMODINIT_FUNC PyInit_objectify(void); /*proto*/
26798 PyMODINIT_FUNC PyInit_objectify(void)
26801 PyObject *__pyx_t_1 = NULL;
26802 PyObject *__pyx_t_2 = NULL;
26804 PyObject *__pyx_t_4 = NULL;
26805 PyObject *__pyx_t_5 = NULL;
26806 __pyx_init_filenames();
26807 #ifdef CYTHON_REFNANNY
26808 void* __pyx_refchk = NULL;
26809 __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
26810 if (!__Pyx_Refnanny) {
26812 __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
26813 if (!__Pyx_Refnanny)
26814 Py_FatalError("failed to import refnanny module");
26816 __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_objectify(void)", __LINE__, __FILE__);
26818 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26819 #if PY_MAJOR_VERSION < 3
26820 __pyx_empty_bytes = PyString_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26822 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26824 /*--- Library function declarations ---*/
26825 /*--- Threads initialization code ---*/
26826 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
26827 #ifdef WITH_THREAD /* Python build with threading support? */
26828 PyEval_InitThreads();
26831 /*--- Module creation code ---*/
26832 #if PY_MAJOR_VERSION < 3
26833 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("objectify"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_57), 0, PYTHON_API_VERSION);
26835 __pyx_m = PyModule_Create(&__pyx_moduledef);
26837 if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26838 #if PY_MAJOR_VERSION < 3
26839 Py_INCREF(__pyx_m);
26841 __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
26842 if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26843 if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26844 if (__pyx_module_is_main_lxml__objectify) {
26845 if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_ui___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
26847 /*--- Initialize various global constants etc. ---*/
26848 if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26849 /*--- Builtin init code ---*/
26850 if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26851 __pyx_skip_dispatch = 0;
26852 /*--- Global init code ---*/
26853 __pyx_v_4lxml_9objectify_etree = Py_None; Py_INCREF(Py_None);
26854 __pyx_v_4lxml_9objectify_re = Py_None; Py_INCREF(Py_None);
26855 __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = ((PyObject *)Py_None); Py_INCREF(Py_None);
26856 __pyx_v_4lxml_9objectify_is_special_method = Py_None; Py_INCREF(Py_None);
26857 __pyx_v_4lxml_9objectify_islice = Py_None; Py_INCREF(Py_None);
26858 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE = Py_None; Py_INCREF(Py_None);
26859 __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE_UTF8 = Py_None; Py_INCREF(Py_None);
26860 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME = Py_None; Py_INCREF(Py_None);
26861 __pyx_v_4lxml_9objectify_PYTYPE_ATTRIBUTE_NAME_UTF8 = Py_None; Py_INCREF(Py_None);
26862 __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = Py_None; Py_INCREF(Py_None);
26863 __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = Py_None; Py_INCREF(Py_None);
26864 __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = Py_None; Py_INCREF(Py_None);
26865 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = Py_None; Py_INCREF(Py_None);
26866 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = Py_None; Py_INCREF(Py_None);
26867 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = Py_None; Py_INCREF(Py_None);
26868 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = Py_None; Py_INCREF(Py_None);
26869 __pyx_v_4lxml_9objectify__PYTYPE_DICT = ((PyObject *)Py_None); Py_INCREF(Py_None);
26870 __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = ((PyObject *)Py_None); Py_INCREF(Py_None);
26871 __pyx_v_4lxml_9objectify__TYPE_CHECKS = ((PyObject *)Py_None); Py_INCREF(Py_None);
26872 __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); Py_INCREF(Py_None);
26873 __pyx_v_4lxml_9objectify__strip_attributes = Py_None; Py_INCREF(Py_None);
26874 __pyx_v_4lxml_9objectify___DEFAULT_PARSER = Py_None; Py_INCREF(Py_None);
26875 __pyx_v_4lxml_9objectify_objectify_parser = Py_None; Py_INCREF(Py_None);
26876 __pyx_v_4lxml_9objectify__fromstring = Py_None; Py_INCREF(Py_None);
26877 __pyx_v_4lxml_9objectify__parse = Py_None; Py_INCREF(Py_None);
26878 __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = ((PyObject *)Py_None); Py_INCREF(Py_None);
26879 __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
26880 __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = Py_None; Py_INCREF(Py_None);
26881 /*--- Function export code ---*/
26882 /*--- Type init code ---*/
26883 if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26884 if (__Pyx_SetAttrString(__pyx_m, "PyType", (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26885 __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType;
26886 __pyx_ptype_4lxml_11etreepublic_ElementBase = __Pyx_ImportType("lxml.etree", "ElementBase", sizeof(struct LxmlElementBase)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic_ElementBase)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26887 __pyx_type_4lxml_9objectify_ObjectifiedElement.tp_base = __pyx_ptype_4lxml_11etreepublic_ElementBase;
26888 if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26889 if (__Pyx_SetAttrString(__pyx_m, "ObjectifiedElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26890 __pyx_ptype_4lxml_9objectify_ObjectifiedElement = &__pyx_type_4lxml_9objectify_ObjectifiedElement;
26891 __pyx_type_4lxml_9objectify_ObjectifiedDataElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedElement;
26892 if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26893 if (__Pyx_SetAttrString(__pyx_m, "ObjectifiedDataElement", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifiedDataElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26894 __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement = &__pyx_type_4lxml_9objectify_ObjectifiedDataElement;
26895 __pyx_type_4lxml_9objectify_NumberElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
26896 if (PyType_Ready(&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26897 if (__Pyx_SetAttrString(__pyx_m, "NumberElement", (PyObject *)&__pyx_type_4lxml_9objectify_NumberElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26898 __pyx_ptype_4lxml_9objectify_NumberElement = &__pyx_type_4lxml_9objectify_NumberElement;
26899 __pyx_type_4lxml_9objectify_IntElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
26900 if (PyType_Ready(&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26901 if (__Pyx_SetAttrString(__pyx_m, "IntElement", (PyObject *)&__pyx_type_4lxml_9objectify_IntElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26902 __pyx_ptype_4lxml_9objectify_IntElement = &__pyx_type_4lxml_9objectify_IntElement;
26903 __pyx_type_4lxml_9objectify_LongElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
26904 if (PyType_Ready(&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26905 if (__Pyx_SetAttrString(__pyx_m, "LongElement", (PyObject *)&__pyx_type_4lxml_9objectify_LongElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26906 __pyx_ptype_4lxml_9objectify_LongElement = &__pyx_type_4lxml_9objectify_LongElement;
26907 __pyx_type_4lxml_9objectify_FloatElement.tp_base = __pyx_ptype_4lxml_9objectify_NumberElement;
26908 if (PyType_Ready(&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26909 if (__Pyx_SetAttrString(__pyx_m, "FloatElement", (PyObject *)&__pyx_type_4lxml_9objectify_FloatElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26910 __pyx_ptype_4lxml_9objectify_FloatElement = &__pyx_type_4lxml_9objectify_FloatElement;
26911 __pyx_type_4lxml_9objectify_StringElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
26912 if (PyType_Ready(&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26913 if (__Pyx_SetAttrString(__pyx_m, "StringElement", (PyObject *)&__pyx_type_4lxml_9objectify_StringElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26914 __pyx_ptype_4lxml_9objectify_StringElement = &__pyx_type_4lxml_9objectify_StringElement;
26915 __pyx_type_4lxml_9objectify_NoneElement.tp_base = __pyx_ptype_4lxml_9objectify_ObjectifiedDataElement;
26916 if (PyType_Ready(&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26917 if (__Pyx_SetAttrString(__pyx_m, "NoneElement", (PyObject *)&__pyx_type_4lxml_9objectify_NoneElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26918 __pyx_ptype_4lxml_9objectify_NoneElement = &__pyx_type_4lxml_9objectify_NoneElement;
26919 __pyx_type_4lxml_9objectify_BoolElement.tp_base = __pyx_ptype_4lxml_9objectify_IntElement;
26920 if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26921 if (__Pyx_SetAttrString(__pyx_m, "BoolElement", (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26922 __pyx_ptype_4lxml_9objectify_BoolElement = &__pyx_type_4lxml_9objectify_BoolElement;
26923 if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26924 if (__Pyx_SetAttrString(__pyx_m, "_ObjectifyElementMakerCaller", (PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26925 __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = &__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller;
26926 if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26927 if (__Pyx_SetAttrString(__pyx_m, "ElementMaker", (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26928 __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker;
26929 __pyx_ptype_4lxml_11etreepublic_ElementClassLookup = __Pyx_ImportType("lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic_ElementClassLookup)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26930 __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_base = __pyx_ptype_4lxml_11etreepublic_ElementClassLookup;
26931 if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26932 if (__Pyx_SetAttrString(__pyx_m, "ObjectifyElementClassLookup", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26933 __pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = &__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup;
26934 if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26935 if (__Pyx_SetAttrString(__pyx_m, "ObjectPath", (PyObject *)&__pyx_type_4lxml_9objectify_ObjectPath) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26936 __pyx_ptype_4lxml_9objectify_ObjectPath = &__pyx_type_4lxml_9objectify_ObjectPath;
26937 /*--- Type import code ---*/
26938 __pyx_ptype_4lxml_6python_slice = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "slice", sizeof(PySliceObject)); if (unlikely(!__pyx_ptype_4lxml_6python_slice)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26939 #if PY_MAJOR_VERSION >= 3
26940 __pyx_ptype_4lxml_6python_unicode = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "str", sizeof(PyUnicodeObject)); if (unlikely(!__pyx_ptype_4lxml_6python_unicode)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26942 __pyx_ptype_4lxml_6python_unicode = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "unicode", sizeof(PyUnicodeObject)); if (unlikely(!__pyx_ptype_4lxml_6python_unicode)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26944 __pyx_ptype_4lxml_11etreepublic__Document = __Pyx_ImportType("lxml.etree", "_Document", sizeof(struct LxmlDocument)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__Document)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26945 __pyx_ptype_4lxml_11etreepublic__Element = __Pyx_ImportType("lxml.etree", "_Element", sizeof(struct LxmlElement)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__Element)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26946 __pyx_ptype_4lxml_11etreepublic__ElementTree = __Pyx_ImportType("lxml.etree", "_ElementTree", sizeof(struct LxmlElementTree)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementTree)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26947 __pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup = __Pyx_ImportType("lxml.etree", "FallbackElementClassLookup", sizeof(struct LxmlFallbackElementClassLookup)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic_FallbackElementClassLookup)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26948 __pyx_ptype_4lxml_11etreepublic__ElementTagMatcher = __Pyx_ImportType("lxml.etree", "_ElementTagMatcher", sizeof(struct LxmlElementTagMatcher)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementTagMatcher)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26949 __pyx_ptype_4lxml_11etreepublic__ElementIterator = __Pyx_ImportType("lxml.etree", "_ElementIterator", sizeof(struct LxmlElementIterator)); if (unlikely(!__pyx_ptype_4lxml_11etreepublic__ElementIterator)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26950 /*--- Function import code ---*/
26951 /*--- Execution code ---*/
26953 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":14
26956 * __all__ = [u'BoolElement', u'DataElement', u'E', u'Element', u'ElementMaker', # <<<<<<<<<<<<<<
26957 * u'FloatElement', u'IntElement', u'LongElement', u'NoneElement',
26958 * u'NumberElement', u'ObjectPath', u'ObjectifiedDataElement',
26960 __pyx_t_1 = PyList_New(31); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
26961 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
26962 __Pyx_INCREF(((PyObject *)__pyx_n_u_BoolElement));
26963 PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_u_BoolElement));
26964 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_BoolElement));
26965 __Pyx_INCREF(((PyObject *)__pyx_n_u_DataElement));
26966 PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_u_DataElement));
26967 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_DataElement));
26968 __Pyx_INCREF(((PyObject *)__pyx_n_u_E));
26969 PyList_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_n_u_E));
26970 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_E));
26971 __Pyx_INCREF(((PyObject *)__pyx_n_u_Element));
26972 PyList_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_n_u_Element));
26973 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_Element));
26974 __Pyx_INCREF(((PyObject *)__pyx_n_u_ElementMaker));
26975 PyList_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_n_u_ElementMaker));
26976 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ElementMaker));
26977 __Pyx_INCREF(((PyObject *)__pyx_n_u_FloatElement));
26978 PyList_SET_ITEM(__pyx_t_1, 5, ((PyObject *)__pyx_n_u_FloatElement));
26979 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_FloatElement));
26980 __Pyx_INCREF(((PyObject *)__pyx_n_u_IntElement));
26981 PyList_SET_ITEM(__pyx_t_1, 6, ((PyObject *)__pyx_n_u_IntElement));
26982 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_IntElement));
26983 __Pyx_INCREF(((PyObject *)__pyx_n_u_LongElement));
26984 PyList_SET_ITEM(__pyx_t_1, 7, ((PyObject *)__pyx_n_u_LongElement));
26985 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_LongElement));
26986 __Pyx_INCREF(((PyObject *)__pyx_n_u_NoneElement));
26987 PyList_SET_ITEM(__pyx_t_1, 8, ((PyObject *)__pyx_n_u_NoneElement));
26988 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NoneElement));
26989 __Pyx_INCREF(((PyObject *)__pyx_n_u_NumberElement));
26990 PyList_SET_ITEM(__pyx_t_1, 9, ((PyObject *)__pyx_n_u_NumberElement));
26991 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_NumberElement));
26992 __Pyx_INCREF(((PyObject *)__pyx_n_u_ObjectPath));
26993 PyList_SET_ITEM(__pyx_t_1, 10, ((PyObject *)__pyx_n_u_ObjectPath));
26994 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ObjectPath));
26995 __Pyx_INCREF(((PyObject *)__pyx_n_u_58));
26996 PyList_SET_ITEM(__pyx_t_1, 11, ((PyObject *)__pyx_n_u_58));
26997 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_58));
26998 __Pyx_INCREF(((PyObject *)__pyx_n_u_ObjectifiedElement));
26999 PyList_SET_ITEM(__pyx_t_1, 12, ((PyObject *)__pyx_n_u_ObjectifiedElement));
27000 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_ObjectifiedElement));
27001 __Pyx_INCREF(((PyObject *)__pyx_n_u_59));
27002 PyList_SET_ITEM(__pyx_t_1, 13, ((PyObject *)__pyx_n_u_59));
27003 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_59));
27004 __Pyx_INCREF(((PyObject *)__pyx_n_u_PYTYPE_ATTRIBUTE));
27005 PyList_SET_ITEM(__pyx_t_1, 14, ((PyObject *)__pyx_n_u_PYTYPE_ATTRIBUTE));
27006 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_PYTYPE_ATTRIBUTE));
27007 __Pyx_INCREF(((PyObject *)__pyx_n_u_PyType));
27008 PyList_SET_ITEM(__pyx_t_1, 15, ((PyObject *)__pyx_n_u_PyType));
27009 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_PyType));
27010 __Pyx_INCREF(((PyObject *)__pyx_n_u_StringElement));
27011 PyList_SET_ITEM(__pyx_t_1, 16, ((PyObject *)__pyx_n_u_StringElement));
27012 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_StringElement));
27013 __Pyx_INCREF(((PyObject *)__pyx_n_u_XML));
27014 PyList_SET_ITEM(__pyx_t_1, 17, ((PyObject *)__pyx_n_u_XML));
27015 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_XML));
27016 __Pyx_INCREF(((PyObject *)__pyx_n_u_annotate));
27017 PyList_SET_ITEM(__pyx_t_1, 18, ((PyObject *)__pyx_n_u_annotate));
27018 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_annotate));
27019 __Pyx_INCREF(((PyObject *)__pyx_n_u_deannotate));
27020 PyList_SET_ITEM(__pyx_t_1, 19, ((PyObject *)__pyx_n_u_deannotate));
27021 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_deannotate));
27022 __Pyx_INCREF(((PyObject *)__pyx_n_u_dump));
27023 PyList_SET_ITEM(__pyx_t_1, 20, ((PyObject *)__pyx_n_u_dump));
27024 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_dump));
27025 __Pyx_INCREF(((PyObject *)__pyx_n_u_60));
27026 PyList_SET_ITEM(__pyx_t_1, 21, ((PyObject *)__pyx_n_u_60));
27027 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_60));
27028 __Pyx_INCREF(((PyObject *)__pyx_n_u_fromstring));
27029 PyList_SET_ITEM(__pyx_t_1, 22, ((PyObject *)__pyx_n_u_fromstring));
27030 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_fromstring));
27031 __Pyx_INCREF(((PyObject *)__pyx_n_u_getRegisteredTypes));
27032 PyList_SET_ITEM(__pyx_t_1, 23, ((PyObject *)__pyx_n_u_getRegisteredTypes));
27033 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_getRegisteredTypes));
27034 __Pyx_INCREF(((PyObject *)__pyx_n_u_makeparser));
27035 PyList_SET_ITEM(__pyx_t_1, 24, ((PyObject *)__pyx_n_u_makeparser));
27036 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_makeparser));
27037 __Pyx_INCREF(((PyObject *)__pyx_n_u_parse));
27038 PyList_SET_ITEM(__pyx_t_1, 25, ((PyObject *)__pyx_n_u_parse));
27039 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_parse));
27040 __Pyx_INCREF(((PyObject *)__pyx_n_u_pyannotate));
27041 PyList_SET_ITEM(__pyx_t_1, 26, ((PyObject *)__pyx_n_u_pyannotate));
27042 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_pyannotate));
27043 __Pyx_INCREF(((PyObject *)__pyx_n_u_pytypename));
27044 PyList_SET_ITEM(__pyx_t_1, 27, ((PyObject *)__pyx_n_u_pytypename));
27045 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_pytypename));
27046 __Pyx_INCREF(((PyObject *)__pyx_n_u_set_default_parser));
27047 PyList_SET_ITEM(__pyx_t_1, 28, ((PyObject *)__pyx_n_u_set_default_parser));
27048 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_set_default_parser));
27049 __Pyx_INCREF(((PyObject *)__pyx_n_u_61));
27050 PyList_SET_ITEM(__pyx_t_1, 29, ((PyObject *)__pyx_n_u_61));
27051 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_61));
27052 __Pyx_INCREF(((PyObject *)__pyx_n_u_xsiannotate));
27053 PyList_SET_ITEM(__pyx_t_1, 30, ((PyObject *)__pyx_n_u_xsiannotate));
27054 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_xsiannotate));
27055 if (PyObject_SetAttr(__pyx_m, __pyx_n_ui___all__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27056 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27058 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":25
27060 * cdef object etree
27061 * from lxml import etree # <<<<<<<<<<<<<<
27062 * # initialize C-API of lxml.etree
27063 * import_lxml__etree()
27065 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27066 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27067 __Pyx_INCREF(__pyx_n_ui_etree);
27068 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_ui_etree);
27069 __Pyx_GIVEREF(__pyx_n_ui_etree);
27070 __pyx_t_2 = __Pyx_Import(__pyx_n_ui_lxml, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27071 __Pyx_GOTREF(__pyx_t_2);
27072 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27073 __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_bi_etree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27074 __Pyx_GOTREF(__pyx_t_1);
27075 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_etree);
27076 __Pyx_DECREF(__pyx_v_4lxml_9objectify_etree);
27077 __Pyx_GIVEREF(__pyx_t_1);
27078 __pyx_v_4lxml_9objectify_etree = __pyx_t_1;
27080 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27082 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":27
27083 * from lxml import etree
27084 * # initialize C-API of lxml.etree
27085 * import_lxml__etree() # <<<<<<<<<<<<<<
27087 * __version__ = etree.__version__
27089 __pyx_t_3 = import_lxml__etree(); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27091 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":29
27092 * import_lxml__etree()
27094 * __version__ = etree.__version__ # <<<<<<<<<<<<<<
27098 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui___version__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27099 __Pyx_GOTREF(__pyx_t_2);
27100 if (PyObject_SetAttr(__pyx_m, __pyx_n_ui___version__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27101 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27103 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":32
27106 * import re # <<<<<<<<<<<<<<
27108 * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
27110 __pyx_t_2 = __Pyx_Import(__pyx_n_ui_re, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27111 __Pyx_GOTREF(__pyx_t_2);
27112 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_re);
27113 __Pyx_DECREF(__pyx_v_4lxml_9objectify_re);
27114 __Pyx_GIVEREF(__pyx_t_2);
27115 __pyx_v_4lxml_9objectify_re = __pyx_t_2;
27118 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":34
27121 * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError) # <<<<<<<<<<<<<<
27122 * cdef object is_special_method = re.compile(u'__.*__$').match
27125 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27126 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
27127 __Pyx_INCREF(__pyx_builtin_ValueError);
27128 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_ValueError);
27129 __Pyx_GIVEREF(__pyx_builtin_ValueError);
27130 __Pyx_INCREF(__pyx_builtin_TypeError);
27131 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_builtin_TypeError);
27132 __Pyx_GIVEREF(__pyx_builtin_TypeError);
27133 __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
27134 __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_IGNORABLE_ERRORS));
27135 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
27136 __pyx_v_4lxml_9objectify_IGNORABLE_ERRORS = __pyx_t_2;
27139 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":35
27141 * cdef tuple IGNORABLE_ERRORS = (ValueError, TypeError)
27142 * cdef object is_special_method = re.compile(u'__.*__$').match # <<<<<<<<<<<<<<
27144 * cdef object islice
27146 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_ui_compile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27147 __Pyx_GOTREF(__pyx_t_2);
27148 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27149 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27150 __Pyx_INCREF(((PyObject *)__pyx_kp_u_62));
27151 PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_kp_u_62));
27152 __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_62));
27153 __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27154 __Pyx_GOTREF(__pyx_t_4);
27155 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27156 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27157 __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_ui_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27158 __Pyx_GOTREF(__pyx_t_1);
27159 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27160 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_is_special_method);
27161 __Pyx_DECREF(__pyx_v_4lxml_9objectify_is_special_method);
27162 __Pyx_GIVEREF(__pyx_t_1);
27163 __pyx_v_4lxml_9objectify_is_special_method = __pyx_t_1;
27166 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":38
27168 * cdef object islice
27169 * from itertools import islice # <<<<<<<<<<<<<<
27171 * cdef object _typename(object t):
27173 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27174 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27175 __Pyx_INCREF(__pyx_n_ui_islice);
27176 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_ui_islice);
27177 __Pyx_GIVEREF(__pyx_n_ui_islice);
27178 __pyx_t_4 = __Pyx_Import(__pyx_n_ui_itertools, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27179 __Pyx_GOTREF(__pyx_t_4);
27180 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27181 __pyx_t_1 = PyObject_GetAttr(__pyx_t_4, __pyx_n_bi_islice); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27182 __Pyx_GOTREF(__pyx_t_1);
27183 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_islice);
27184 __Pyx_DECREF(__pyx_v_4lxml_9objectify_islice);
27185 __Pyx_GIVEREF(__pyx_t_1);
27186 __pyx_v_4lxml_9objectify_islice = __pyx_t_1;
27188 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27190 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":58
27191 * cdef char* _PYTYPE_ATTRIBUTE_NAME
27193 * PYTYPE_ATTRIBUTE = None # <<<<<<<<<<<<<<
27195 * cdef object TREE_PYTYPE_NAME
27197 if (PyObject_SetAttr(__pyx_m, __pyx_n_ui_PYTYPE_ATTRIBUTE, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27199 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":61
27201 * cdef object TREE_PYTYPE_NAME
27202 * TREE_PYTYPE_NAME = u"TREE" # <<<<<<<<<<<<<<
27204 * cdef _unicodeAndUtf8(s):
27206 __Pyx_INCREF(((PyObject *)__pyx_n_u_TREE));
27207 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27208 __Pyx_DECREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27209 __Pyx_GIVEREF(((PyObject *)__pyx_n_u_TREE));
27210 __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME = ((PyObject *)__pyx_n_u_TREE);
27212 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":98
27213 * _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME)
27215 * set_pytype_attribute_tag() # <<<<<<<<<<<<<<
27219 __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_61); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27220 __Pyx_GOTREF(__pyx_t_4);
27221 __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27222 __Pyx_GOTREF(__pyx_t_1);
27223 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27224 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27226 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":104
27227 * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
27228 * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \
27229 * _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema") # <<<<<<<<<<<<<<
27230 * cdef char* _XML_SCHEMA_NS
27231 * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS_UTF8)
27233 __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_u_63)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27234 __Pyx_GOTREF(__pyx_t_1);
27235 if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
27236 PyObject* tuple = __pyx_t_1;
27237 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
27238 __pyx_t_2 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_2);
27240 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":103
27241 * # namespaces for XML Schema
27242 * cdef object XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8
27243 * XML_SCHEMA_NS, XML_SCHEMA_NS_UTF8 = \ # <<<<<<<<<<<<<<
27244 * _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
27245 * cdef char* _XML_SCHEMA_NS
27247 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27248 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27249 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27250 __Pyx_GIVEREF(__pyx_t_4);
27251 __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_t_4;
27253 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27254 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27255 __Pyx_GIVEREF(__pyx_t_2);
27256 __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = __pyx_t_2;
27259 __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27260 __Pyx_GOTREF(__pyx_t_5);
27261 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27262 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27263 __Pyx_GOTREF(__pyx_t_4);
27264 __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27265 __Pyx_GOTREF(__pyx_t_2);
27266 if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27267 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27268 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27269 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS);
27270 __Pyx_GIVEREF(__pyx_t_4);
27271 __pyx_v_4lxml_9objectify_XML_SCHEMA_NS = __pyx_t_4;
27273 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27274 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27275 __Pyx_GIVEREF(__pyx_t_2);
27276 __pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8 = __pyx_t_2;
27280 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":106
27281 * _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema")
27282 * cdef char* _XML_SCHEMA_NS
27283 * _XML_SCHEMA_NS = _cstr(XML_SCHEMA_NS_UTF8) # <<<<<<<<<<<<<<
27285 * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
27287 __pyx_v_4lxml_9objectify__XML_SCHEMA_NS = PyString_AS_STRING(__pyx_v_4lxml_9objectify_XML_SCHEMA_NS_UTF8);
27289 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":110
27290 * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
27291 * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \
27292 * _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance") # <<<<<<<<<<<<<<
27293 * cdef char* _XML_SCHEMA_INSTANCE_NS
27294 * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS_UTF8)
27296 __pyx_t_1 = __pyx_f_4lxml_9objectify__unicodeAndUtf8(((PyObject *)__pyx_kp_u_64)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27297 __Pyx_GOTREF(__pyx_t_1);
27298 if (PyTuple_CheckExact(__pyx_t_1) && likely(PyTuple_GET_SIZE(__pyx_t_1) == 2)) {
27299 PyObject* tuple = __pyx_t_1;
27300 __pyx_t_2 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_2);
27301 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
27303 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":109
27305 * cdef object XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8
27306 * XML_SCHEMA_INSTANCE_NS, XML_SCHEMA_INSTANCE_NS_UTF8 = \ # <<<<<<<<<<<<<<
27307 * _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
27308 * cdef char* _XML_SCHEMA_INSTANCE_NS
27310 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27311 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27312 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27313 __Pyx_GIVEREF(__pyx_t_2);
27314 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_t_2;
27316 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27317 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27318 __Pyx_GIVEREF(__pyx_t_4);
27319 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = __pyx_t_4;
27322 __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27323 __Pyx_GOTREF(__pyx_t_5);
27324 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27325 __pyx_t_2 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27326 __Pyx_GOTREF(__pyx_t_2);
27327 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27328 __Pyx_GOTREF(__pyx_t_4);
27329 if (__Pyx_EndUnpack(__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27330 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27331 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27332 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS);
27333 __Pyx_GIVEREF(__pyx_t_2);
27334 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS = __pyx_t_2;
27336 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27337 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27338 __Pyx_GIVEREF(__pyx_t_4);
27339 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8 = __pyx_t_4;
27343 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":112
27344 * _unicodeAndUtf8(u"http://www.w3.org/2001/XMLSchema-instance")
27345 * cdef char* _XML_SCHEMA_INSTANCE_NS
27346 * _XML_SCHEMA_INSTANCE_NS = _cstr(XML_SCHEMA_INSTANCE_NS_UTF8) # <<<<<<<<<<<<<<
27348 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
27350 __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS = PyString_AS_STRING(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS_UTF8);
27352 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":115
27354 * cdef object XML_SCHEMA_INSTANCE_NIL_ATTR
27355 * XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS # <<<<<<<<<<<<<<
27356 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
27357 * XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS
27359 __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_65), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27360 __Pyx_GOTREF(__pyx_t_1);
27361 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
27362 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR);
27363 __Pyx_GIVEREF(__pyx_t_1);
27364 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR = __pyx_t_1;
27367 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":117
27368 * XML_SCHEMA_INSTANCE_NIL_ATTR = u"{%s}nil" % XML_SCHEMA_INSTANCE_NS
27369 * cdef object XML_SCHEMA_INSTANCE_TYPE_ATTR
27370 * XML_SCHEMA_INSTANCE_TYPE_ATTR = u"{%s}type" % XML_SCHEMA_INSTANCE_NS # <<<<<<<<<<<<<<
27374 __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_u_66), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27375 __Pyx_GOTREF(__pyx_t_1);
27376 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
27377 __Pyx_DECREF(__pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR);
27378 __Pyx_GIVEREF(__pyx_t_1);
27379 __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR = __pyx_t_1;
27382 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1040
27384 * cdef dict _PYTYPE_DICT
27385 * _PYTYPE_DICT = {} # <<<<<<<<<<<<<<
27387 * cdef dict _SCHEMA_TYPE_DICT
27389 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27390 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27391 __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
27392 __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__PYTYPE_DICT));
27393 __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27394 __pyx_v_4lxml_9objectify__PYTYPE_DICT = __pyx_t_1;
27397 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1043
27399 * cdef dict _SCHEMA_TYPE_DICT
27400 * _SCHEMA_TYPE_DICT = {} # <<<<<<<<<<<<<<
27402 * cdef list _TYPE_CHECKS
27404 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27405 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27406 __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
27407 __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT));
27408 __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27409 __pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT = __pyx_t_1;
27412 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1046
27414 * cdef list _TYPE_CHECKS
27415 * _TYPE_CHECKS = [] # <<<<<<<<<<<<<<
27417 * cdef _lower_bool(b):
27419 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27420 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27421 __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
27422 __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__TYPE_CHECKS));
27423 __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27424 __pyx_v_4lxml_9objectify__TYPE_CHECKS = __pyx_t_1;
27427 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1106
27428 * # non-registered PyType for inner tree elements
27429 * cdef PyType TREE_PYTYPE
27430 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement) # <<<<<<<<<<<<<<
27432 * _registerPyTypes()
27434 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27435 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27436 __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27437 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27438 __Pyx_GIVEREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME);
27439 __Pyx_INCREF(Py_None);
27440 PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
27441 __Pyx_GIVEREF(Py_None);
27442 __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
27443 PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
27444 __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)));
27445 __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_PyType)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27446 __Pyx_GOTREF(__pyx_t_4);
27447 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27448 __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
27449 __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE));
27450 __Pyx_GIVEREF(__pyx_t_4);
27451 __pyx_v_4lxml_9objectify_TREE_PYTYPE = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4);
27454 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1108
27455 * TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement)
27457 * _registerPyTypes() # <<<<<<<<<<<<<<
27459 * def getRegisteredTypes():
27461 __pyx_t_4 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27462 __Pyx_GOTREF(__pyx_t_4);
27463 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27465 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1273
27466 * cdef object _nsmap
27467 * cdef bint _annotate
27468 * def __init__(self, *, namespace=None, nsmap=None, annotate=True, # <<<<<<<<<<<<<<
27469 * makeelement=None):
27470 * if nsmap is None:
27472 __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27473 __Pyx_GOTREF(__pyx_t_4);
27474 __pyx_k_22 = __pyx_t_4;
27475 __Pyx_GIVEREF(__pyx_t_4);
27478 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1309
27480 * cdef bint __RECURSIVE_STR
27481 * __RECURSIVE_STR = 0 # default: off # <<<<<<<<<<<<<<
27483 * def enable_recursive_str(on=True):
27485 __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0;
27487 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1311
27488 * __RECURSIVE_STR = 0 # default: off
27490 * def enable_recursive_str(on=True): # <<<<<<<<<<<<<<
27491 * u"""enable_recursive_str(on=True)
27494 __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27495 __Pyx_GOTREF(__pyx_t_4);
27496 __pyx_k_25 = __pyx_t_4;
27497 __Pyx_GIVEREF(__pyx_t_4);
27500 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1385
27501 * return (__unpickleElementTree, (etree.tostring(obj),))
27503 * _setupPickle(pickleReduceElement, pickleReduceElementTree) # <<<<<<<<<<<<<<
27504 * del pickleReduceElement, pickleReduceElementTree
27507 __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_ui_pickleReduceElement); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27508 __Pyx_GOTREF(__pyx_t_4);
27509 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_ui_67); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27510 __Pyx_GOTREF(__pyx_t_1);
27511 __pyx_t_2 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27512 __Pyx_GOTREF(__pyx_t_2);
27513 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27514 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27515 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27517 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1386
27519 * _setupPickle(pickleReduceElement, pickleReduceElementTree)
27520 * del pickleReduceElement, pickleReduceElementTree # <<<<<<<<<<<<<<
27522 * ################################################################################
27524 if (__Pyx_DelAttrString(__pyx_m, "pickleReduceElement") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27525 if (__Pyx_DelAttrString(__pyx_m, "pickleReduceElementTree") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27527 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1477
27530 * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, # <<<<<<<<<<<<<<
27531 * empty_pytype=None):
27532 * u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None)
27534 __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27535 __Pyx_GOTREF(__pyx_t_2);
27536 __pyx_k_33 = __pyx_t_2;
27537 __Pyx_GIVEREF(__pyx_t_2);
27539 __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27540 __Pyx_GOTREF(__pyx_t_2);
27541 __pyx_k_34 = __pyx_t_2;
27542 __Pyx_GIVEREF(__pyx_t_2);
27545 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1500
27546 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype)
27548 * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, # <<<<<<<<<<<<<<
27549 * empty_type=None):
27550 * u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None)
27552 __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27553 __Pyx_GOTREF(__pyx_t_2);
27554 __pyx_k_35 = __pyx_t_2;
27555 __Pyx_GIVEREF(__pyx_t_2);
27557 __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27558 __Pyx_GOTREF(__pyx_t_2);
27559 __pyx_k_36 = __pyx_t_2;
27560 __Pyx_GIVEREF(__pyx_t_2);
27563 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1528
27564 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None)
27566 * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, # <<<<<<<<<<<<<<
27567 * empty_pytype=None, empty_type=None, annotate_xsi=0,
27568 * annotate_pytype=1):
27570 __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27571 __Pyx_GOTREF(__pyx_t_2);
27572 __pyx_k_37 = __pyx_t_2;
27573 __Pyx_GIVEREF(__pyx_t_2);
27575 __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27576 __Pyx_GOTREF(__pyx_t_2);
27577 __pyx_k_38 = __pyx_t_2;
27578 __Pyx_GIVEREF(__pyx_t_2);
27581 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1726
27582 * tree.END_FOR_EACH_ELEMENT_FROM(c_node)
27584 * cdef object _strip_attributes = etree.strip_attributes # <<<<<<<<<<<<<<
27586 * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False):
27588 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_strip_attributes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1726; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27589 __Pyx_GOTREF(__pyx_t_2);
27590 __Pyx_GOTREF(__pyx_v_4lxml_9objectify__strip_attributes);
27591 __Pyx_DECREF(__pyx_v_4lxml_9objectify__strip_attributes);
27592 __Pyx_GIVEREF(__pyx_t_2);
27593 __pyx_v_4lxml_9objectify__strip_attributes = __pyx_t_2;
27596 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1728
27597 * cdef object _strip_attributes = etree.strip_attributes
27599 * def deannotate(element_or_tree, *, pytype=True, xsi=True, xsi_nil=False): # <<<<<<<<<<<<<<
27600 * u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False)
27603 __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27604 __Pyx_GOTREF(__pyx_t_2);
27605 __pyx_k_39 = __pyx_t_2;
27606 __Pyx_GIVEREF(__pyx_t_2);
27608 __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27609 __Pyx_GOTREF(__pyx_t_2);
27610 __pyx_k_40 = __pyx_t_2;
27611 __Pyx_GIVEREF(__pyx_t_2);
27613 __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27614 __Pyx_GOTREF(__pyx_t_2);
27615 __pyx_k_41 = __pyx_t_2;
27616 __Pyx_GIVEREF(__pyx_t_2);
27619 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1759
27621 * cdef object __DEFAULT_PARSER
27622 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True) # <<<<<<<<<<<<<<
27623 * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() )
27626 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_XMLParser); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27627 __Pyx_GOTREF(__pyx_t_2);
27628 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27629 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27630 __pyx_t_4 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27631 __Pyx_GOTREF(__pyx_t_4);
27632 if (PyDict_SetItem(__pyx_t_1, __pyx_n_ui_remove_blank_text, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27633 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27634 __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27635 __Pyx_GOTREF(__pyx_t_4);
27636 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27637 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
27638 __Pyx_GOTREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27639 __Pyx_DECREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27640 __Pyx_GIVEREF(__pyx_t_4);
27641 __pyx_v_4lxml_9objectify___DEFAULT_PARSER = __pyx_t_4;
27644 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1760
27645 * cdef object __DEFAULT_PARSER
27646 * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True)
27647 * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() ) # <<<<<<<<<<<<<<
27649 * cdef object objectify_parser
27651 __pyx_t_4 = PyObject_GetAttr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_n_ui_43); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27652 __Pyx_GOTREF(__pyx_t_4);
27653 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27654 __Pyx_GOTREF(__pyx_t_1);
27655 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27656 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
27657 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
27658 __Pyx_GIVEREF(__pyx_t_1);
27660 __pyx_t_1 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27661 __Pyx_GOTREF(__pyx_t_1);
27662 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27663 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
27664 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27666 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1763
27668 * cdef object objectify_parser
27669 * objectify_parser = __DEFAULT_PARSER # <<<<<<<<<<<<<<
27671 * def set_default_parser(new_parser = None):
27673 __Pyx_INCREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27674 __Pyx_GOTREF(__pyx_v_4lxml_9objectify_objectify_parser);
27675 __Pyx_DECREF(__pyx_v_4lxml_9objectify_objectify_parser);
27676 __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER);
27677 __pyx_v_4lxml_9objectify_objectify_parser = __pyx_v_4lxml_9objectify___DEFAULT_PARSER;
27679 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1810
27681 * cdef object _fromstring
27682 * _fromstring = etree.fromstring # <<<<<<<<<<<<<<
27684 * def fromstring(xml, parser=None, *, base_url=None):
27686 __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_fromstring); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27687 __Pyx_GOTREF(__pyx_t_1);
27688 __Pyx_GOTREF(__pyx_v_4lxml_9objectify__fromstring);
27689 __Pyx_DECREF(__pyx_v_4lxml_9objectify__fromstring);
27690 __Pyx_GIVEREF(__pyx_t_1);
27691 __pyx_v_4lxml_9objectify__fromstring = __pyx_t_1;
27694 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1845
27696 * cdef object _parse
27697 * _parse = etree.parse # <<<<<<<<<<<<<<
27699 * def parse(f, parser=None, *, base_url=None):
27701 __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_etree, __pyx_n_ui_parse); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27702 __Pyx_GOTREF(__pyx_t_1);
27703 __Pyx_GOTREF(__pyx_v_4lxml_9objectify__parse);
27704 __Pyx_DECREF(__pyx_v_4lxml_9objectify__parse);
27705 __Pyx_GIVEREF(__pyx_t_1);
27706 __pyx_v_4lxml_9objectify__parse = __pyx_t_1;
27709 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1863
27711 * cdef dict _DEFAULT_NSMAP
27712 * _DEFAULT_NSMAP = { u"py" : PYTYPE_NAMESPACE, # <<<<<<<<<<<<<<
27713 * u"xsi" : XML_SCHEMA_INSTANCE_NS,
27714 * u"xsd" : XML_SCHEMA_NS}
27716 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27717 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
27718 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u_py), __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27720 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1864
27721 * cdef dict _DEFAULT_NSMAP
27722 * _DEFAULT_NSMAP = { u"py" : PYTYPE_NAMESPACE,
27723 * u"xsi" : XML_SCHEMA_INSTANCE_NS, # <<<<<<<<<<<<<<
27724 * u"xsd" : XML_SCHEMA_NS}
27727 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u_xsi), __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27729 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1865
27730 * _DEFAULT_NSMAP = { u"py" : PYTYPE_NAMESPACE,
27731 * u"xsi" : XML_SCHEMA_INSTANCE_NS,
27732 * u"xsd" : XML_SCHEMA_NS} # <<<<<<<<<<<<<<
27734 * E = ElementMaker()
27736 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_u_xsd), __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27737 __Pyx_GOTREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
27738 __Pyx_DECREF(((PyObject *)__pyx_v_4lxml_9objectify__DEFAULT_NSMAP));
27739 __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
27740 __pyx_v_4lxml_9objectify__DEFAULT_NSMAP = __pyx_t_1;
27743 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.objectify.pyx":1867
27744 * u"xsd" : XML_SCHEMA_NS}
27746 * E = ElementMaker() # <<<<<<<<<<<<<<
27748 * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes):
27750 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_9objectify_ElementMaker)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27751 __Pyx_GOTREF(__pyx_t_1);
27752 if (PyObject_SetAttr(__pyx_m, __pyx_n_ui_E, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27753 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27755 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":84
27757 * cdef object __MATCH_PATH_SEGMENT
27758 * __MATCH_PATH_SEGMENT = re.compile( # <<<<<<<<<<<<<<
27759 * ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
27762 __pyx_t_1 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_ui_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27763 __Pyx_GOTREF(__pyx_t_1);
27765 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":86
27766 * __MATCH_PATH_SEGMENT = re.compile(
27767 * ur"(\.?)\s*(?:\{([^}]*)\})?\s*([^.{}\[\]\s]+)\s*(?:\[\s*([-0-9]+)\s*\])?",
27768 * re.U).match # <<<<<<<<<<<<<<
27770 * cdef object _RELATIVE_PATH_SEGMENT
27772 __pyx_t_2 = PyObject_GetAttr(__pyx_v_4lxml_9objectify_re, __pyx_n_ui_U); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27773 __Pyx_GOTREF(__pyx_t_2);
27774 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27775 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
27776 __Pyx_INCREF(((PyObject *)__pyx_kp_u_68));
27777 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_kp_u_68));
27778 __Pyx_GIVEREF(((PyObject *)__pyx_kp_u_68));
27779 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
27780 __Pyx_GIVEREF(__pyx_t_2);
27782 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27783 __Pyx_GOTREF(__pyx_t_2);
27784 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27785 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
27786 __pyx_t_4 = PyObject_GetAttr(__pyx_t_2, __pyx_n_ui_match); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27787 __Pyx_GOTREF(__pyx_t_4);
27788 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27789 __Pyx_GOTREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
27790 __Pyx_DECREF(__pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT);
27791 __Pyx_GIVEREF(__pyx_t_4);
27792 __pyx_v_4lxml_9objectify___MATCH_PATH_SEGMENT = __pyx_t_4;
27795 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/objectpath.pxi":89
27797 * cdef object _RELATIVE_PATH_SEGMENT
27798 * _RELATIVE_PATH_SEGMENT = (None, None, 0) # <<<<<<<<<<<<<<
27800 * cdef _parseObjectPathString(path):
27802 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
27803 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
27804 __Pyx_INCREF(Py_None);
27805 PyTuple_SET_ITEM(__pyx_t_4, 0, Py_None);
27806 __Pyx_GIVEREF(Py_None);
27807 __Pyx_INCREF(Py_None);
27808 PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None);
27809 __Pyx_GIVEREF(Py_None);
27810 __Pyx_INCREF(__pyx_int_0);
27811 PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_int_0);
27812 __Pyx_GIVEREF(__pyx_int_0);
27813 __Pyx_GOTREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
27814 __Pyx_DECREF(__pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT);
27815 __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
27816 __pyx_v_4lxml_9objectify__RELATIVE_PATH_SEGMENT = ((PyObject *)__pyx_t_4);
27819 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/cstd.pxd":2
27821 * cdef extern from "string.h": # <<<<<<<<<<<<<<
27822 * cdef int strlen(char* s) nogil
27823 * cdef char* strstr(char* haystack, char* needle) nogil
27827 __Pyx_XDECREF(__pyx_t_1);
27828 __Pyx_XDECREF(__pyx_t_2);
27829 __Pyx_XDECREF(__pyx_t_4);
27830 __Pyx_XDECREF(__pyx_t_5);
27832 __Pyx_AddTraceback("init lxml.objectify");
27833 Py_DECREF(__pyx_m); __pyx_m = 0;
27834 } else if (!PyErr_Occurred()) {
27835 PyErr_SetString(PyExc_ImportError, "init lxml.objectify");
27838 __Pyx_FinishRefcountContext();
27839 #if PY_MAJOR_VERSION < 3
27846 static const char *__pyx_filenames[] = {
27847 "lxml.objectify.pyx",
27853 /* Runtime support code */
27855 static void __pyx_init_filenames(void) {
27856 __pyx_f = __pyx_filenames;
27859 static void __Pyx_RaiseDoubleKeywordsError(
27860 const char* func_name,
27863 PyErr_Format(PyExc_TypeError,
27864 #if PY_MAJOR_VERSION >= 3
27865 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
27867 "%s() got multiple values for keyword argument '%s'", func_name,
27868 PyString_AS_STRING(kw_name));
27872 static void __Pyx_RaiseArgtupleInvalid(
27873 const char* func_name,
27875 Py_ssize_t num_min,
27876 Py_ssize_t num_max,
27877 Py_ssize_t num_found)
27879 Py_ssize_t num_expected;
27880 const char *number, *more_or_less;
27882 if (num_found < num_min) {
27883 num_expected = num_min;
27884 more_or_less = "at least";
27886 num_expected = num_max;
27887 more_or_less = "at most";
27890 more_or_less = "exactly";
27892 number = (num_expected == 1) ? "" : "s";
27893 PyErr_Format(PyExc_TypeError,
27894 #if PY_VERSION_HEX < 0x02050000
27895 "%s() takes %s %d positional argument%s (%d given)",
27897 "%s() takes %s %zd positional argument%s (%zd given)",
27899 func_name, more_or_less, num_expected, number, num_found);
27902 static int __Pyx_ParseOptionalKeywords(
27904 PyObject **argnames[],
27906 PyObject *values[],
27907 Py_ssize_t num_pos_args,
27908 const char* function_name)
27910 PyObject *key = 0, *value = 0;
27911 Py_ssize_t pos = 0;
27913 PyObject*** first_kw_arg = argnames + num_pos_args;
27915 while (PyDict_Next(kwds, &pos, &key, &value)) {
27916 name = first_kw_arg;
27917 while (*name && (**name != key)) name++;
27919 values[name-argnames] = value;
27921 #if PY_MAJOR_VERSION < 3
27922 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
27924 if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
27926 goto invalid_keyword_type;
27928 for (name = first_kw_arg; *name; name++) {
27929 #if PY_MAJOR_VERSION >= 3
27930 if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
27931 PyUnicode_Compare(**name, key) == 0) break;
27933 if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
27934 _PyString_Eq(**name, key)) break;
27938 values[name-argnames] = value;
27940 /* unexpected keyword found */
27941 for (name=argnames; name != first_kw_arg; name++) {
27942 if (**name == key) goto arg_passed_twice;
27943 #if PY_MAJOR_VERSION >= 3
27944 if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
27945 PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
27947 if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
27948 _PyString_Eq(**name, key)) goto arg_passed_twice;
27952 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
27954 goto invalid_keyword;
27962 __Pyx_RaiseDoubleKeywordsError(function_name, **name);
27964 invalid_keyword_type:
27965 PyErr_Format(PyExc_TypeError,
27966 "%s() keywords must be strings", function_name);
27969 PyErr_Format(PyExc_TypeError,
27970 #if PY_MAJOR_VERSION < 3
27971 "%s() got an unexpected keyword argument '%s'",
27972 function_name, PyString_AsString(key));
27974 "%s() got an unexpected keyword argument '%U'",
27975 function_name, key);
27981 static INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
27982 PyErr_Format(PyExc_ValueError,
27983 #if PY_VERSION_HEX < 0x02050000
27984 "need more than %d value%s to unpack", (int)index,
27986 "need more than %zd value%s to unpack", index,
27988 (index == 1) ? "" : "s");
27991 static INLINE void __Pyx_RaiseTooManyValuesError(void) {
27992 PyErr_SetString(PyExc_ValueError, "too many values to unpack");
27995 static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
27997 if (!(item = PyIter_Next(iter))) {
27998 if (!PyErr_Occurred()) {
27999 __Pyx_RaiseNeedMoreValuesError(index);
28005 static int __Pyx_EndUnpack(PyObject *iter) {
28007 if ((item = PyIter_Next(iter))) {
28009 __Pyx_RaiseTooManyValuesError();
28012 else if (!PyErr_Occurred())
28018 static int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
28020 PyErr_Format(PyExc_SystemError, "Missing type object");
28023 if (obj == Py_None || PyObject_TypeCheck(obj, type))
28025 PyErr_Format(PyExc_TypeError, "Cannot convert %s to %s",
28026 Py_TYPE(obj)->tp_name, type->tp_name);
28031 static INLINE int __Pyx_CheckKeywordStrings(
28033 const char* function_name,
28037 Py_ssize_t pos = 0;
28038 while (PyDict_Next(kwdict, &pos, &key, 0)) {
28039 #if PY_MAJOR_VERSION < 3
28040 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
28042 if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
28044 goto invalid_keyword_type;
28046 if ((!kw_allowed) && unlikely(key))
28047 goto invalid_keyword;
28049 invalid_keyword_type:
28050 PyErr_Format(PyExc_TypeError,
28051 "%s() keywords must be strings", function_name);
28054 PyErr_Format(PyExc_TypeError,
28055 #if PY_MAJOR_VERSION < 3
28056 "%s() got an unexpected keyword argument '%s'",
28057 function_name, PyString_AsString(key));
28059 "%s() got an unexpected keyword argument '%U'",
28060 function_name, key);
28065 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
28066 PyObject *tmp_type, *tmp_value, *tmp_tb;
28067 PyThreadState *tstate = PyThreadState_GET();
28068 *type = tstate->curexc_type;
28069 *value = tstate->curexc_value;
28070 *tb = tstate->curexc_traceback;
28071 tstate->curexc_type = 0;
28072 tstate->curexc_value = 0;
28073 tstate->curexc_traceback = 0;
28074 PyErr_NormalizeException(type, value, tb);
28075 if (PyErr_Occurred())
28080 tmp_type = tstate->exc_type;
28081 tmp_value = tstate->exc_value;
28082 tmp_tb = tstate->exc_traceback;
28083 tstate->exc_type = *type;
28084 tstate->exc_value = *value;
28085 tstate->exc_traceback = *tb;
28086 /* Make sure tstate is in a consistent state when we XDECREF
28087 these objects (XDECREF may run arbitrary code). */
28088 Py_XDECREF(tmp_type);
28089 Py_XDECREF(tmp_value);
28090 Py_XDECREF(tmp_tb);
28094 Py_XDECREF(*value);
28101 static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
28102 const char *name, int exact)
28105 PyErr_Format(PyExc_SystemError, "Missing type object");
28108 if (none_allowed && obj == Py_None) return 1;
28110 if (Py_TYPE(obj) == type) return 1;
28113 if (PyObject_TypeCheck(obj, type)) return 1;
28115 PyErr_Format(PyExc_TypeError,
28116 "Argument '%s' has incorrect type (expected %s, got %s)",
28117 name, type->tp_name, Py_TYPE(obj)->tp_name);
28121 static INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
28122 PyThreadState *tstate = PyThreadState_GET();
28123 *type = tstate->exc_type;
28124 *value = tstate->exc_value;
28125 *tb = tstate->exc_traceback;
28127 Py_XINCREF(*value);
28131 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
28132 PyObject *tmp_type, *tmp_value, *tmp_tb;
28133 PyThreadState *tstate = PyThreadState_GET();
28134 tmp_type = tstate->exc_type;
28135 tmp_value = tstate->exc_value;
28136 tmp_tb = tstate->exc_traceback;
28137 tstate->exc_type = type;
28138 tstate->exc_value = value;
28139 tstate->exc_traceback = tb;
28140 Py_XDECREF(tmp_type);
28141 Py_XDECREF(tmp_value);
28142 Py_XDECREF(tmp_tb);
28145 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
28146 PyObject *__import__ = 0;
28147 PyObject *empty_list = 0;
28148 PyObject *module = 0;
28149 PyObject *global_dict = 0;
28150 PyObject *empty_dict = 0;
28152 __import__ = __Pyx_GetAttrString(__pyx_b, "__import__");
28158 empty_list = PyList_New(0);
28163 global_dict = PyModule_GetDict(__pyx_m);
28166 empty_dict = PyDict_New();
28169 module = PyObject_CallFunctionObjArgs(__import__,
28170 name, global_dict, empty_dict, list, NULL);
28172 Py_XDECREF(empty_list);
28173 Py_XDECREF(__import__);
28174 Py_XDECREF(empty_dict);
28178 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
28180 result = PyObject_GetAttr(dict, name);
28182 PyErr_SetObject(PyExc_NameError, name);
28186 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
28190 /* First, check the traceback argument, replacing None with NULL. */
28191 if (tb == Py_None) {
28195 else if (tb != NULL && !PyTraceBack_Check(tb)) {
28196 PyErr_SetString(PyExc_TypeError,
28197 "raise: arg 3 must be a traceback or None");
28200 /* Next, replace a missing value with None */
28201 if (value == NULL) {
28205 #if PY_VERSION_HEX < 0x02050000
28206 if (!PyClass_Check(type))
28208 if (!PyType_Check(type))
28211 /* Raising an instance. The value should be a dummy. */
28212 if (value != Py_None) {
28213 PyErr_SetString(PyExc_TypeError,
28214 "instance exception may not have a separate value");
28217 /* Normalize to raise <class>, <instance> */
28220 #if PY_VERSION_HEX < 0x02050000
28221 if (PyInstance_Check(type)) {
28222 type = (PyObject*) ((PyInstanceObject*)type)->in_class;
28227 PyErr_SetString(PyExc_TypeError,
28228 "raise: exception must be an old-style class or instance");
28232 type = (PyObject*) Py_TYPE(type);
28234 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
28235 PyErr_SetString(PyExc_TypeError,
28236 "raise: exception class must be a subclass of BaseException");
28241 __Pyx_ErrRestore(type, value, tb);
28250 static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
28251 PyObject *tmp_type, *tmp_value, *tmp_tb;
28252 PyThreadState *tstate = PyThreadState_GET();
28254 #if PY_MAJOR_VERSION >= 3
28255 /* Note: this is a temporary work-around to prevent crashes in Python 3.0 */
28256 if ((tstate->exc_type != NULL) & (tstate->exc_type != Py_None)) {
28257 tmp_type = tstate->exc_type;
28258 tmp_value = tstate->exc_value;
28259 tmp_tb = tstate->exc_traceback;
28260 PyErr_NormalizeException(&type, &value, &tb);
28261 PyErr_NormalizeException(&tmp_type, &tmp_value, &tmp_tb);
28262 tstate->exc_type = 0;
28263 tstate->exc_value = 0;
28264 tstate->exc_traceback = 0;
28265 PyException_SetContext(value, tmp_value);
28266 Py_DECREF(tmp_type);
28267 Py_XDECREF(tmp_tb);
28271 tmp_type = tstate->curexc_type;
28272 tmp_value = tstate->curexc_value;
28273 tmp_tb = tstate->curexc_traceback;
28274 tstate->curexc_type = type;
28275 tstate->curexc_value = value;
28276 tstate->curexc_traceback = tb;
28277 Py_XDECREF(tmp_type);
28278 Py_XDECREF(tmp_value);
28279 Py_XDECREF(tmp_tb);
28282 static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
28283 PyThreadState *tstate = PyThreadState_GET();
28284 *type = tstate->curexc_type;
28285 *value = tstate->curexc_value;
28286 *tb = tstate->curexc_traceback;
28288 tstate->curexc_type = 0;
28289 tstate->curexc_value = 0;
28290 tstate->curexc_traceback = 0;
28294 static PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
28295 PyObject *r = PyObject_GetAttr(o, n);
28297 if (!PyErr_ExceptionMatches(PyExc_AttributeError))
28308 static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
28309 if (sizeof(unsigned char) < sizeof(long)) {
28310 long val = __Pyx_PyInt_AsLong(x);
28311 if (unlikely(val != (long)(unsigned char)val)) {
28312 if (!unlikely(val == -1 && PyErr_Occurred())) {
28313 PyErr_SetString(PyExc_OverflowError,
28314 (((unsigned char)-1) > ((unsigned char)0) && unlikely(val < 0)) ?
28315 "can't convert negative value to unsigned char" :
28316 "value too large to convert to unsigned char");
28318 return (unsigned char)-1;
28320 return (unsigned char)val;
28322 return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
28325 static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
28326 if (sizeof(unsigned short) < sizeof(long)) {
28327 long val = __Pyx_PyInt_AsLong(x);
28328 if (unlikely(val != (long)(unsigned short)val)) {
28329 if (!unlikely(val == -1 && PyErr_Occurred())) {
28330 PyErr_SetString(PyExc_OverflowError,
28331 (((unsigned short)-1) > ((unsigned short)0) && unlikely(val < 0)) ?
28332 "can't convert negative value to unsigned short" :
28333 "value too large to convert to unsigned short");
28335 return (unsigned short)-1;
28337 return (unsigned short)val;
28339 return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
28342 static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
28343 if (sizeof(unsigned int) < sizeof(long)) {
28344 long val = __Pyx_PyInt_AsLong(x);
28345 if (unlikely(val != (long)(unsigned int)val)) {
28346 if (!unlikely(val == -1 && PyErr_Occurred())) {
28347 PyErr_SetString(PyExc_OverflowError,
28348 (((unsigned int)-1) > ((unsigned int)0) && unlikely(val < 0)) ?
28349 "can't convert negative value to unsigned int" :
28350 "value too large to convert to unsigned int");
28352 return (unsigned int)-1;
28354 return (unsigned int)val;
28356 return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
28359 static INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
28360 if (sizeof(char) < sizeof(long)) {
28361 long val = __Pyx_PyInt_AsLong(x);
28362 if (unlikely(val != (long)(char)val)) {
28363 if (!unlikely(val == -1 && PyErr_Occurred())) {
28364 PyErr_SetString(PyExc_OverflowError,
28365 (((char)-1) > ((char)0) && unlikely(val < 0)) ?
28366 "can't convert negative value to char" :
28367 "value too large to convert to char");
28373 return (char)__Pyx_PyInt_AsLong(x);
28376 static INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
28377 if (sizeof(short) < sizeof(long)) {
28378 long val = __Pyx_PyInt_AsLong(x);
28379 if (unlikely(val != (long)(short)val)) {
28380 if (!unlikely(val == -1 && PyErr_Occurred())) {
28381 PyErr_SetString(PyExc_OverflowError,
28382 (((short)-1) > ((short)0) && unlikely(val < 0)) ?
28383 "can't convert negative value to short" :
28384 "value too large to convert to short");
28390 return (short)__Pyx_PyInt_AsLong(x);
28393 static INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
28394 if (sizeof(int) < sizeof(long)) {
28395 long val = __Pyx_PyInt_AsLong(x);
28396 if (unlikely(val != (long)(int)val)) {
28397 if (!unlikely(val == -1 && PyErr_Occurred())) {
28398 PyErr_SetString(PyExc_OverflowError,
28399 (((int)-1) > ((int)0) && unlikely(val < 0)) ?
28400 "can't convert negative value to int" :
28401 "value too large to convert to int");
28407 return (int)__Pyx_PyInt_AsLong(x);
28410 static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
28411 if (sizeof(signed char) < sizeof(long)) {
28412 long val = __Pyx_PyInt_AsLong(x);
28413 if (unlikely(val != (long)(signed char)val)) {
28414 if (!unlikely(val == -1 && PyErr_Occurred())) {
28415 PyErr_SetString(PyExc_OverflowError,
28416 (((signed char)-1) > ((signed char)0) && unlikely(val < 0)) ?
28417 "can't convert negative value to signed char" :
28418 "value too large to convert to signed char");
28420 return (signed char)-1;
28422 return (signed char)val;
28424 return (signed char)__Pyx_PyInt_AsSignedLong(x);
28427 static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
28428 if (sizeof(signed short) < sizeof(long)) {
28429 long val = __Pyx_PyInt_AsLong(x);
28430 if (unlikely(val != (long)(signed short)val)) {
28431 if (!unlikely(val == -1 && PyErr_Occurred())) {
28432 PyErr_SetString(PyExc_OverflowError,
28433 (((signed short)-1) > ((signed short)0) && unlikely(val < 0)) ?
28434 "can't convert negative value to signed short" :
28435 "value too large to convert to signed short");
28437 return (signed short)-1;
28439 return (signed short)val;
28441 return (signed short)__Pyx_PyInt_AsSignedLong(x);
28444 static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
28445 if (sizeof(signed int) < sizeof(long)) {
28446 long val = __Pyx_PyInt_AsLong(x);
28447 if (unlikely(val != (long)(signed int)val)) {
28448 if (!unlikely(val == -1 && PyErr_Occurred())) {
28449 PyErr_SetString(PyExc_OverflowError,
28450 (((signed int)-1) > ((signed int)0) && unlikely(val < 0)) ?
28451 "can't convert negative value to signed int" :
28452 "value too large to convert to signed int");
28454 return (signed int)-1;
28456 return (signed int)val;
28458 return (signed int)__Pyx_PyInt_AsSignedLong(x);
28461 static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
28462 #if PY_VERSION_HEX < 0x03000000
28463 if (likely(PyInt_Check(x))) {
28464 long val = PyInt_AS_LONG(x);
28465 if (((unsigned long)-1) > ((unsigned long)0) && unlikely(val < 0)) {
28466 PyErr_SetString(PyExc_OverflowError,
28467 "can't convert negative value to unsigned long");
28468 return (unsigned long)-1;
28470 return (unsigned long)val;
28473 if (likely(PyLong_Check(x))) {
28474 if (((unsigned long)-1) > ((unsigned long)0) && unlikely(Py_SIZE(x) < 0)) {
28475 PyErr_SetString(PyExc_OverflowError,
28476 "can't convert negative value to unsigned long");
28477 return (unsigned long)-1;
28479 return (((unsigned long)-1) < ((unsigned long)0)) ?
28481 PyLong_AsUnsignedLong(x);
28484 PyObject *tmp = __Pyx_PyNumber_Int(x);
28485 if (!tmp) return (unsigned long)-1;
28486 val = __Pyx_PyInt_AsUnsignedLong(tmp);
28492 static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
28493 #if PY_VERSION_HEX < 0x03000000
28494 if (likely(PyInt_Check(x))) {
28495 long val = PyInt_AS_LONG(x);
28496 if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(val < 0)) {
28497 PyErr_SetString(PyExc_OverflowError,
28498 "can't convert negative value to unsigned PY_LONG_LONG");
28499 return (unsigned PY_LONG_LONG)-1;
28501 return (unsigned PY_LONG_LONG)val;
28504 if (likely(PyLong_Check(x))) {
28505 if (((unsigned PY_LONG_LONG)-1) > ((unsigned PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
28506 PyErr_SetString(PyExc_OverflowError,
28507 "can't convert negative value to unsigned PY_LONG_LONG");
28508 return (unsigned PY_LONG_LONG)-1;
28510 return (((unsigned PY_LONG_LONG)-1) < ((unsigned PY_LONG_LONG)0)) ?
28511 PyLong_AsLongLong(x) :
28512 PyLong_AsUnsignedLongLong(x);
28514 unsigned PY_LONG_LONG val;
28515 PyObject *tmp = __Pyx_PyNumber_Int(x);
28516 if (!tmp) return (unsigned PY_LONG_LONG)-1;
28517 val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
28523 static INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
28524 #if PY_VERSION_HEX < 0x03000000
28525 if (likely(PyInt_Check(x))) {
28526 long val = PyInt_AS_LONG(x);
28527 if (((long)-1) > ((long)0) && unlikely(val < 0)) {
28528 PyErr_SetString(PyExc_OverflowError,
28529 "can't convert negative value to long");
28535 if (likely(PyLong_Check(x))) {
28536 if (((long)-1) > ((long)0) && unlikely(Py_SIZE(x) < 0)) {
28537 PyErr_SetString(PyExc_OverflowError,
28538 "can't convert negative value to long");
28541 return (((long)-1) < ((long)0)) ?
28543 PyLong_AsUnsignedLong(x);
28546 PyObject *tmp = __Pyx_PyNumber_Int(x);
28547 if (!tmp) return (long)-1;
28548 val = __Pyx_PyInt_AsLong(tmp);
28554 static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
28555 #if PY_VERSION_HEX < 0x03000000
28556 if (likely(PyInt_Check(x))) {
28557 long val = PyInt_AS_LONG(x);
28558 if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(val < 0)) {
28559 PyErr_SetString(PyExc_OverflowError,
28560 "can't convert negative value to PY_LONG_LONG");
28561 return (PY_LONG_LONG)-1;
28563 return (PY_LONG_LONG)val;
28566 if (likely(PyLong_Check(x))) {
28567 if (((PY_LONG_LONG)-1) > ((PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
28568 PyErr_SetString(PyExc_OverflowError,
28569 "can't convert negative value to PY_LONG_LONG");
28570 return (PY_LONG_LONG)-1;
28572 return (((PY_LONG_LONG)-1) < ((PY_LONG_LONG)0)) ?
28573 PyLong_AsLongLong(x) :
28574 PyLong_AsUnsignedLongLong(x);
28577 PyObject *tmp = __Pyx_PyNumber_Int(x);
28578 if (!tmp) return (PY_LONG_LONG)-1;
28579 val = __Pyx_PyInt_AsLongLong(tmp);
28585 static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
28586 #if PY_VERSION_HEX < 0x03000000
28587 if (likely(PyInt_Check(x))) {
28588 long val = PyInt_AS_LONG(x);
28589 if (((signed long)-1) > ((signed long)0) && unlikely(val < 0)) {
28590 PyErr_SetString(PyExc_OverflowError,
28591 "can't convert negative value to signed long");
28592 return (signed long)-1;
28594 return (signed long)val;
28597 if (likely(PyLong_Check(x))) {
28598 if (((signed long)-1) > ((signed long)0) && unlikely(Py_SIZE(x) < 0)) {
28599 PyErr_SetString(PyExc_OverflowError,
28600 "can't convert negative value to signed long");
28601 return (signed long)-1;
28603 return (((signed long)-1) < ((signed long)0)) ?
28605 PyLong_AsUnsignedLong(x);
28608 PyObject *tmp = __Pyx_PyNumber_Int(x);
28609 if (!tmp) return (signed long)-1;
28610 val = __Pyx_PyInt_AsSignedLong(tmp);
28616 static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
28617 #if PY_VERSION_HEX < 0x03000000
28618 if (likely(PyInt_Check(x))) {
28619 long val = PyInt_AS_LONG(x);
28620 if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(val < 0)) {
28621 PyErr_SetString(PyExc_OverflowError,
28622 "can't convert negative value to signed PY_LONG_LONG");
28623 return (signed PY_LONG_LONG)-1;
28625 return (signed PY_LONG_LONG)val;
28628 if (likely(PyLong_Check(x))) {
28629 if (((signed PY_LONG_LONG)-1) > ((signed PY_LONG_LONG)0) && unlikely(Py_SIZE(x) < 0)) {
28630 PyErr_SetString(PyExc_OverflowError,
28631 "can't convert negative value to signed PY_LONG_LONG");
28632 return (signed PY_LONG_LONG)-1;
28634 return (((signed PY_LONG_LONG)-1) < ((signed PY_LONG_LONG)0)) ?
28635 PyLong_AsLongLong(x) :
28636 PyLong_AsUnsignedLongLong(x);
28638 signed PY_LONG_LONG val;
28639 PyObject *tmp = __Pyx_PyNumber_Int(x);
28640 if (!tmp) return (signed PY_LONG_LONG)-1;
28641 val = __Pyx_PyInt_AsSignedLongLong(tmp);
28647 static void __Pyx_WriteUnraisable(const char *name) {
28648 PyObject *old_exc, *old_val, *old_tb;
28650 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
28651 #if PY_MAJOR_VERSION < 3
28652 ctx = PyString_FromString(name);
28654 ctx = PyUnicode_FromString(name);
28656 __Pyx_ErrRestore(old_exc, old_val, old_tb);
28658 PyErr_WriteUnraisable(Py_None);
28660 PyErr_WriteUnraisable(ctx);
28665 #ifndef __PYX_HAVE_RT_ImportType
28666 #define __PYX_HAVE_RT_ImportType
28667 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
28670 PyObject *py_module = 0;
28671 PyObject *result = 0;
28672 PyObject *py_name = 0;
28674 py_module = __Pyx_ImportModule(module_name);
28677 #if PY_MAJOR_VERSION < 3
28678 py_name = PyString_FromString(class_name);
28680 py_name = PyUnicode_FromString(class_name);
28684 result = PyObject_GetAttr(py_module, py_name);
28685 Py_DECREF(py_name);
28687 Py_DECREF(py_module);
28691 if (!PyType_Check(result)) {
28692 PyErr_Format(PyExc_TypeError,
28693 "%s.%s is not a type object",
28694 module_name, class_name);
28697 if (((PyTypeObject *)result)->tp_basicsize != size) {
28698 PyErr_Format(PyExc_ValueError,
28699 "%s.%s does not appear to be the correct type object",
28700 module_name, class_name);
28703 return (PyTypeObject *)result;
28705 Py_XDECREF(py_module);
28706 Py_XDECREF(result);
28711 #ifndef __PYX_HAVE_RT_ImportModule
28712 #define __PYX_HAVE_RT_ImportModule
28713 static PyObject *__Pyx_ImportModule(const char *name) {
28714 PyObject *py_name = 0;
28715 PyObject *py_module = 0;
28717 #if PY_MAJOR_VERSION < 3
28718 py_name = PyString_FromString(name);
28720 py_name = PyUnicode_FromString(name);
28724 py_module = PyImport_Import(py_name);
28725 Py_DECREF(py_name);
28728 Py_XDECREF(py_name);
28733 #include "compile.h"
28734 #include "frameobject.h"
28735 #include "traceback.h"
28737 static void __Pyx_AddTraceback(const char *funcname) {
28738 PyObject *py_srcfile = 0;
28739 PyObject *py_funcname = 0;
28740 PyObject *py_globals = 0;
28741 PyCodeObject *py_code = 0;
28742 PyFrameObject *py_frame = 0;
28744 #if PY_MAJOR_VERSION < 3
28745 py_srcfile = PyString_FromString(__pyx_filename);
28747 py_srcfile = PyUnicode_FromString(__pyx_filename);
28749 if (!py_srcfile) goto bad;
28750 if (__pyx_clineno) {
28751 #if PY_MAJOR_VERSION < 3
28752 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
28754 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
28758 #if PY_MAJOR_VERSION < 3
28759 py_funcname = PyString_FromString(funcname);
28761 py_funcname = PyUnicode_FromString(funcname);
28764 if (!py_funcname) goto bad;
28765 py_globals = PyModule_GetDict(__pyx_m);
28766 if (!py_globals) goto bad;
28767 py_code = PyCode_New(
28768 0, /*int argcount,*/
28769 #if PY_MAJOR_VERSION >= 3
28770 0, /*int kwonlyargcount,*/
28772 0, /*int nlocals,*/
28773 0, /*int stacksize,*/
28775 __pyx_empty_bytes, /*PyObject *code,*/
28776 __pyx_empty_tuple, /*PyObject *consts,*/
28777 __pyx_empty_tuple, /*PyObject *names,*/
28778 __pyx_empty_tuple, /*PyObject *varnames,*/
28779 __pyx_empty_tuple, /*PyObject *freevars,*/
28780 __pyx_empty_tuple, /*PyObject *cellvars,*/
28781 py_srcfile, /*PyObject *filename,*/
28782 py_funcname, /*PyObject *name,*/
28783 __pyx_lineno, /*int firstlineno,*/
28784 __pyx_empty_bytes /*PyObject *lnotab*/
28786 if (!py_code) goto bad;
28787 py_frame = PyFrame_New(
28788 PyThreadState_GET(), /*PyThreadState *tstate,*/
28789 py_code, /*PyCodeObject *code,*/
28790 py_globals, /*PyObject *globals,*/
28791 0 /*PyObject *locals*/
28793 if (!py_frame) goto bad;
28794 py_frame->f_lineno = __pyx_lineno;
28795 PyTraceBack_Here(py_frame);
28797 Py_XDECREF(py_srcfile);
28798 Py_XDECREF(py_funcname);
28799 Py_XDECREF(py_code);
28800 Py_XDECREF(py_frame);
28803 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
28805 #if PY_MAJOR_VERSION < 3
28806 if (t->is_unicode && (!t->is_identifier)) {
28807 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
28808 } else if (t->intern) {
28809 *t->p = PyString_InternFromString(t->s);
28811 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
28813 #else /* Python 3+ has unicode identifiers */
28814 if (t->is_identifier || (t->is_unicode && t->intern)) {
28815 *t->p = PyUnicode_InternFromString(t->s);
28816 } else if (t->is_unicode) {
28817 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
28819 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
28829 /* Type Conversion Functions */
28831 static INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
28832 if (x == Py_True) return 1;
28833 else if ((x == Py_False) | (x == Py_None)) return 0;
28834 else return PyObject_IsTrue(x);
28837 static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
28838 PyNumberMethods *m;
28839 const char *name = NULL;
28840 PyObject *res = NULL;
28841 #if PY_VERSION_HEX < 0x03000000
28842 if (PyInt_Check(x) || PyLong_Check(x))
28844 if (PyLong_Check(x))
28846 return Py_INCREF(x), x;
28847 m = Py_TYPE(x)->tp_as_number;
28848 #if PY_VERSION_HEX < 0x03000000
28849 if (m && m->nb_int) {
28851 res = PyNumber_Int(x);
28853 else if (m && m->nb_long) {
28855 res = PyNumber_Long(x);
28858 if (m && m->nb_int) {
28860 res = PyNumber_Long(x);
28864 #if PY_VERSION_HEX < 0x03000000
28865 if (!PyInt_Check(res) && !PyLong_Check(res)) {
28867 if (!PyLong_Check(res)) {
28869 PyErr_Format(PyExc_TypeError,
28870 "__%s__ returned non-%s (type %.200s)",
28871 name, name, Py_TYPE(res)->tp_name);
28876 else if (!PyErr_Occurred()) {
28877 PyErr_SetString(PyExc_TypeError,
28878 "an integer is required");
28883 static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
28885 PyObject* x = PyNumber_Index(b);
28887 ival = PyInt_AsSsize_t(x);
28892 static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
28893 #if PY_VERSION_HEX < 0x02050000
28894 if (ival <= LONG_MAX)
28895 return PyInt_FromLong((long)ival);
28897 unsigned char *bytes = (unsigned char *) &ival;
28898 int one = 1; int little = (int)*(unsigned char*)&one;
28899 return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
28902 return PyInt_FromSize_t(ival);
28906 static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
28907 unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
28908 if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
28910 } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
28911 PyErr_SetString(PyExc_OverflowError,
28912 "value too large to convert to size_t");
28915 return (size_t)val;
28919 #endif /* Py_PYTHON_H */