-/* Generated by Cython 0.20 on Sun Jan 26 08:01:29 2014 */
+/* Generated by Cython 0.20.1 on Wed Feb 12 09:46:47 2014 */
#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#elif PY_VERSION_HEX < 0x02040000
#error Cython requires Python 2.4+.
#else
-#define CYTHON_ABI "0_20"
+#define CYTHON_ABI "0_20_1"
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
- PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
-#define __Pyx_PyUnicode_Concat(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
- PyNumber_Add(a, b) : PyUnicode_Concat(a, b))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
#else
#if PY_MAJOR_VERSION >= 3
#define PyBoolObject PyLongObject
#endif
-#if PY_VERSION_HEX < 0x03020000
+#if PY_VERSION_HEX < 0x030200A4
typedef long Py_hash_t;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
#define __Pyx_PyInt_AsHash_t PyInt_AsLong
};
/*--- Type declarations ---*/
-struct __pyx_obj_4lxml_5etree__BaseParser;
-struct __pyx_obj_4lxml_5etree__FeedParser;
-struct __pyx_obj_4lxml_5etree_XMLParser;
-struct __pyx_obj_4lxml_5etree_ETCompatXMLParser;
+struct __pyx_obj_4lxml_5etree__TempStore;
+struct __pyx_obj_4lxml_5etree__ExceptionContext;
+struct __pyx_obj_4lxml_5etree__LogEntry;
+struct __pyx_obj_4lxml_5etree__BaseErrorLog;
+struct __pyx_obj_4lxml_5etree__ListErrorLog;
+struct __pyx_obj_4lxml_5etree__ErrorLogContext;
+struct __pyx_obj_4lxml_5etree__ErrorLog;
+struct __pyx_obj_4lxml_5etree__DomainErrorLog;
+struct __pyx_obj_4lxml_5etree__RotatingErrorLog;
+struct __pyx_obj_4lxml_5etree_PyErrorLog;
+struct LxmlDocument;
+struct __pyx_obj_4lxml_5etree_DocInfo;
struct LxmlElement;
struct __pyx_obj_4lxml_5etree___ContentOnlyElement;
+struct __pyx_obj_4lxml_5etree__Comment;
struct __pyx_obj_4lxml_5etree__ProcessingInstruction;
+struct __pyx_obj_4lxml_5etree__Entity;
+struct __pyx_obj_4lxml_5etree_QName;
+struct LxmlElementTree;
+struct __pyx_obj_4lxml_5etree__Attrib;
+struct __pyx_obj_4lxml_5etree__AttribIterator;
+struct LxmlElementTagMatcher;
+struct LxmlElementIterator;
+struct __pyx_obj_4lxml_5etree__MultiTagMatcher;
+struct __pyx_obj_4lxml_5etree__ElementMatchIterator;
+struct __pyx_obj_4lxml_5etree_ElementChildIterator;
+struct __pyx_obj_4lxml_5etree_SiblingsIterator;
+struct __pyx_obj_4lxml_5etree_AncestorsIterator;
+struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator;
+struct __pyx_obj_4lxml_5etree_ElementTextIterator;
+struct __pyx_obj_4lxml_5etree_CDATA;
+struct __pyx_obj_4lxml_5etree__ReadOnlyProxy;
+struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy;
+struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy;
+struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy;
+struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper;
+struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper;
+struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy;
+struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy;
+struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy;
+struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy;
+struct LxmlElementBase;
+struct __pyx_obj_4lxml_5etree_CommentBase;
struct __pyx_obj_4lxml_5etree_PIBase;
-struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction;
-struct __pyx_obj_4lxml_5etree_XMLPullParser;
-struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues;
+struct __pyx_obj_4lxml_5etree_EntityBase;
+struct LxmlElementClassLookup;
+struct LxmlFallbackElementClassLookup;
+struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup;
+struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup;
+struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup;
+struct __pyx_obj_4lxml_5etree_CustomElementClassLookup;
+struct __pyx_obj_4lxml_5etree_PythonElementClassLookup;
struct __pyx_obj_4lxml_5etree__NamespaceRegistry;
+struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry;
+struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup;
struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry;
struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry;
-struct __pyx_obj_4lxml_5etree__FileReaderContext;
-struct __pyx_obj_4lxml_5etree__BaseErrorLog;
-struct LxmlElementTagMatcher;
-struct __pyx_obj_4lxml_5etree_XSLT;
-struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator;
-struct LxmlElementClassLookup;
+struct __pyx_obj_4lxml_5etree__InputDocument;
+struct __pyx_obj_4lxml_5etree_Resolver;
struct __pyx_obj_4lxml_5etree__ResolverRegistry;
+struct __pyx_obj_4lxml_5etree__ResolverContext;
+struct __pyx_obj_4lxml_5etree__ParserDictionaryContext;
+struct __pyx_obj_4lxml_5etree__FileReaderContext;
+struct __pyx_obj_4lxml_5etree__ParserContext;
+struct __pyx_obj_4lxml_5etree__BaseParser;
+struct __pyx_obj_4lxml_5etree__FeedParser;
+struct __pyx_obj_4lxml_5etree_XMLParser;
+struct __pyx_obj_4lxml_5etree_XMLPullParser;
+struct __pyx_obj_4lxml_5etree_ETCompatXMLParser;
+struct __pyx_obj_4lxml_5etree_HTMLParser;
+struct __pyx_obj_4lxml_5etree_HTMLPullParser;
struct __pyx_obj_4lxml_5etree__SaxParserTarget;
+struct __pyx_obj_4lxml_5etree__SaxParserContext;
+struct __pyx_obj_4lxml_5etree__ParseEventsIterator;
struct __pyx_obj_4lxml_5etree_TreeBuilder;
+struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget;
+struct __pyx_obj_4lxml_5etree__TargetParserContext;
+struct __pyx_obj_4lxml_5etree__FilelikeWriter;
+struct __pyx_obj_4lxml_5etree_xmlfile;
+struct __pyx_obj_4lxml_5etree__IncrementalFileWriter;
+struct __pyx_obj_4lxml_5etree__FileWriterElement;
+struct __pyx_obj_4lxml_5etree_iterparse;
+struct __pyx_obj_4lxml_5etree_iterwalk;
+struct __pyx_obj_4lxml_5etree__IDDict;
+struct __pyx_obj_4lxml_5etree_XInclude;
+struct __pyx_obj_4lxml_5etree__BaseContext;
+struct __pyx_obj_4lxml_5etree__ExsltRegExp;
+struct __pyx_obj_4lxml_5etree__ElementUnicodeResult;
+struct __pyx_obj_4lxml_5etree__XPathContext;
struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase;
struct __pyx_obj_4lxml_5etree_XPathElementEvaluator;
struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator;
-struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes;
-struct __pyx_obj_4lxml_5etree__Comment;
-struct __pyx_obj_4lxml_5etree__MultiTagMatcher;
struct __pyx_obj_4lxml_5etree_XPath;
struct __pyx_obj_4lxml_5etree_ETXPath;
-struct LxmlFallbackElementClassLookup;
-struct __pyx_obj_4lxml_5etree_CustomElementClassLookup;
-struct __pyx_obj_4lxml_5etree__IncrementalFileWriter;
-struct __pyx_obj_4lxml_5etree__ReadOnlyProxy;
-struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy;
-struct __pyx_obj_4lxml_5etree_CommentBase;
-struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam;
-struct __pyx_obj_4lxml_5etree__BaseContext;
+struct __pyx_obj_4lxml_5etree__XSLTResolverContext;
+struct __pyx_obj_4lxml_5etree_XSLTAccessControl;
struct __pyx_obj_4lxml_5etree__XSLTContext;
-struct __pyx_obj_4lxml_5etree__DTDElementDecl;
+struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam;
+struct __pyx_obj_4lxml_5etree_XSLT;
+struct __pyx_obj_4lxml_5etree__XSLTResultTree;
+struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction;
struct __pyx_obj_4lxml_5etree_XSLTExtension;
-struct __pyx_obj_4lxml_5etree__ExceptionContext;
-struct __pyx_obj_4lxml_5etree__ResolverContext;
-struct __pyx_obj_4lxml_5etree__ParserContext;
-struct __pyx_obj_4lxml_5etree__SaxParserContext;
-struct __pyx_obj_4lxml_5etree__TargetParserContext;
-struct __pyx_obj_4lxml_5etree_Resolver;
-struct __pyx_obj_4lxml_5etree__XPathContext;
-struct __pyx_obj_4lxml_5etree__ParseEventsIterator;
-struct __pyx_obj_4lxml_5etree__Entity;
-struct __pyx_obj_4lxml_5etree_EntityBase;
-struct __pyx_obj_4lxml_5etree_XInclude;
-struct LxmlDocument;
-struct __pyx_obj_4lxml_5etree__InputDocument;
-struct LxmlElementTree;
-struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy;
-struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup;
struct __pyx_obj_4lxml_5etree__Validator;
-struct __pyx_obj_4lxml_5etree_RelaxNG;
-struct __pyx_obj_4lxml_5etree__LogEntry;
-struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget;
-struct __pyx_obj_4lxml_5etree_CDATA;
-struct __pyx_obj_4lxml_5etree_xmlfile;
struct __pyx_obj_4lxml_5etree__DTDElementContentDecl;
-struct __pyx_obj_4lxml_5etree__ListErrorLog;
-struct __pyx_obj_4lxml_5etree__ErrorLog;
-struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy;
-struct __pyx_obj_4lxml_5etree__XSLTResultTree;
-struct __pyx_obj_4lxml_5etree_ElementTextIterator;
-struct LxmlElementIterator;
-struct LxmlElementBase;
-struct __pyx_obj_4lxml_5etree_PyErrorLog;
-struct __pyx_obj_4lxml_5etree_DTD;
-struct __pyx_obj_4lxml_5etree_iterparse;
-struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements;
-struct __pyx_obj_4lxml_5etree__XSLTResolverContext;
-struct __pyx_obj_4lxml_5etree__ParserDictionaryContext;
-struct __pyx_obj_4lxml_5etree_iterwalk;
-struct __pyx_obj_4lxml_5etree__DomainErrorLog;
-struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup;
-struct __pyx_obj_4lxml_5etree_DocInfo;
struct __pyx_obj_4lxml_5etree__DTDAttributeDecl;
+struct __pyx_obj_4lxml_5etree__DTDElementDecl;
+struct __pyx_obj_4lxml_5etree__DTDEntityDecl;
+struct __pyx_obj_4lxml_5etree_DTD;
+struct __pyx_obj_4lxml_5etree_RelaxNG;
struct __pyx_obj_4lxml_5etree_XMLSchema;
-struct __pyx_obj_4lxml_5etree__ElementMatchIterator;
-struct __pyx_obj_4lxml_5etree_AncestorsIterator;
-struct __pyx_obj_4lxml_5etree_HTMLParser;
-struct __pyx_obj_4lxml_5etree_HTMLPullParser;
-struct __pyx_obj_4lxml_5etree__IDDict;
-struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup;
-struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy;
-struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy;
-struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy;
-struct __pyx_obj_4lxml_5etree__FileWriterElement;
+struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext;
+struct __pyx_obj_4lxml_5etree_Schematron;
struct __pyx_obj_4lxml_5etree__MemDebug;
-struct __pyx_obj_4lxml_5etree__Attrib;
-struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup;
-struct __pyx_obj_4lxml_5etree__ElementUnicodeResult;
-struct __pyx_obj_4lxml_5etree__ExsltRegExp;
-struct __pyx_obj_4lxml_5etree_QName;
+struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues;
+struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes;
+struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements;
struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities;
-struct __pyx_obj_4lxml_5etree__TempStore;
-struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper;
-struct __pyx_obj_4lxml_5etree__FilelikeWriter;
-struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper;
-struct __pyx_obj_4lxml_5etree_Schematron;
-struct __pyx_obj_4lxml_5etree__ErrorLogContext;
-struct __pyx_obj_4lxml_5etree_XSLTAccessControl;
-struct __pyx_obj_4lxml_5etree_SiblingsIterator;
-struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy;
-struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry;
-struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext;
-struct __pyx_obj_4lxml_5etree__DTDEntityDecl;
-struct __pyx_obj_4lxml_5etree__AttribIterator;
-struct __pyx_obj_4lxml_5etree_PythonElementClassLookup;
-struct __pyx_obj_4lxml_5etree_ElementChildIterator;
-struct __pyx_obj_4lxml_5etree__RotatingErrorLog;
struct __pyx_t_4lxml_5etree_qname;
struct __pyx_t_4lxml_5etree__nscache;
typedef struct __pyx_t_4lxml_5etree__nscache __pyx_t_4lxml_5etree__nscache;
*/
typedef xmlNode *(*_node_to_node_function)(xmlNode *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":223
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":220
* c_parent = c_parent.parent
*
* ctypedef struct _nscache: # <<<<<<<<<<<<<<
*/
typedef int (*__pyx_t_4lxml_5etree__register_function)(void *, PyObject *, PyObject *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":300
- * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]
- * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
- * cdef class _BaseParser # <<<<<<<<<<<<<<
- * cdef class QName
- * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":257
+ * @cython.final
+ * @cython.internal
+ * cdef class _TempStore: # <<<<<<<<<<<<<<
+ * cdef list _storage
+ * def __init__(self):
*/
-struct __pyx_obj_4lxml_5etree__BaseParser {
+struct __pyx_obj_4lxml_5etree__TempStore {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__BaseParser *__pyx_vtab;
- struct LxmlElementClassLookup *_class_lookup;
- struct __pyx_obj_4lxml_5etree__ResolverRegistry *_resolvers;
- struct __pyx_obj_4lxml_5etree__ParserContext *_parser_context;
- struct __pyx_obj_4lxml_5etree__ParserContext *_push_parser_context;
- int _parse_options;
- int _for_html;
- int _remove_comments;
- int _remove_pis;
- int _strip_cdata;
- struct __pyx_obj_4lxml_5etree_XMLSchema *_schema;
+ struct __pyx_vtabstruct_4lxml_5etree__TempStore *__pyx_vtab;
+ PyObject *_storage;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":272
+ * # class for temporarily storing exceptions raised in extensions
+ * @cython.internal
+ * cdef class _ExceptionContext: # <<<<<<<<<<<<<<
+ * cdef object _exc_info
+ * cdef void clear(self):
+ */
+struct __pyx_obj_4lxml_5etree__ExceptionContext {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *__pyx_vtab;
+ PyObject *_exc_info;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":39
+ *
+ * @cython.freelist(16)
+ * cdef class _LogEntry: # <<<<<<<<<<<<<<
+ * """A log message entry from an error log.
+ *
+ */
+struct __pyx_obj_4lxml_5etree__LogEntry {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__LogEntry *__pyx_vtab;
+ int domain;
+ int type;
+ int level;
+ int line;
+ int column;
+ PyObject *_message;
PyObject *_filename;
- PyObject *target;
- PyObject *_default_encoding;
- PyObject *_events_to_collect;
+ char *_c_message;
+ xmlChar *_c_filename;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1123
- * ############################################################
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":166
*
- * cdef class _FeedParser(_BaseParser): # <<<<<<<<<<<<<<
- * cdef bint _feed_parser_running
*
+ * cdef class _BaseErrorLog: # <<<<<<<<<<<<<<
+ * cdef _LogEntry _first_error
+ * cdef readonly object last_error
*/
-struct __pyx_obj_4lxml_5etree__FeedParser {
- struct __pyx_obj_4lxml_5etree__BaseParser __pyx_base;
- int _feed_parser_running;
+struct __pyx_obj_4lxml_5etree__BaseErrorLog {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *__pyx_vtab;
+ struct __pyx_obj_4lxml_5etree__LogEntry *_first_error;
+ PyObject *last_error;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1303
- * )
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":256
+ * return message
*
- * cdef class XMLParser(_FeedParser): # <<<<<<<<<<<<<<
- * u"""XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, XMLSchema schema=None, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, target=None, compact=True)
+ * cdef class _ListErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
+ * u"Immutable base version of a list based error log."
+ * cdef list _entries
+ */
+struct __pyx_obj_4lxml_5etree__ListErrorLog {
+ struct __pyx_obj_4lxml_5etree__BaseErrorLog __pyx_base;
+ PyObject *_entries;
+ int _offset;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":373
+ * @cython.final
+ * @cython.internal
+ * cdef class _ErrorLogContext: # <<<<<<<<<<<<<<
+ * """
+ * Error log context for the 'with' statement.
+ */
+struct __pyx_obj_4lxml_5etree__ErrorLogContext {
+ PyObject_HEAD
+ xmlStructuredErrorFunc old_error_func;
+ void *old_error_context;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":382
+ * cdef void* old_error_context
*
+ * cdef class _ErrorLog(_ListErrorLog): # <<<<<<<<<<<<<<
+ * cdef list _logContexts
+ * def __cinit__(self):
*/
-struct __pyx_obj_4lxml_5etree_XMLParser {
- struct __pyx_obj_4lxml_5etree__FeedParser __pyx_base;
+struct __pyx_obj_4lxml_5etree__ErrorLog {
+ struct __pyx_obj_4lxml_5etree__ListErrorLog __pyx_base;
+ PyObject *_logContexts;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1415
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":439
+ * self._entries.append(entry)
*
+ * cdef class _DomainErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
+ * def __init__(self, domains):
+ * _ErrorLog.__init__(self)
+ */
+struct __pyx_obj_4lxml_5etree__DomainErrorLog {
+ struct __pyx_obj_4lxml_5etree__ErrorLog __pyx_base;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":448
+ * _ErrorLog.receive(self, entry)
*
- * cdef class ETCompatXMLParser(XMLParser): # <<<<<<<<<<<<<<
- * u"""ETCompatXMLParser(self, encoding=None, attribute_defaults=False, \
- * dtd_validation=False, load_dtd=False, no_network=True, \
+ * cdef class _RotatingErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
+ * cdef int _max_len
+ * def __init__(self, max_len):
*/
-struct __pyx_obj_4lxml_5etree_ETCompatXMLParser {
- struct __pyx_obj_4lxml_5etree_XMLParser __pyx_base;
+struct __pyx_obj_4lxml_5etree__RotatingErrorLog {
+ struct __pyx_obj_4lxml_5etree__ErrorLog __pyx_base;
+ int _max_len;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":466
+ * del self._entries[:offset]
+ *
+ * cdef class PyErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
+ * u"""PyErrorLog(self, logger_name=None, logger=None)
+ * A global error log that connects to the Python stdlib logging package.
+ */
+struct __pyx_obj_4lxml_5etree_PyErrorLog {
+ struct __pyx_obj_4lxml_5etree__BaseErrorLog __pyx_base;
+ PyObject *level_map;
+ PyObject *_map_level;
+ PyObject *_log;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":298
+ *
+ * # forward declarations
+ * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ] # <<<<<<<<<<<<<<
+ * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
+ * cdef class _BaseParser
+ */
+struct LxmlDocument {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
+ int _ns_counter;
+ PyObject *_prefix_tail;
+ xmlDoc *_c_doc;
+ struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
+};
+
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlDocumentType;
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":488
+ *
+ * @cython.freelist(4)
+ * cdef class DocInfo: # <<<<<<<<<<<<<<
+ * u"Document information provided by parser and DTD."
+ * cdef _Document _doc
+ */
+struct __pyx_obj_4lxml_5etree_DocInfo {
+ PyObject_HEAD
+ struct LxmlDocument *_doc;
};
};
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1578
+ * return []
+ *
+ * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<<
+ * property tag:
+ * def __get__(self):
+ */
+struct __pyx_obj_4lxml_5etree__Comment {
+ struct __pyx_obj_4lxml_5etree___ContentOnlyElement __pyx_base;
+};
+
+
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1586
* return u"<!--%s-->" % self.text
*
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":126
- * self._init()
- *
- * cdef class PIBase(_ProcessingInstruction): # <<<<<<<<<<<<<<
- * u"""All custom Processing Instruction classes must inherit from this one.
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1636
+ * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall
*
+ * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<<
+ * property tag:
+ * def __get__(self):
*/
-struct __pyx_obj_4lxml_5etree_PIBase {
- struct __pyx_obj_4lxml_5etree__ProcessingInstruction __pyx_base;
+struct __pyx_obj_4lxml_5etree__Entity {
+ struct __pyx_obj_4lxml_5etree___ContentOnlyElement __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":849
- * return __findStylesheetByID(doc, id=id)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":301
+ * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
+ * cdef class _BaseParser
+ * cdef class QName # <<<<<<<<<<<<<<
+ * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*)
*
- * cdef class _XSLTProcessingInstruction(PIBase): # <<<<<<<<<<<<<<
- * def parseXSL(self, parser=None):
- * u"""parseXSL(self, parser=None)
*/
-struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction {
- struct __pyx_obj_4lxml_5etree_PIBase __pyx_base;
+struct __pyx_obj_4lxml_5etree_QName {
+ PyObject_HEAD
+ PyObject *text;
+ PyObject *localname;
+ PyObject *namespace;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1386
- *
- *
- * cdef class XMLPullParser(XMLParser): # <<<<<<<<<<<<<<
- * """XMLPullParser(self, events=None, *, tag=None, **kwargs)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1735
*
+ * @cython.freelist(8)
+ * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
+ * object LxmlElementTree ]:
+ * cdef _Document _doc
*/
-struct __pyx_obj_4lxml_5etree_XMLPullParser {
- struct __pyx_obj_4lxml_5etree_XMLParser __pyx_base;
+struct LxmlElementTree {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
+ struct LxmlDocument *_doc;
+ struct LxmlElement *_context_node;
};
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":165
- * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2204
*
- * def itervalues(self): # <<<<<<<<<<<<<<
- * _assertValidDTDNode(self, self._c_node)
- * cdef tree.xmlEnumeration *c_node = self._c_node.tree
+ * @cython.freelist(16)
+ * cdef class _Attrib: # <<<<<<<<<<<<<<
+ * u"""A dict-like proxy for the ``Element.attrib`` property.
+ * """
*/
-struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues {
+struct __pyx_obj_4lxml_5etree__Attrib {
PyObject_HEAD
- xmlEnumeration *__pyx_v_c_node;
- struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self;
+ struct LxmlElement *_element;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":15
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2344
+ * @cython.final
* @cython.internal
- * cdef class _NamespaceRegistry: # <<<<<<<<<<<<<<
- * u"Dictionary-like namespace registry"
- * cdef object _ns_uri
+ * cdef class _AttribIterator: # <<<<<<<<<<<<<<
+ * u"""Attribute iterator - for internal use only!
+ * """
*/
-struct __pyx_obj_4lxml_5etree__NamespaceRegistry {
+struct __pyx_obj_4lxml_5etree__AttribIterator {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry *__pyx_vtab;
- PyObject *_ns_uri;
- PyObject *_ns_uri_utf;
- PyObject *_entries;
- char *_c_ns_uri_utf;
+ struct LxmlElement *_node;
+ xmlAttr *_c_attr;
+ int _keysvalues;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":192
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2385
*
- * @cython.internal
- * cdef class _FunctionNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
- * def __setitem__(self, name, item):
- * if not callable(item):
+ *
+ * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
+ * type LxmlElementTagMatcherType ]:
+ * """
*/
-struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry {
- struct __pyx_obj_4lxml_5etree__NamespaceRegistry __pyx_base;
+struct LxmlElementTagMatcher {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
+ PyObject *_pystrings;
+ int _node_type;
+ char *_href;
+ char *_name;
};
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":207
- * @cython.final
- * @cython.internal
- * cdef class _XPathFunctionNamespaceRegistry(_FunctionNamespaceRegistry): # <<<<<<<<<<<<<<
- * cdef object _prefix
- * cdef bytes _prefix_utf
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2416
+ * self._name = NULL
+ *
+ * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
+ * object LxmlElementIterator, type LxmlElementIteratorType ]:
+ * """
*/
-struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry {
- struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry __pyx_base;
- PyObject *_prefix;
- PyObject *_prefix_utf;
+struct LxmlElementIterator {
+ struct LxmlElementTagMatcher __pyx_base;
+ struct LxmlElement *_node;
+ _node_to_node_function _next_element;
};
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":252
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2453
* @cython.final
* @cython.internal
- * cdef class _FileReaderContext: # <<<<<<<<<<<<<<
- * cdef object _filelike
- * cdef object _encoding
+ * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<<
+ * """
+ * Match an xmlNode against a list of tags.
*/
-struct __pyx_obj_4lxml_5etree__FileReaderContext {
+struct __pyx_obj_4lxml_5etree__MultiTagMatcher {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext *__pyx_vtab;
- PyObject *_filelike;
- PyObject *_encoding;
- PyObject *_url;
- PyObject *_bytes;
- struct __pyx_obj_4lxml_5etree__ExceptionContext *_exc_context;
- Py_ssize_t _bytes_read;
- char *_c_url;
- int _close_file_after_read;
+ struct __pyx_vtabstruct_4lxml_5etree__MultiTagMatcher *__pyx_vtab;
+ PyObject *_py_tags;
+ struct __pyx_t_4lxml_5etree_qname *_cached_tags;
+ size_t _tag_count;
+ size_t _cached_size;
+ struct LxmlDocument *_cached_doc;
+ int _node_types;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":166
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2594
+ * return False
*
- * cdef class _BaseErrorLog: # <<<<<<<<<<<<<<
- * cdef _LogEntry _first_error
- * cdef readonly object last_error
+ * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<<
+ * cdef _Element _node
+ * cdef _node_to_node_function _next_element
*/
-struct __pyx_obj_4lxml_5etree__BaseErrorLog {
+struct __pyx_obj_4lxml_5etree__ElementMatchIterator {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *__pyx_vtab;
- struct __pyx_obj_4lxml_5etree__LogEntry *_first_error;
- PyObject *last_error;
+ struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator *__pyx_vtab;
+ struct LxmlElement *_node;
+ _node_to_node_function _next_element;
+ struct __pyx_obj_4lxml_5etree__MultiTagMatcher *_matcher;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2385
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2623
+ * return current_node
*
- * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
- * type LxmlElementTagMatcherType ]:
- * """
+ * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
+ * u"""ElementChildIterator(self, node, tag=None, reversed=False)
+ * Iterates over the children of an element.
*/
-struct LxmlElementTagMatcher {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
- PyObject *_pystrings;
- int _node_type;
- char *_href;
- char *_name;
+struct __pyx_obj_4lxml_5etree_ElementChildIterator {
+ struct __pyx_obj_4lxml_5etree__ElementMatchIterator __pyx_base;
};
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":334
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2643
+ * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None
*
- * @cython.no_gc_clear
- * cdef class XSLT: # <<<<<<<<<<<<<<
- * u"""XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)
+ * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
+ * u"""SiblingsIterator(self, node, tag=None, preceding=False)
+ * Iterates over the siblings of an element.
+ */
+struct __pyx_obj_4lxml_5etree_SiblingsIterator {
+ struct __pyx_obj_4lxml_5etree__ElementMatchIterator __pyx_base;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2658
+ * self._storeNext(node)
*
+ * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
+ * u"""AncestorsIterator(self, node, tag=None)
+ * Iterates over the ancestors of an element (from parent to parent).
*/
-struct __pyx_obj_4lxml_5etree_XSLT {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree_XSLT *__pyx_vtab;
- struct __pyx_obj_4lxml_5etree__XSLTContext *_context;
- xsltStylesheet *_c_style;
- struct __pyx_obj_4lxml_5etree__XSLTResolverContext *_xslt_resolver_context;
- struct __pyx_obj_4lxml_5etree_XSLTAccessControl *_access_control;
- struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
+struct __pyx_obj_4lxml_5etree_AncestorsIterator {
+ struct __pyx_obj_4lxml_5etree__ElementMatchIterator __pyx_base;
};
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":214
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2744
+ * return NULL
*
- * # class to store element class lookup functions
- * cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<
- * object LxmlElementClassLookup ]:
- * u"""ElementClassLookup(self)
+ * cdef class ElementTextIterator: # <<<<<<<<<<<<<<
+ * u"""ElementTextIterator(self, element, tag=None, with_tail=True)
+ * Iterates over the text content of a subtree.
*/
-struct LxmlElementClassLookup {
+struct __pyx_obj_4lxml_5etree_ElementTextIterator {
PyObject_HEAD
- _element_class_lookup_function _lookup_function;
+ PyObject *_nextEvent;
+ struct LxmlElement *_start_element;
};
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementClassLookupType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":113
- * @cython.final
- * @cython.internal
- * cdef class _ResolverRegistry: # <<<<<<<<<<<<<<
- * cdef object _resolvers
- * cdef Resolver _default_resolver
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2856
+ *
+ * @cython.freelist(8)
+ * cdef class CDATA: # <<<<<<<<<<<<<<
+ * u"""CDATA(data)
+ *
*/
-struct __pyx_obj_4lxml_5etree__ResolverRegistry {
+struct __pyx_obj_4lxml_5etree_CDATA {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry *__pyx_vtab;
- PyObject *_resolvers;
- struct __pyx_obj_4lxml_5etree_Resolver *_default_resolver;
+ PyObject *_utf8_data;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":41
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":4
*
- * cdef class _SaxParserTarget: # <<<<<<<<<<<<<<
- * cdef int _sax_event_filter
- * def __cinit__(self):
+ * @cython.internal
+ * cdef class _ReadOnlyProxy: # <<<<<<<<<<<<<<
+ * u"A read-only proxy class suitable for PIs/Comments (for internal use only!)."
+ * cdef bint _free_after_use
*/
-struct __pyx_obj_4lxml_5etree__SaxParserTarget {
+struct __pyx_obj_4lxml_5etree__ReadOnlyProxy {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *__pyx_vtab;
- int _sax_event_filter;
+ struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *__pyx_vtab;
+ int _free_after_use;
+ xmlNode *_c_node;
+ struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *_source_proxy;
+ PyObject *_dependent_proxies;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":627
- * ############################################################
- *
- * cdef class TreeBuilder(_SaxParserTarget): # <<<<<<<<<<<<<<
- * u"""TreeBuilder(self, element_factory=None, parser=None)
- * Parser target that builds a tree.
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":248
+ * @cython.final
+ * @cython.internal
+ * cdef class _ReadOnlyPIProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"A read-only proxy for processing instructions (for internal use only!)"
+ * property target:
*/
-struct __pyx_obj_4lxml_5etree_TreeBuilder {
- struct __pyx_obj_4lxml_5etree__SaxParserTarget __pyx_base;
- struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
- PyObject *_factory;
- PyObject *_data;
- PyObject *_element_stack;
- PyObject *_element_stack_pop;
- struct LxmlElement *_last;
- int _in_tail;
+struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":123
- * _XPATH_VERSION_WARNING_REQUIRED = 0
- *
- * cdef class _XPathEvaluatorBase: # <<<<<<<<<<<<<<
- * cdef xpath.xmlXPathContext* _xpathCtxt
- * cdef _XPathContext _context
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":257
+ * @cython.final
+ * @cython.internal
+ * cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"A read-only proxy for entity references (for internal use only!)"
+ * property name:
*/
-struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase *__pyx_vtab;
- xmlXPathContext *_xpathCtxt;
- struct __pyx_obj_4lxml_5etree__XPathContext *_context;
- PyThread_type_lock _eval_lock;
- struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
+struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":249
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":275
*
+ * @cython.internal
+ * cdef class _ReadOnlyElementProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"The main read-only Element proxy class (for internal use only!)."
*
- * cdef class XPathElementEvaluator(_XPathEvaluatorBase): # <<<<<<<<<<<<<<
- * u"""XPathElementEvaluator(self, element, namespaces=None, extensions=None, regexp=True, smart_strings=True)
- * Create an XPath evaluator for an element.
*/
-struct __pyx_obj_4lxml_5etree_XPathElementEvaluator {
- struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase __pyx_base;
- struct LxmlElement *_element;
+struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":326
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":365
*
- * cdef class XPathDocumentEvaluator(XPathElementEvaluator): # <<<<<<<<<<<<<<
- * u"""XPathDocumentEvaluator(self, etree, namespaces=None, extensions=None, regexp=True, smart_strings=True)
- * Create an XPath evaluator for an ElementTree.
+ * @cython.internal
+ * cdef class _OpaqueNodeWrapper: # <<<<<<<<<<<<<<
+ * cdef tree.xmlNode* _c_node
+ * def __init__(self):
*/
-struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator {
- struct __pyx_obj_4lxml_5etree_XPathElementEvaluator __pyx_base;
+struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper {
+ PyObject_HEAD
+ xmlNode *_c_node;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":225
- * return None
- *
- * def iterattributes(self): # <<<<<<<<<<<<<<
- * _assertValidDTDNode(self, self._c_node)
- * cdef tree.xmlAttribute *c_node = self._c_node.attributes
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":372
+ * @cython.final
+ * @cython.internal
+ * cdef class _OpaqueDocumentWrapper(_OpaqueNodeWrapper): # <<<<<<<<<<<<<<
+ * cdef int _assertNode(self) except -1:
+ * u"""This is our way of saying: this proxy is invalid!
*/
-struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes {
- PyObject_HEAD
- xmlAttribute *__pyx_v_c_node;
- struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_node;
- struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_self;
+struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper {
+ struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper __pyx_base;
+ struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper *__pyx_vtab;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1578
- * return []
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":416
*
- * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<<
- * property tag:
- * def __get__(self):
+ * @cython.internal
+ * cdef class _ModifyContentOnlyProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"""A read-only proxy that allows changing the text content.
+ * """
*/
-struct __pyx_obj_4lxml_5etree__Comment {
- struct __pyx_obj_4lxml_5etree___ContentOnlyElement __pyx_base;
+struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2453
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":439
* @cython.final
* @cython.internal
- * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<<
- * """
- * Match an xmlNode against a list of tags.
+ * cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
+ * u"""A read-only proxy that allows changing the text/target content of a
+ * processing instruction.
*/
-struct __pyx_obj_4lxml_5etree__MultiTagMatcher {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__MultiTagMatcher *__pyx_vtab;
- PyObject *_py_tags;
- struct __pyx_t_4lxml_5etree_qname *_cached_tags;
- size_t _tag_count;
- size_t _cached_size;
- struct LxmlDocument *_cached_doc;
- int _node_types;
+struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy {
+ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":405
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":456
+ * @cython.final
+ * @cython.internal
+ * cdef class _ModifyContentOnlyEntityProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
+ * u"A read-only proxy for entity references (for internal use only!)"
+ * property name:
+ */
+struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy {
+ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":472
+ * @cython.final
+ * @cython.internal
+ * cdef class _AppendOnlyElementProxy(_ReadOnlyElementProxy): # <<<<<<<<<<<<<<
+ * u"""A read-only element that allows adding children and changing the
+ * text content (i.e. everything that adds to the subtree).
+ */
+struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy __pyx_base;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":6
+ * # Custom Element classes
*
+ * cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<
+ * object LxmlElementBase ]:
+ * u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)
+ */
+struct LxmlElementBase {
+ struct LxmlElement __pyx_base;
+};
+
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementBaseType;
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":97
+ * raise TypeError, "Invalid child type: %r" % type(child)
+ *
+ * cdef class CommentBase(_Comment): # <<<<<<<<<<<<<<
+ * u"""All custom Comment classes must inherit from this one.
*
- * cdef class XPath(_XPathEvaluatorBase): # <<<<<<<<<<<<<<
- * u"""XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True)
- * A compiled XPath expression that can be called on Elements and ElementTrees.
*/
-struct __pyx_obj_4lxml_5etree_XPath {
- struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase __pyx_base;
- xmlXPathCompExpr *_xpath;
- PyObject *_path;
+struct __pyx_obj_4lxml_5etree_CommentBase {
+ struct __pyx_obj_4lxml_5etree__Comment __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":481
- * _find_namespaces = re.compile(b'({[^}]+})').findall
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":126
+ * self._init()
+ *
+ * cdef class PIBase(_ProcessingInstruction): # <<<<<<<<<<<<<<
+ * u"""All custom Processing Instruction classes must inherit from this one.
*
- * cdef class ETXPath(XPath): # <<<<<<<<<<<<<<
- * u"""ETXPath(self, path, extensions=None, regexp=True, smart_strings=True)
- * Special XPath class that supports the ElementTree {uri} notation for namespaces.
*/
-struct __pyx_obj_4lxml_5etree_ETXPath {
- struct __pyx_obj_4lxml_5etree_XPath __pyx_base;
+struct __pyx_obj_4lxml_5etree_PIBase {
+ struct __pyx_obj_4lxml_5etree__ProcessingInstruction __pyx_base;
};
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":157
+ * self._init()
+ *
+ * cdef class EntityBase(_Entity): # <<<<<<<<<<<<<<
+ * u"""All custom Entity classes must inherit from this one.
+ *
+ */
+struct __pyx_obj_4lxml_5etree_EntityBase {
+ struct __pyx_obj_4lxml_5etree__Entity __pyx_base;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":214
+ *
+ * # class to store element class lookup functions
+ * cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<
+ * object LxmlElementClassLookup ]:
+ * u"""ElementClassLookup(self)
+ */
+struct LxmlElementClassLookup {
+ PyObject_HEAD
+ _element_class_lookup_function _lookup_function;
+};
+
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementClassLookupType;
+
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":223
* self._lookup_function = NULL # use default lookup
*
__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":265
+ * # default lookup scheme
+ *
+ * cdef class ElementDefaultClassLookup(ElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""ElementDefaultClassLookup(self, element=None, comment=None, pi=None, entity=None)
+ * Element class lookup scheme that always returns the default Element
+ */
+struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup {
+ struct LxmlElementClassLookup __pyx_base;
+ PyObject *element_class;
+ PyObject *comment_class;
+ PyObject *pi_class;
+ PyObject *entity_class;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":344
+ * # attribute based lookup scheme
+ *
+ * cdef class AttributeBasedElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None)
+ * Checks an attribute of an Element and looks up the value in a
+ */
+struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup {
+ struct LxmlFallbackElementClassLookup __pyx_base;
+ PyObject *_class_mapping;
+ PyObject *_pytag;
+ const xmlChar *_c_ns;
+ const xmlChar *_c_name;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":396
+ * # per-parser lookup scheme
+ *
+ * cdef class ParserBasedElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""ParserBasedElementClassLookup(self, fallback=None)
+ * Element class lookup based on the XML parser.
+ */
+struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup {
+ struct LxmlFallbackElementClassLookup __pyx_base;
+};
+
+
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":413
* # custom class lookup based on node type, namespace, name
*
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":651
- * @cython.final
- * @cython.internal
- * cdef class _IncrementalFileWriter: # <<<<<<<<<<<<<<
- * cdef tree.xmlOutputBuffer* _c_out
- * cdef bytes _encoding
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":468
+ * # read-only tree based class lookup
+ *
+ * cdef class PythonElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""PythonElementClassLookup(self, fallback=None)
+ * Element class lookup based on a subclass method.
*/
-struct __pyx_obj_4lxml_5etree__IncrementalFileWriter {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter *__pyx_vtab;
- xmlOutputBuffer *_c_out;
- PyObject *_encoding;
- const char *_c_encoding;
- struct __pyx_obj_4lxml_5etree__FilelikeWriter *_target;
- PyObject *_element_stack;
- int _status;
+struct __pyx_obj_4lxml_5etree_PythonElementClassLookup {
+ struct LxmlFallbackElementClassLookup __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":4
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":15
*
* @cython.internal
- * cdef class _ReadOnlyProxy: # <<<<<<<<<<<<<<
- * u"A read-only proxy class suitable for PIs/Comments (for internal use only!)."
- * cdef bint _free_after_use
+ * cdef class _NamespaceRegistry: # <<<<<<<<<<<<<<
+ * u"Dictionary-like namespace registry"
+ * cdef object _ns_uri
*/
-struct __pyx_obj_4lxml_5etree__ReadOnlyProxy {
+struct __pyx_obj_4lxml_5etree__NamespaceRegistry {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *__pyx_vtab;
- int _free_after_use;
- xmlNode *_c_node;
- struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *_source_proxy;
- PyObject *_dependent_proxies;
+ struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry *__pyx_vtab;
+ PyObject *_ns_uri;
+ PyObject *_ns_uri_utf;
+ PyObject *_entries;
+ char *_c_ns_uri_utf;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":275
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":87
+ * @cython.final
* @cython.internal
- * cdef class _ReadOnlyElementProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"The main read-only Element proxy class (for internal use only!)."
- *
+ * cdef class _ClassNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
+ * u"Dictionary-like registry for namespace implementation classes"
+ * def __setitem__(self, name, item):
*/
-struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy {
- struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
+struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry {
+ struct __pyx_obj_4lxml_5etree__NamespaceRegistry __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":97
- * raise TypeError, "Invalid child type: %r" % type(child)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":101
*
- * cdef class CommentBase(_Comment): # <<<<<<<<<<<<<<
- * u"""All custom Comment classes must inherit from this one.
+ *
+ * cdef class ElementNamespaceClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""ElementNamespaceClassLookup(self, fallback=None)
*
*/
-struct __pyx_obj_4lxml_5etree_CommentBase {
- struct __pyx_obj_4lxml_5etree__Comment __pyx_base;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":324
- * @cython.internal
- * @cython.freelist(8)
- * cdef class _XSLTQuotedStringParam: # <<<<<<<<<<<<<<
- * u"""A wrapper class for literal XSLT string parameters that require
- * quote escaping.
- */
-struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam {
- PyObject_HEAD
- PyObject *strval;
+struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup {
+ struct LxmlFallbackElementClassLookup __pyx_base;
+ PyObject *_namespace_registries;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":32
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":192
*
* @cython.internal
- * cdef class _BaseContext: # <<<<<<<<<<<<<<
- * cdef xpath.xmlXPathContext* _xpathCtxt
- * cdef _Document _doc
+ * cdef class _FunctionNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
+ * def __setitem__(self, name, item):
+ * if not callable(item):
*/
-struct __pyx_obj_4lxml_5etree__BaseContext {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__BaseContext *__pyx_vtab;
- xmlXPathContext *_xpathCtxt;
- struct LxmlDocument *_doc;
- PyObject *_extensions;
- PyObject *_namespaces;
- PyObject *_global_namespaces;
- PyObject *_utf_refs;
- PyObject *_function_cache;
- PyObject *_eval_context_dict;
- int _build_smart_strings;
- struct __pyx_obj_4lxml_5etree__TempStore *_temp_refs;
- PyObject *_temp_documents;
- struct __pyx_obj_4lxml_5etree__ExceptionContext *_exc;
- struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
+struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry {
+ struct __pyx_obj_4lxml_5etree__NamespaceRegistry __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":271
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":207
* @cython.final
* @cython.internal
- * cdef class _XSLTContext(_BaseContext): # <<<<<<<<<<<<<<
- * cdef xslt.xsltTransformContext* _xsltCtxt
- * cdef _ReadOnlyElementProxy _extension_element_proxy
+ * cdef class _XPathFunctionNamespaceRegistry(_FunctionNamespaceRegistry): # <<<<<<<<<<<<<<
+ * cdef object _prefix
+ * cdef bytes _prefix_utf
*/
-struct __pyx_obj_4lxml_5etree__XSLTContext {
- struct __pyx_obj_4lxml_5etree__BaseContext __pyx_base;
- xsltTransformContext *_xsltCtxt;
- struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *_extension_element_proxy;
- PyObject *_extension_elements;
+struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry {
+ struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry __pyx_base;
+ PyObject *_prefix;
+ PyObject *_prefix_utf;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":179
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":12
+ * @cython.final
* @cython.internal
- * @cython.freelist(8)
- * cdef class _DTDElementDecl: # <<<<<<<<<<<<<<
- * cdef DTD _dtd
- * cdef tree.xmlElement* _c_node
+ * cdef class _InputDocument: # <<<<<<<<<<<<<<
+ * cdef _InputDocumentDataType _type
+ * cdef bytes _data_bytes
*/
-struct __pyx_obj_4lxml_5etree__DTDElementDecl {
+struct __pyx_obj_4lxml_5etree__InputDocument {
PyObject_HEAD
- struct __pyx_obj_4lxml_5etree_DTD *_dtd;
- xmlElement *_c_node;
+ __pyx_t_4lxml_5etree__InputDocumentDataType _type;
+ PyObject *_data_bytes;
+ PyObject *_filename;
+ PyObject *_file;
+ int _close_file;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xsltext.pxi":3
- * # XSLT extension elements
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":23
*
- * cdef class XSLTExtension: # <<<<<<<<<<<<<<
- * u"""Base class of an XSLT extension element.
- * """
+ *
+ * cdef class Resolver: # <<<<<<<<<<<<<<
+ * u"This is the base class of all resolvers."
+ * def resolve(self, system_url, public_id, context):
*/
-struct __pyx_obj_4lxml_5etree_XSLTExtension {
+struct __pyx_obj_4lxml_5etree_Resolver {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *__pyx_vtab;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":272
- * # class for temporarily storing exceptions raised in extensions
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":113
+ * @cython.final
* @cython.internal
- * cdef class _ExceptionContext: # <<<<<<<<<<<<<<
- * cdef object _exc_info
- * cdef void clear(self):
+ * cdef class _ResolverRegistry: # <<<<<<<<<<<<<<
+ * cdef object _resolvers
+ * cdef Resolver _default_resolver
*/
-struct __pyx_obj_4lxml_5etree__ExceptionContext {
+struct __pyx_obj_4lxml_5etree__ResolverRegistry {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *__pyx_vtab;
- PyObject *_exc_info;
+ struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry *__pyx_vtab;
+ PyObject *_resolvers;
+ struct __pyx_obj_4lxml_5etree_Resolver *_default_resolver;
};
};
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":42
+ * @cython.final
+ * @cython.internal
+ * cdef class _ParserDictionaryContext: # <<<<<<<<<<<<<<
+ * # Global parser context to share the string dictionary.
+ * #
+ */
+struct __pyx_obj_4lxml_5etree__ParserDictionaryContext {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext *__pyx_vtab;
+ xmlDict *_c_dict;
+ struct __pyx_obj_4lxml_5etree__BaseParser *_default_parser;
+ PyObject *_implied_parser_contexts;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":253
+ * @cython.final
+ * @cython.internal
+ * cdef class _FileReaderContext: # <<<<<<<<<<<<<<
+ * cdef object _filelike
+ * cdef object _encoding
+ */
+struct __pyx_obj_4lxml_5etree__FileReaderContext {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext *__pyx_vtab;
+ PyObject *_filelike;
+ PyObject *_encoding;
+ PyObject *_url;
+ PyObject *_bytes;
+ struct __pyx_obj_4lxml_5etree__ExceptionContext *_exc_context;
+ Py_ssize_t _bytes_read;
+ char *_c_url;
+ int _close_file_after_read;
+};
+
+
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":6
* from lxml.includes cimport htmlparser
*
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":7
- *
- * cdef class _ParserContext(_ResolverContext)
- * cdef class _SaxParserContext(_ParserContext) # <<<<<<<<<<<<<<
- * cdef class _TargetParserContext(_SaxParserContext)
- * cdef class _ParserSchemaValidationContext
- */
-struct __pyx_obj_4lxml_5etree__SaxParserContext {
- struct __pyx_obj_4lxml_5etree__ParserContext __pyx_base;
- struct __pyx_obj_4lxml_5etree__SaxParserTarget *_target;
- struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
- startElementNsSAX2Func _origSaxStart;
- endElementNsSAX2Func _origSaxEnd;
- startElementSAXFunc _origSaxStartNoNs;
- endElementSAXFunc _origSaxEndNoNs;
- charactersSAXFunc _origSaxData;
- cdataBlockSAXFunc _origSaxCData;
- internalSubsetSAXFunc _origSaxDoctype;
- commentSAXFunc _origSaxComment;
- processingInstructionSAXFunc _origSaxPI;
- startDocumentSAXFunc _origSaxStartDocument;
- int _event_filter;
- PyObject *_ns_stack;
- PyObject *_node_stack;
- struct __pyx_obj_4lxml_5etree__ParseEventsIterator *events_iterator;
- struct LxmlElement *_root;
- struct __pyx_obj_4lxml_5etree__MultiTagMatcher *_matcher;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":8
- * cdef class _ParserContext(_ResolverContext)
- * cdef class _SaxParserContext(_ParserContext)
- * cdef class _TargetParserContext(_SaxParserContext) # <<<<<<<<<<<<<<
- * cdef class _ParserSchemaValidationContext
- * cdef class _Validator
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":300
+ * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]
+ * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
+ * cdef class _BaseParser # <<<<<<<<<<<<<<
+ * cdef class QName
+ * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*)
*/
-struct __pyx_obj_4lxml_5etree__TargetParserContext {
- struct __pyx_obj_4lxml_5etree__SaxParserContext __pyx_base;
- PyObject *_python_target;
+struct __pyx_obj_4lxml_5etree__BaseParser {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__BaseParser *__pyx_vtab;
+ struct LxmlElementClassLookup *_class_lookup;
+ struct __pyx_obj_4lxml_5etree__ResolverRegistry *_resolvers;
+ struct __pyx_obj_4lxml_5etree__ParserContext *_parser_context;
+ struct __pyx_obj_4lxml_5etree__ParserContext *_push_parser_context;
+ int _parse_options;
+ int _for_html;
+ int _remove_comments;
+ int _remove_pis;
+ int _strip_cdata;
+ struct __pyx_obj_4lxml_5etree_XMLSchema *_schema;
+ PyObject *_filename;
+ PyObject *target;
+ PyObject *_default_encoding;
+ PyObject *_events_to_collect;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":23
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1143
+ * ############################################################
*
+ * cdef class _FeedParser(_BaseParser): # <<<<<<<<<<<<<<
+ * cdef bint _feed_parser_running
*
- * cdef class Resolver: # <<<<<<<<<<<<<<
- * u"This is the base class of all resolvers."
- * def resolve(self, system_url, public_id, context):
- */
-struct __pyx_obj_4lxml_5etree_Resolver {
- PyObject_HEAD
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":52
- * @cython.final
- * @cython.internal
- * cdef class _XPathContext(_BaseContext): # <<<<<<<<<<<<<<
- * cdef object _variables
- * def __init__(self, namespaces, extensions, error_log, enable_regexp, variables,
- */
-struct __pyx_obj_4lxml_5etree__XPathContext {
- struct __pyx_obj_4lxml_5etree__BaseContext __pyx_base;
- PyObject *_variables;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":222
- * @cython.final
- * @cython.internal
- * cdef class _ParseEventsIterator: # <<<<<<<<<<<<<<
- * """A reusable parse events iterator"""
- * cdef list _events
*/
-struct __pyx_obj_4lxml_5etree__ParseEventsIterator {
- PyObject_HEAD
- PyObject *_events;
- int _event_index;
+struct __pyx_obj_4lxml_5etree__FeedParser {
+ struct __pyx_obj_4lxml_5etree__BaseParser __pyx_base;
+ int _feed_parser_running;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1636
- * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1359
+ * )
+ *
+ * cdef class XMLParser(_FeedParser): # <<<<<<<<<<<<<<
+ * u"""XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, XMLSchema schema=None, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, target=None, compact=True)
*
- * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<<
- * property tag:
- * def __get__(self):
*/
-struct __pyx_obj_4lxml_5etree__Entity {
- struct __pyx_obj_4lxml_5etree___ContentOnlyElement __pyx_base;
+struct __pyx_obj_4lxml_5etree_XMLParser {
+ struct __pyx_obj_4lxml_5etree__FeedParser __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":157
- * self._init()
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1442
*
- * cdef class EntityBase(_Entity): # <<<<<<<<<<<<<<
- * u"""All custom Entity classes must inherit from this one.
*
- */
-struct __pyx_obj_4lxml_5etree_EntityBase {
- struct __pyx_obj_4lxml_5etree__Entity __pyx_base;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xinclude.pxi":10
- * pass
+ * cdef class XMLPullParser(XMLParser): # <<<<<<<<<<<<<<
+ * """XMLPullParser(self, events=None, *, tag=None, **kwargs)
*
- * cdef class XInclude: # <<<<<<<<<<<<<<
- * u"""XInclude(self)
- * XInclude processor.
*/
-struct __pyx_obj_4lxml_5etree_XInclude {
- PyObject_HEAD
- struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
+struct __pyx_obj_4lxml_5etree_XMLPullParser {
+ struct __pyx_obj_4lxml_5etree_XMLParser __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":298
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1471
*
- * # forward declarations
- * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ] # <<<<<<<<<<<<<<
- * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
- * cdef class _BaseParser
- */
-struct LxmlDocument {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
- int _ns_counter;
- PyObject *_prefix_tail;
- xmlDoc *_c_doc;
- struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
-};
-
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlDocumentType;
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":12
- * @cython.final
- * @cython.internal
- * cdef class _InputDocument: # <<<<<<<<<<<<<<
- * cdef _InputDocumentDataType _type
- * cdef bytes _data_bytes
+ *
+ * cdef class ETCompatXMLParser(XMLParser): # <<<<<<<<<<<<<<
+ * u"""ETCompatXMLParser(self, encoding=None, attribute_defaults=False, \
+ * dtd_validation=False, load_dtd=False, no_network=True, \
*/
-struct __pyx_obj_4lxml_5etree__InputDocument {
- PyObject_HEAD
- __pyx_t_4lxml_5etree__InputDocumentDataType _type;
- PyObject *_data_bytes;
- PyObject *_filename;
- PyObject *_file;
- int _close_file;
+struct __pyx_obj_4lxml_5etree_ETCompatXMLParser {
+ struct __pyx_obj_4lxml_5etree_XMLParser __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1735
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1550
+ * )
*
- * @cython.freelist(8)
- * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
- * object LxmlElementTree ]:
- * cdef _Document _doc
+ * cdef class HTMLParser(_FeedParser): # <<<<<<<<<<<<<<
+ * u"""HTMLParser(self, encoding=None, remove_blank_text=False, \
+ * remove_comments=False, remove_pis=False, strip_cdata=True, \
*/
-struct LxmlElementTree {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
- struct LxmlDocument *_doc;
- struct LxmlElement *_context_node;
+struct __pyx_obj_4lxml_5etree_HTMLParser {
+ struct __pyx_obj_4lxml_5etree__FeedParser __pyx_base;
};
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":416
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1606
+ *
+ *
+ * cdef class HTMLPullParser(HTMLParser): # <<<<<<<<<<<<<<
+ * """HTMLPullParser(self, events=None, *, tag=None, base_url=None, **kwargs)
*
- * @cython.internal
- * cdef class _ModifyContentOnlyProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"""A read-only proxy that allows changing the text content.
- * """
*/
-struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy {
- struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
+struct __pyx_obj_4lxml_5etree_HTMLPullParser {
+ struct __pyx_obj_4lxml_5etree_HTMLParser __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":396
- * # per-parser lookup scheme
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":41
*
- * cdef class ParserBasedElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""ParserBasedElementClassLookup(self, fallback=None)
- * Element class lookup based on the XML parser.
+ *
+ * cdef class _SaxParserTarget: # <<<<<<<<<<<<<<
+ * cdef int _sax_event_filter
+ * def __cinit__(self):
*/
-struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup {
- struct LxmlFallbackElementClassLookup __pyx_base;
+struct __pyx_obj_4lxml_5etree__SaxParserTarget {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *__pyx_vtab;
+ int _sax_event_filter;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":10
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":7
+ *
+ * cdef class _ParserContext(_ResolverContext)
+ * cdef class _SaxParserContext(_ParserContext) # <<<<<<<<<<<<<<
* cdef class _TargetParserContext(_SaxParserContext)
* cdef class _ParserSchemaValidationContext
- * cdef class _Validator # <<<<<<<<<<<<<<
- * cdef class XMLSchema(_Validator)
- *
*/
-struct __pyx_obj_4lxml_5etree__Validator {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__Validator *__pyx_vtab;
- struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
+struct __pyx_obj_4lxml_5etree__SaxParserContext {
+ struct __pyx_obj_4lxml_5etree__ParserContext __pyx_base;
+ struct __pyx_obj_4lxml_5etree__SaxParserTarget *_target;
+ struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
+ startElementNsSAX2Func _origSaxStart;
+ endElementNsSAX2Func _origSaxEnd;
+ startElementSAXFunc _origSaxStartNoNs;
+ endElementSAXFunc _origSaxEndNoNs;
+ charactersSAXFunc _origSaxData;
+ cdataBlockSAXFunc _origSaxCData;
+ internalSubsetSAXFunc _origSaxDoctype;
+ commentSAXFunc _origSaxComment;
+ processingInstructionSAXFunc _origSaxPI;
+ startDocumentSAXFunc _origSaxStartDocument;
+ int _event_filter;
+ PyObject *_ns_stack;
+ PyObject *_node_stack;
+ struct __pyx_obj_4lxml_5etree__ParseEventsIterator *events_iterator;
+ struct LxmlElement *_root;
+ struct __pyx_obj_4lxml_5etree__MultiTagMatcher *_matcher;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/relaxng.pxi":22
- * # RelaxNG
- *
- * cdef class RelaxNG(_Validator): # <<<<<<<<<<<<<<
- * u"""RelaxNG(self, etree=None, file=None)
- * Turn a document into a Relax NG validator.
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":222
+ * @cython.final
+ * @cython.internal
+ * cdef class _ParseEventsIterator: # <<<<<<<<<<<<<<
+ * """A reusable parse events iterator"""
+ * cdef list _events
*/
-struct __pyx_obj_4lxml_5etree_RelaxNG {
- struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
- xmlRelaxNG *_c_schema;
+struct __pyx_obj_4lxml_5etree__ParseEventsIterator {
+ PyObject_HEAD
+ PyObject *_events;
+ int _event_index;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":39
- *
- * @cython.freelist(16)
- * cdef class _LogEntry: # <<<<<<<<<<<<<<
- * """A log message entry from an error log.
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":627
+ * ############################################################
*
+ * cdef class TreeBuilder(_SaxParserTarget): # <<<<<<<<<<<<<<
+ * u"""TreeBuilder(self, element_factory=None, parser=None)
+ * Parser target that builds a tree.
*/
-struct __pyx_obj_4lxml_5etree__LogEntry {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__LogEntry *__pyx_vtab;
- int domain;
- int type;
- int level;
- int line;
- int column;
- PyObject *_message;
- PyObject *_filename;
- char *_c_message;
- xmlChar *_c_filename;
+struct __pyx_obj_4lxml_5etree_TreeBuilder {
+ struct __pyx_obj_4lxml_5etree__SaxParserTarget __pyx_base;
+ struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
+ PyObject *_factory;
+ PyObject *_data;
+ PyObject *_element_stack;
+ PyObject *_element_stack_pop;
+ struct LxmlElement *_last;
+ int _in_tail;
};
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2856
- *
- * @cython.freelist(8)
- * cdef class CDATA: # <<<<<<<<<<<<<<
- * u"""CDATA(data)
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":8
+ * cdef class _ParserContext(_ResolverContext)
+ * cdef class _SaxParserContext(_ParserContext)
+ * cdef class _TargetParserContext(_SaxParserContext) # <<<<<<<<<<<<<<
+ * cdef class _ParserSchemaValidationContext
+ * cdef class _Validator
*/
-struct __pyx_obj_4lxml_5etree_CDATA {
+struct __pyx_obj_4lxml_5etree__TargetParserContext {
+ struct __pyx_obj_4lxml_5etree__SaxParserContext __pyx_base;
+ PyObject *_python_target;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":369
+ * @cython.final
+ * @cython.internal
+ * cdef class _FilelikeWriter: # <<<<<<<<<<<<<<
+ * cdef object _filelike
+ * cdef object _close_filelike
+ */
+struct __pyx_obj_4lxml_5etree__FilelikeWriter {
PyObject_HEAD
- PyObject *_utf8_data;
+ struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter *__pyx_vtab;
+ PyObject *_filelike;
+ PyObject *_close_filelike;
+ struct __pyx_obj_4lxml_5etree__ExceptionContext *_exc_context;
+ struct __pyx_obj_4lxml_5etree__ErrorLog *error_log;
};
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":26
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":651
+ * @cython.final
* @cython.internal
- * @cython.freelist(8)
- * cdef class _DTDElementContentDecl: # <<<<<<<<<<<<<<
- * cdef DTD _dtd
- * cdef tree.xmlElementContent* _c_node
+ * cdef class _IncrementalFileWriter: # <<<<<<<<<<<<<<
+ * cdef tree.xmlOutputBuffer* _c_out
+ * cdef bytes _encoding
*/
-struct __pyx_obj_4lxml_5etree__DTDElementContentDecl {
+struct __pyx_obj_4lxml_5etree__IncrementalFileWriter {
PyObject_HEAD
- struct __pyx_obj_4lxml_5etree_DTD *_dtd;
- xmlElementContent *_c_node;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":256
- * return message
- *
- * cdef class _ListErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
- * u"Immutable base version of a list based error log."
- * cdef list _entries
- */
-struct __pyx_obj_4lxml_5etree__ListErrorLog {
- struct __pyx_obj_4lxml_5etree__BaseErrorLog __pyx_base;
- PyObject *_entries;
- int _offset;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":382
- * cdef void* old_error_context
- *
- * cdef class _ErrorLog(_ListErrorLog): # <<<<<<<<<<<<<<
- * cdef list _logContexts
- * def __cinit__(self):
- */
-struct __pyx_obj_4lxml_5etree__ErrorLog {
- struct __pyx_obj_4lxml_5etree__ListErrorLog __pyx_base;
- PyObject *_logContexts;
+ struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter *__pyx_vtab;
+ xmlOutputBuffer *_c_out;
+ PyObject *_encoding;
+ const char *_c_encoding;
+ struct __pyx_obj_4lxml_5etree__FilelikeWriter *_target;
+ PyObject *_element_stack;
+ int _status;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":248
- * @cython.final
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":887
* @cython.internal
- * cdef class _ReadOnlyPIProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"A read-only proxy for processing instructions (for internal use only!)"
- * property target:
- */
-struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy {
- struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":698
- *
- * @cython.final
- * cdef class _XSLTResultTree(_ElementTree): # <<<<<<<<<<<<<<
- * cdef XSLT _xslt
- * cdef _Document _profile
- */
-struct __pyx_obj_4lxml_5etree__XSLTResultTree {
- struct LxmlElementTree __pyx_base;
- struct __pyx_obj_4lxml_5etree_XSLT *_xslt;
- struct LxmlDocument *_profile;
- xmlChar *_buffer;
- Py_ssize_t _buffer_len;
- Py_ssize_t _buffer_refcnt;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2744
- * return NULL
- *
- * cdef class ElementTextIterator: # <<<<<<<<<<<<<<
- * u"""ElementTextIterator(self, element, tag=None, with_tail=True)
- * Iterates over the text content of a subtree.
+ * @cython.freelist(8)
+ * cdef class _FileWriterElement: # <<<<<<<<<<<<<<
+ * cdef object _element
+ * cdef _IncrementalFileWriter _writer
*/
-struct __pyx_obj_4lxml_5etree_ElementTextIterator {
+struct __pyx_obj_4lxml_5etree__FileWriterElement {
PyObject_HEAD
- PyObject *_nextEvent;
- struct LxmlElement *_start_element;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2416
- * self._name = NULL
- *
- * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
- * object LxmlElementIterator, type LxmlElementIteratorType ]:
- * """
- */
-struct LxmlElementIterator {
- struct LxmlElementTagMatcher __pyx_base;
- struct LxmlElement *_node;
- _node_to_node_function _next_element;
-};
-
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType;
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":6
- * # Custom Element classes
- *
- * cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<
- * object LxmlElementBase ]:
- * u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)
- */
-struct LxmlElementBase {
- struct LxmlElement __pyx_base;
-};
-
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementBaseType;
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":466
- * del self._entries[:offset]
- *
- * cdef class PyErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
- * u"""PyErrorLog(self, logger_name=None, logger=None)
- * A global error log that connects to the Python stdlib logging package.
- */
-struct __pyx_obj_4lxml_5etree_PyErrorLog {
- struct __pyx_obj_4lxml_5etree__BaseErrorLog __pyx_base;
- PyObject *level_map;
- PyObject *_map_level;
- PyObject *_log;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":267
- * # DTD
- *
- * cdef class DTD(_Validator): # <<<<<<<<<<<<<<
- * u"""DTD(self, file=None, external_id=None)
- * A DTD validator.
- */
-struct __pyx_obj_4lxml_5etree_DTD {
- struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
- xmlDtd *_c_dtd;
+ PyObject *_element;
+ struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *_writer;
};
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":310
- * return funicode(self._c_dtd.SystemID) if (self._c_dtd is not NULL and self._c_dtd.SystemID is not NULL) else None
- *
- * def iterelements(self): # <<<<<<<<<<<<<<
- * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL
- * while c_node is not NULL:
- */
-struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements {
- PyObject_HEAD
- xmlNode *__pyx_v_c_node;
- struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_node;
- struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":52
- * @cython.final
- * @cython.internal
- * cdef class _XSLTResolverContext(_ResolverContext): # <<<<<<<<<<<<<<
- * cdef xmlDoc* _c_style_doc
- * cdef _BaseParser _parser
- */
-struct __pyx_obj_4lxml_5etree__XSLTResolverContext {
- struct __pyx_obj_4lxml_5etree__ResolverContext __pyx_base;
- xmlDoc *_c_style_doc;
- struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":42
- * @cython.final
- * @cython.internal
- * cdef class _ParserDictionaryContext: # <<<<<<<<<<<<<<
- * # Global parser context to share the string dictionary.
- * #
- */
-struct __pyx_obj_4lxml_5etree__ParserDictionaryContext {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext *__pyx_vtab;
- xmlDict *_c_dict;
- struct __pyx_obj_4lxml_5etree__BaseParser *_default_parser;
- PyObject *_implied_parser_contexts;
-};
-
-
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/iterparse.pxi":203
*
*
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":439
- * self._entries.append(entry)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlid.pxi":58
+ * return (_elementTreeFactory(doc, None), _IDDict(doc))
*
- * cdef class _DomainErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
- * def __init__(self, domains):
- * _ErrorLog.__init__(self)
+ * cdef class _IDDict: # <<<<<<<<<<<<<<
+ * u"""IDDict(self, etree)
+ * A dictionary-like proxy class that mapps ID attributes to elements.
*/
-struct __pyx_obj_4lxml_5etree__DomainErrorLog {
- struct __pyx_obj_4lxml_5etree__ErrorLog __pyx_base;
+struct __pyx_obj_4lxml_5etree__IDDict {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__IDDict *__pyx_vtab;
+ struct LxmlDocument *_doc;
+ PyObject *_keys;
+ PyObject *_items;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":344
- * # attribute based lookup scheme
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xinclude.pxi":10
+ * pass
*
- * cdef class AttributeBasedElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None)
- * Checks an attribute of an Element and looks up the value in a
+ * cdef class XInclude: # <<<<<<<<<<<<<<
+ * u"""XInclude(self)
+ * XInclude processor.
*/
-struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup {
- struct LxmlFallbackElementClassLookup __pyx_base;
- PyObject *_class_mapping;
- PyObject *_pytag;
- const xmlChar *_c_ns;
- const xmlChar *_c_name;
+struct __pyx_obj_4lxml_5etree_XInclude {
+ PyObject_HEAD
+ struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":488
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":32
*
- * @cython.freelist(4)
- * cdef class DocInfo: # <<<<<<<<<<<<<<
- * u"Document information provided by parser and DTD."
+ * @cython.internal
+ * cdef class _BaseContext: # <<<<<<<<<<<<<<
+ * cdef xpath.xmlXPathContext* _xpathCtxt
* cdef _Document _doc
*/
-struct __pyx_obj_4lxml_5etree_DocInfo {
+struct __pyx_obj_4lxml_5etree__BaseContext {
PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__BaseContext *__pyx_vtab;
+ xmlXPathContext *_xpathCtxt;
struct LxmlDocument *_doc;
+ PyObject *_extensions;
+ PyObject *_namespaces;
+ PyObject *_global_namespaces;
+ PyObject *_utf_refs;
+ PyObject *_function_cache;
+ PyObject *_eval_context_dict;
+ int _build_smart_strings;
+ struct __pyx_obj_4lxml_5etree__TempStore *_temp_refs;
+ PyObject *_temp_documents;
+ struct __pyx_obj_4lxml_5etree__ExceptionContext *_exc;
+ struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":96
- * @cython.internal
- * @cython.freelist(8)
- * cdef class _DTDAttributeDecl: # <<<<<<<<<<<<<<
- * cdef DTD _dtd
- * cdef tree.xmlAttribute* _c_node
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":26
+ *
+ * ctypedef int (*_register_function)(void* ctxt, name_utf, ns_uri_utf)
+ * cdef class _ExsltRegExp # <<<<<<<<<<<<<<
+ *
+ * ################################################################################
*/
-struct __pyx_obj_4lxml_5etree__DTDAttributeDecl {
+struct __pyx_obj_4lxml_5etree__ExsltRegExp {
PyObject_HEAD
- struct __pyx_obj_4lxml_5etree_DTD *_dtd;
- xmlAttribute *_c_node;
+ struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp *__pyx_vtab;
+ PyObject *_compile_map;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":11
- * cdef class _ParserSchemaValidationContext
- * cdef class _Validator
- * cdef class XMLSchema(_Validator) # <<<<<<<<<<<<<<
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":722
*
- * class ParseError(LxmlSyntaxError):
+ * @cython.final
+ * cdef class _ElementUnicodeResult(unicode): # <<<<<<<<<<<<<<
+ * cdef _Element _parent
+ * cdef readonly object attrname
*/
-struct __pyx_obj_4lxml_5etree_XMLSchema {
- struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
- xmlSchema *_c_schema;
- int _has_default_attributes;
- int _add_attribute_defaults;
+struct __pyx_obj_4lxml_5etree__ElementUnicodeResult {
+ PyUnicodeObject __pyx_base;
+ struct LxmlElement *_parent;
+ PyObject *attrname;
+ int is_tail;
+ int is_text;
+ int is_attribute;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2594
- * return False
- *
- * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<<
- * cdef _Element _node
- * cdef _node_to_node_function _next_element
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":52
+ * @cython.final
+ * @cython.internal
+ * cdef class _XPathContext(_BaseContext): # <<<<<<<<<<<<<<
+ * cdef object _variables
+ * def __init__(self, namespaces, extensions, error_log, enable_regexp, variables,
*/
-struct __pyx_obj_4lxml_5etree__ElementMatchIterator {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator *__pyx_vtab;
- struct LxmlElement *_node;
- _node_to_node_function _next_element;
- struct __pyx_obj_4lxml_5etree__MultiTagMatcher *_matcher;
+struct __pyx_obj_4lxml_5etree__XPathContext {
+ struct __pyx_obj_4lxml_5etree__BaseContext __pyx_base;
+ PyObject *_variables;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2658
- * self._storeNext(node)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":123
+ * _XPATH_VERSION_WARNING_REQUIRED = 0
*
- * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
- * u"""AncestorsIterator(self, node, tag=None)
- * Iterates over the ancestors of an element (from parent to parent).
+ * cdef class _XPathEvaluatorBase: # <<<<<<<<<<<<<<
+ * cdef xpath.xmlXPathContext* _xpathCtxt
+ * cdef _XPathContext _context
*/
-struct __pyx_obj_4lxml_5etree_AncestorsIterator {
- struct __pyx_obj_4lxml_5etree__ElementMatchIterator __pyx_base;
+struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase *__pyx_vtab;
+ xmlXPathContext *_xpathCtxt;
+ struct __pyx_obj_4lxml_5etree__XPathContext *_context;
+ PyThread_type_lock _eval_lock;
+ struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1494
- * )
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":249
*
- * cdef class HTMLParser(_FeedParser): # <<<<<<<<<<<<<<
- * u"""HTMLParser(self, encoding=None, remove_blank_text=False, \
- * remove_comments=False, remove_pis=False, strip_cdata=True, \
+ *
+ * cdef class XPathElementEvaluator(_XPathEvaluatorBase): # <<<<<<<<<<<<<<
+ * u"""XPathElementEvaluator(self, element, namespaces=None, extensions=None, regexp=True, smart_strings=True)
+ * Create an XPath evaluator for an element.
*/
-struct __pyx_obj_4lxml_5etree_HTMLParser {
- struct __pyx_obj_4lxml_5etree__FeedParser __pyx_base;
+struct __pyx_obj_4lxml_5etree_XPathElementEvaluator {
+ struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase __pyx_base;
+ struct LxmlElement *_element;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1550
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":326
*
- * cdef class HTMLPullParser(HTMLParser): # <<<<<<<<<<<<<<
- * """HTMLPullParser(self, events=None, *, tag=None, base_url=None, **kwargs)
*
+ * cdef class XPathDocumentEvaluator(XPathElementEvaluator): # <<<<<<<<<<<<<<
+ * u"""XPathDocumentEvaluator(self, etree, namespaces=None, extensions=None, regexp=True, smart_strings=True)
+ * Create an XPath evaluator for an ElementTree.
*/
-struct __pyx_obj_4lxml_5etree_HTMLPullParser {
- struct __pyx_obj_4lxml_5etree_HTMLParser __pyx_base;
+struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator {
+ struct __pyx_obj_4lxml_5etree_XPathElementEvaluator __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlid.pxi":58
- * return (_elementTreeFactory(doc, None), _IDDict(doc))
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":405
*
- * cdef class _IDDict: # <<<<<<<<<<<<<<
- * u"""IDDict(self, etree)
- * A dictionary-like proxy class that mapps ID attributes to elements.
+ *
+ * cdef class XPath(_XPathEvaluatorBase): # <<<<<<<<<<<<<<
+ * u"""XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True)
+ * A compiled XPath expression that can be called on Elements and ElementTrees.
*/
-struct __pyx_obj_4lxml_5etree__IDDict {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__IDDict *__pyx_vtab;
- struct LxmlDocument *_doc;
- PyObject *_keys;
- PyObject *_items;
+struct __pyx_obj_4lxml_5etree_XPath {
+ struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase __pyx_base;
+ xmlXPathCompExpr *_xpath;
+ PyObject *_path;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":101
- *
- *
- * cdef class ElementNamespaceClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""ElementNamespaceClassLookup(self, fallback=None)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":481
+ * _find_namespaces = re.compile(b'({[^}]+})').findall
*
+ * cdef class ETXPath(XPath): # <<<<<<<<<<<<<<
+ * u"""ETXPath(self, path, extensions=None, regexp=True, smart_strings=True)
+ * Special XPath class that supports the ElementTree {uri} notation for namespaces.
*/
-struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup {
- struct LxmlFallbackElementClassLookup __pyx_base;
- PyObject *_namespace_registries;
+struct __pyx_obj_4lxml_5etree_ETXPath {
+ struct __pyx_obj_4lxml_5etree_XPath __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":472
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":52
* @cython.final
* @cython.internal
- * cdef class _AppendOnlyElementProxy(_ReadOnlyElementProxy): # <<<<<<<<<<<<<<
- * u"""A read-only element that allows adding children and changing the
- * text content (i.e. everything that adds to the subtree).
+ * cdef class _XSLTResolverContext(_ResolverContext): # <<<<<<<<<<<<<<
+ * cdef xmlDoc* _c_style_doc
+ * cdef _BaseParser _parser
*/
-struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy {
- struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy __pyx_base;
+struct __pyx_obj_4lxml_5etree__XSLTResolverContext {
+ struct __pyx_obj_4lxml_5etree__ResolverContext __pyx_base;
+ xmlDoc *_c_style_doc;
+ struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":456
- * @cython.final
- * @cython.internal
- * cdef class _ModifyContentOnlyEntityProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
- * u"A read-only proxy for entity references (for internal use only!)"
- * property name:
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":168
+ * # XSLT file/network access control
+ *
+ * cdef class XSLTAccessControl: # <<<<<<<<<<<<<<
+ * u"""XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)
+ *
*/
-struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy {
- struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
+struct __pyx_obj_4lxml_5etree_XSLTAccessControl {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl *__pyx_vtab;
+ xsltSecurityPrefs *_prefs;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":257
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":271
* @cython.final
* @cython.internal
- * cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"A read-only proxy for entity references (for internal use only!)"
- * property name:
+ * cdef class _XSLTContext(_BaseContext): # <<<<<<<<<<<<<<
+ * cdef xslt.xsltTransformContext* _xsltCtxt
+ * cdef _ReadOnlyElementProxy _extension_element_proxy
*/
-struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy {
- struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base;
+struct __pyx_obj_4lxml_5etree__XSLTContext {
+ struct __pyx_obj_4lxml_5etree__BaseContext __pyx_base;
+ xsltTransformContext *_xsltCtxt;
+ struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *_extension_element_proxy;
+ PyObject *_extension_elements;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":887
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":324
* @cython.internal
* @cython.freelist(8)
- * cdef class _FileWriterElement: # <<<<<<<<<<<<<<
- * cdef object _element
- * cdef _IncrementalFileWriter _writer
- */
-struct __pyx_obj_4lxml_5etree__FileWriterElement {
- PyObject_HEAD
- PyObject *_element;
- struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *_writer;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/debug.pxi":4
- * @cython.final
- * @cython.internal
- * cdef class _MemDebug: # <<<<<<<<<<<<<<
- * """Debugging support for the memory allocation in libxml2.
- * """
+ * cdef class _XSLTQuotedStringParam: # <<<<<<<<<<<<<<
+ * u"""A wrapper class for literal XSLT string parameters that require
+ * quote escaping.
*/
-struct __pyx_obj_4lxml_5etree__MemDebug {
+struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam {
PyObject_HEAD
+ PyObject *strval;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2204
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":334
*
- * @cython.freelist(16)
- * cdef class _Attrib: # <<<<<<<<<<<<<<
- * u"""A dict-like proxy for the ``Element.attrib`` property.
- * """
- */
-struct __pyx_obj_4lxml_5etree__Attrib {
- PyObject_HEAD
- struct LxmlElement *_element;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":265
- * # default lookup scheme
+ * @cython.no_gc_clear
+ * cdef class XSLT: # <<<<<<<<<<<<<<
+ * u"""XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)
*
- * cdef class ElementDefaultClassLookup(ElementClassLookup): # <<<<<<<<<<<<<<
- * u"""ElementDefaultClassLookup(self, element=None, comment=None, pi=None, entity=None)
- * Element class lookup scheme that always returns the default Element
*/
-struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup {
- struct LxmlElementClassLookup __pyx_base;
- PyObject *element_class;
- PyObject *comment_class;
- PyObject *pi_class;
- PyObject *entity_class;
+struct __pyx_obj_4lxml_5etree_XSLT {
+ PyObject_HEAD
+ struct __pyx_vtabstruct_4lxml_5etree_XSLT *__pyx_vtab;
+ struct __pyx_obj_4lxml_5etree__XSLTContext *_context;
+ xsltStylesheet *_c_style;
+ struct __pyx_obj_4lxml_5etree__XSLTResolverContext *_xslt_resolver_context;
+ struct __pyx_obj_4lxml_5etree_XSLTAccessControl *_access_control;
+ struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":722
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":698
*
* @cython.final
- * cdef class _ElementUnicodeResult(unicode): # <<<<<<<<<<<<<<
- * cdef _Element _parent
- * cdef readonly object attrname
+ * cdef class _XSLTResultTree(_ElementTree): # <<<<<<<<<<<<<<
+ * cdef XSLT _xslt
+ * cdef _Document _profile
*/
-struct __pyx_obj_4lxml_5etree__ElementUnicodeResult {
- PyUnicodeObject __pyx_base;
- struct LxmlElement *_parent;
- PyObject *attrname;
- int is_tail;
- int is_text;
- int is_attribute;
+struct __pyx_obj_4lxml_5etree__XSLTResultTree {
+ struct LxmlElementTree __pyx_base;
+ struct __pyx_obj_4lxml_5etree_XSLT *_xslt;
+ struct LxmlDocument *_profile;
+ xmlChar *_buffer;
+ Py_ssize_t _buffer_len;
+ Py_ssize_t _buffer_refcnt;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":26
- *
- * ctypedef int (*_register_function)(void* ctxt, name_utf, ns_uri_utf)
- * cdef class _ExsltRegExp # <<<<<<<<<<<<<<
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":849
+ * return __findStylesheetByID(doc, id=id)
*
- * ################################################################################
+ * cdef class _XSLTProcessingInstruction(PIBase): # <<<<<<<<<<<<<<
+ * def parseXSL(self, parser=None):
+ * u"""parseXSL(self, parser=None)
*/
-struct __pyx_obj_4lxml_5etree__ExsltRegExp {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp *__pyx_vtab;
- PyObject *_compile_map;
+struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction {
+ struct __pyx_obj_4lxml_5etree_PIBase __pyx_base;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":301
- * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
- * cdef class _BaseParser
- * cdef class QName # <<<<<<<<<<<<<<
- * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xsltext.pxi":3
+ * # XSLT extension elements
*
+ * cdef class XSLTExtension: # <<<<<<<<<<<<<<
+ * u"""Base class of an XSLT extension element.
+ * """
*/
-struct __pyx_obj_4lxml_5etree_QName {
+struct __pyx_obj_4lxml_5etree_XSLTExtension {
PyObject_HEAD
- PyObject *text;
- PyObject *localname;
- PyObject *namespace;
+ struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *__pyx_vtab;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":323
- * return list(self.iterelements())
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":10
+ * cdef class _TargetParserContext(_SaxParserContext)
+ * cdef class _ParserSchemaValidationContext
+ * cdef class _Validator # <<<<<<<<<<<<<<
+ * cdef class XMLSchema(_Validator)
*
- * def iterentities(self): # <<<<<<<<<<<<<<
- * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL
- * while c_node is not NULL:
*/
-struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities {
+struct __pyx_obj_4lxml_5etree__Validator {
PyObject_HEAD
- xmlNode *__pyx_v_c_node;
- struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_v_node;
- struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self;
+ struct __pyx_vtabstruct_4lxml_5etree__Validator *__pyx_vtab;
+ struct __pyx_obj_4lxml_5etree__ErrorLog *_error_log;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":257
- * @cython.final
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":26
* @cython.internal
- * cdef class _TempStore: # <<<<<<<<<<<<<<
- * cdef list _storage
- * def __init__(self):
+ * @cython.freelist(8)
+ * cdef class _DTDElementContentDecl: # <<<<<<<<<<<<<<
+ * cdef DTD _dtd
+ * cdef tree.xmlElementContent* _c_node
*/
-struct __pyx_obj_4lxml_5etree__TempStore {
+struct __pyx_obj_4lxml_5etree__DTDElementContentDecl {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__TempStore *__pyx_vtab;
- PyObject *_storage;
+ struct __pyx_obj_4lxml_5etree_DTD *_dtd;
+ xmlElementContent *_c_node;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":365
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":96
* @cython.internal
- * cdef class _OpaqueNodeWrapper: # <<<<<<<<<<<<<<
- * cdef tree.xmlNode* _c_node
- * def __init__(self):
+ * @cython.freelist(8)
+ * cdef class _DTDAttributeDecl: # <<<<<<<<<<<<<<
+ * cdef DTD _dtd
+ * cdef tree.xmlAttribute* _c_node
*/
-struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper {
+struct __pyx_obj_4lxml_5etree__DTDAttributeDecl {
PyObject_HEAD
- xmlNode *_c_node;
+ struct __pyx_obj_4lxml_5etree_DTD *_dtd;
+ xmlAttribute *_c_node;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":369
- * @cython.final
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":179
* @cython.internal
- * cdef class _FilelikeWriter: # <<<<<<<<<<<<<<
- * cdef object _filelike
- * cdef object _close_filelike
+ * @cython.freelist(8)
+ * cdef class _DTDElementDecl: # <<<<<<<<<<<<<<
+ * cdef DTD _dtd
+ * cdef tree.xmlElement* _c_node
*/
-struct __pyx_obj_4lxml_5etree__FilelikeWriter {
+struct __pyx_obj_4lxml_5etree__DTDElementDecl {
PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter *__pyx_vtab;
- PyObject *_filelike;
- PyObject *_close_filelike;
- struct __pyx_obj_4lxml_5etree__ExceptionContext *_exc_context;
- struct __pyx_obj_4lxml_5etree__ErrorLog *error_log;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":372
- * @cython.final
- * @cython.internal
- * cdef class _OpaqueDocumentWrapper(_OpaqueNodeWrapper): # <<<<<<<<<<<<<<
- * cdef int _assertNode(self) except -1:
- * u"""This is our way of saying: this proxy is invalid!
- */
-struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper {
- struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper __pyx_base;
- struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper *__pyx_vtab;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/schematron.pxi":22
- * # Schematron
- *
- * cdef class Schematron(_Validator): # <<<<<<<<<<<<<<
- * u"""Schematron(self, etree=None, file=None)
- * A Schematron validator.
- */
-struct __pyx_obj_4lxml_5etree_Schematron {
- struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
- xmlSchematron *_c_schema;
- xmlDoc *_c_schema_doc;
+ struct __pyx_obj_4lxml_5etree_DTD *_dtd;
+ xmlElement *_c_node;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":373
- * @cython.final
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":242
* @cython.internal
- * cdef class _ErrorLogContext: # <<<<<<<<<<<<<<
- * """
- * Error log context for the 'with' statement.
+ * @cython.freelist(8)
+ * cdef class _DTDEntityDecl: # <<<<<<<<<<<<<<
+ * cdef DTD _dtd
+ * cdef tree.xmlEntity* _c_node
*/
-struct __pyx_obj_4lxml_5etree__ErrorLogContext {
+struct __pyx_obj_4lxml_5etree__DTDEntityDecl {
PyObject_HEAD
- xmlStructuredErrorFunc old_error_func;
- void *old_error_context;
+ struct __pyx_obj_4lxml_5etree_DTD *_dtd;
+ xmlEntity *_c_node;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":168
- * # XSLT file/network access control
- *
- * cdef class XSLTAccessControl: # <<<<<<<<<<<<<<
- * u"""XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":267
+ * # DTD
*
+ * cdef class DTD(_Validator): # <<<<<<<<<<<<<<
+ * u"""DTD(self, file=None, external_id=None)
+ * A DTD validator.
*/
-struct __pyx_obj_4lxml_5etree_XSLTAccessControl {
- PyObject_HEAD
- struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl *__pyx_vtab;
- xsltSecurityPrefs *_prefs;
+struct __pyx_obj_4lxml_5etree_DTD {
+ struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
+ xmlDtd *_c_dtd;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2643
- * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/relaxng.pxi":22
+ * # RelaxNG
*
- * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
- * u"""SiblingsIterator(self, node, tag=None, preceding=False)
- * Iterates over the siblings of an element.
- */
-struct __pyx_obj_4lxml_5etree_SiblingsIterator {
- struct __pyx_obj_4lxml_5etree__ElementMatchIterator __pyx_base;
-};
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":439
- * @cython.final
- * @cython.internal
- * cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
- * u"""A read-only proxy that allows changing the text/target content of a
- * processing instruction.
+ * cdef class RelaxNG(_Validator): # <<<<<<<<<<<<<<
+ * u"""RelaxNG(self, etree=None, file=None)
+ * Turn a document into a Relax NG validator.
*/
-struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy {
- struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
+struct __pyx_obj_4lxml_5etree_RelaxNG {
+ struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
+ xmlRelaxNG *_c_schema;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":87
- * @cython.final
- * @cython.internal
- * cdef class _ClassNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
- * u"Dictionary-like registry for namespace implementation classes"
- * def __setitem__(self, name, item):
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":11
+ * cdef class _ParserSchemaValidationContext
+ * cdef class _Validator
+ * cdef class XMLSchema(_Validator) # <<<<<<<<<<<<<<
+ *
+ * class ParseError(LxmlSyntaxError):
*/
-struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry {
- struct __pyx_obj_4lxml_5etree__NamespaceRegistry __pyx_base;
+struct __pyx_obj_4lxml_5etree_XMLSchema {
+ struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
+ xmlSchema *_c_schema;
+ int _has_default_attributes;
+ int _add_attribute_defaults;
};
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":242
- * @cython.internal
- * @cython.freelist(8)
- * cdef class _DTDEntityDecl: # <<<<<<<<<<<<<<
- * cdef DTD _dtd
- * cdef tree.xmlEntity* _c_node
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/schematron.pxi":22
+ * # Schematron
+ *
+ * cdef class Schematron(_Validator): # <<<<<<<<<<<<<<
+ * u"""Schematron(self, etree=None, file=None)
+ * A Schematron validator.
*/
-struct __pyx_obj_4lxml_5etree__DTDEntityDecl {
- PyObject_HEAD
- struct __pyx_obj_4lxml_5etree_DTD *_dtd;
- xmlEntity *_c_node;
+struct __pyx_obj_4lxml_5etree_Schematron {
+ struct __pyx_obj_4lxml_5etree__Validator __pyx_base;
+ xmlSchematron *_c_schema;
+ xmlDoc *_c_schema_doc;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2344
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/debug.pxi":4
* @cython.final
* @cython.internal
- * cdef class _AttribIterator: # <<<<<<<<<<<<<<
- * u"""Attribute iterator - for internal use only!
+ * cdef class _MemDebug: # <<<<<<<<<<<<<<
+ * """Debugging support for the memory allocation in libxml2.
* """
*/
-struct __pyx_obj_4lxml_5etree__AttribIterator {
+struct __pyx_obj_4lxml_5etree__MemDebug {
PyObject_HEAD
- struct LxmlElement *_node;
- xmlAttr *_c_attr;
- int _keysvalues;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":468
- * # read-only tree based class lookup
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":165
+ * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None
*
- * cdef class PythonElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""PythonElementClassLookup(self, fallback=None)
- * Element class lookup based on a subclass method.
+ * def itervalues(self): # <<<<<<<<<<<<<<
+ * _assertValidDTDNode(self, self._c_node)
+ * cdef tree.xmlEnumeration *c_node = self._c_node.tree
*/
-struct __pyx_obj_4lxml_5etree_PythonElementClassLookup {
- struct LxmlFallbackElementClassLookup __pyx_base;
+struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues {
+ PyObject_HEAD
+ xmlEnumeration *__pyx_v_c_node;
+ struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_self;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2623
- * return current_node
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":225
+ * return None
*
- * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
- * u"""ElementChildIterator(self, node, tag=None, reversed=False)
- * Iterates over the children of an element.
+ * def iterattributes(self): # <<<<<<<<<<<<<<
+ * _assertValidDTDNode(self, self._c_node)
+ * cdef tree.xmlAttribute *c_node = self._c_node.attributes
*/
-struct __pyx_obj_4lxml_5etree_ElementChildIterator {
- struct __pyx_obj_4lxml_5etree__ElementMatchIterator __pyx_base;
+struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes {
+ PyObject_HEAD
+ xmlAttribute *__pyx_v_c_node;
+ struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_v_node;
+ struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_self;
};
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":448
- * _ErrorLog.receive(self, entry)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":310
+ * return funicode(self._c_dtd.SystemID) if (self._c_dtd is not NULL and self._c_dtd.SystemID is not NULL) else None
*
- * cdef class _RotatingErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
- * cdef int _max_len
- * def __init__(self, max_len):
+ * def iterelements(self): # <<<<<<<<<<<<<<
+ * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL
+ * while c_node is not NULL:
*/
-struct __pyx_obj_4lxml_5etree__RotatingErrorLog {
- struct __pyx_obj_4lxml_5etree__ErrorLog __pyx_base;
- int _max_len;
+struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements {
+ PyObject_HEAD
+ xmlNode *__pyx_v_c_node;
+ struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_v_node;
+ struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self;
+};
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":323
+ * return list(self.iterelements())
+ *
+ * def iterentities(self): # <<<<<<<<<<<<<<
+ * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL
+ * while c_node is not NULL:
+ */
+struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities {
+ PyObject_HEAD
+ xmlNode *__pyx_v_c_node;
+ struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_v_node;
+ struct __pyx_obj_4lxml_5etree_DTD *__pyx_v_self;
};
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":257
+ * @cython.final
+ * @cython.internal
+ * cdef class _TempStore: # <<<<<<<<<<<<<<
+ * cdef list _storage
+ * def __init__(self):
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__TempStore {
+ int (*add)(struct __pyx_obj_4lxml_5etree__TempStore *, PyObject *);
+ int (*clear)(struct __pyx_obj_4lxml_5etree__TempStore *);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__TempStore *__pyx_vtabptr_4lxml_5etree__TempStore;
+static int __pyx_f_4lxml_5etree_10_TempStore_add(struct __pyx_obj_4lxml_5etree__TempStore *, PyObject *);
+static int __pyx_f_4lxml_5etree_10_TempStore_clear(struct __pyx_obj_4lxml_5etree__TempStore *);
+
+
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":272
* # class for temporarily storing exceptions raised in extensions
* @cython.internal
};
static struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *__pyx_vtabptr_4lxml_5etree__ExceptionContext;
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlDocumentType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":161
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":317
+ * @cython.final
+ * @cython.freelist(8)
+ * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
+ * u"""Internal base class to reference a libxml document.
+ *
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__Document {
+ PyObject *(*getroot)(struct LxmlDocument *);
+ int (*hasdoctype)(struct LxmlDocument *);
+ PyObject *(*getdoctype)(struct LxmlDocument *);
+ PyObject *(*getxmlinfo)(struct LxmlDocument *);
+ PyObject *(*isstandalone)(struct LxmlDocument *);
+ PyObject *(*buildNewPrefix)(struct LxmlDocument *);
+ xmlNs *(*_findOrBuildNodeNs)(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *, int);
+ int (*_setNodeNs)(struct LxmlDocument *, xmlNode *, const xmlChar *);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtabptr_4lxml_5etree__Document;
+static PyObject *__pyx_f_4lxml_5etree_9_Document_getroot(struct LxmlDocument *);
+static int __pyx_f_4lxml_5etree_9_Document_hasdoctype(struct LxmlDocument *);
+static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument *);
+static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument *);
+static PyObject *__pyx_f_4lxml_5etree_9_Document_isstandalone(struct LxmlDocument *);
+static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocument *);
+static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *, int);
+static int __pyx_f_4lxml_5etree_9_Document__setNodeNs(struct LxmlDocument *, xmlNode *, const xmlChar *);
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":753
*
* @cython.internal
- * cdef class _ResolverContext(_ExceptionContext): # <<<<<<<<<<<<<<
+ * cdef class _BaseParser: # <<<<<<<<<<<<<<
+ * cdef ElementClassLookup _class_lookup
* cdef _ResolverRegistry _resolvers
- * cdef _TempStore _storage
*/
-struct __pyx_vtabstruct_4lxml_5etree__ResolverContext {
- struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__BaseParser {
+ PyObject *(*_setBaseURL)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *);
+ PyObject *(*_collectEvents)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *);
+ struct __pyx_obj_4lxml_5etree__ParserContext *(*_getParserContext)(struct __pyx_obj_4lxml_5etree__BaseParser *);
+ struct __pyx_obj_4lxml_5etree__ParserContext *(*_getPushParserContext)(struct __pyx_obj_4lxml_5etree__BaseParser *);
+ struct __pyx_obj_4lxml_5etree__ParserContext *(*_createContext)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *);
+ int (*_registerHtmlErrorHandler)(struct __pyx_obj_4lxml_5etree__BaseParser *, xmlParserCtxt *);
+ xmlParserCtxt *(*_newParserCtxt)(struct __pyx_obj_4lxml_5etree__BaseParser *);
+ xmlParserCtxt *(*_newPushParserCtxt)(struct __pyx_obj_4lxml_5etree__BaseParser *);
+ struct __pyx_obj_4lxml_5etree__BaseParser *(*_copy)(struct __pyx_obj_4lxml_5etree__BaseParser *);
+ xmlDoc *(*_parseUnicodeDoc)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, char *);
+ xmlDoc *(*_parseDoc)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *, int, char *);
+ xmlDoc *(*_parseDocFromFile)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *);
+ xmlDoc *(*_parseDocFromFilelike)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *, PyObject *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__ResolverContext *__pyx_vtabptr_4lxml_5etree__ResolverContext;
+static struct __pyx_vtabstruct_4lxml_5etree__BaseParser *__pyx_vtabptr_4lxml_5etree__BaseParser;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":52
- * @cython.final
- * @cython.internal
- * cdef class _XSLTResolverContext(_ResolverContext): # <<<<<<<<<<<<<<
- * cdef xmlDoc* _c_style_doc
- * cdef _BaseParser _parser
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":39
+ *
+ * @cython.freelist(16)
+ * cdef class _LogEntry: # <<<<<<<<<<<<<<
+ * """A log message entry from an error log.
+ *
*/
-struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext {
- struct __pyx_vtabstruct_4lxml_5etree__ResolverContext __pyx_base;
- struct __pyx_obj_4lxml_5etree__XSLTResolverContext *(*_copy)(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *);
+struct __pyx_vtabstruct_4lxml_5etree__LogEntry {
+ PyObject *(*_setError)(struct __pyx_obj_4lxml_5etree__LogEntry *, xmlError *);
+ PyObject *(*_setGeneric)(struct __pyx_obj_4lxml_5etree__LogEntry *, int, int, int, int, PyObject *, PyObject *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *__pyx_vtabptr_4lxml_5etree__XSLTResolverContext;
-static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_20_XSLTResolverContext__copy(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *);
+static struct __pyx_vtabstruct_4lxml_5etree__LogEntry *__pyx_vtabptr_4lxml_5etree__LogEntry;
+static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxml_5etree__LogEntry *, xmlError *);
+static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4lxml_5etree__LogEntry *, int, int, int, int, PyObject *, PyObject *);
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":166
static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":4
- *
- * @cython.internal
- * cdef class _ReadOnlyProxy: # <<<<<<<<<<<<<<
- * u"A read-only proxy class suitable for PIs/Comments (for internal use only!)."
- * cdef bint _free_after_use
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy {
- int (*_assertNode)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *);
- int (*_raise_unsupported_type)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *);
- void (*free_after_use)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *);
- PyObject *(*__pyx___copy__)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch);
- PyObject *(*getchildren)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch);
-};
-static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":416
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":256
+ * return message
*
- * @cython.internal
- * cdef class _ModifyContentOnlyProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"""A read-only proxy that allows changing the text content.
- * """
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy {
- struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
-};
-static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":439
- * @cython.final
- * @cython.internal
- * cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
- * u"""A read-only proxy that allows changing the text/target content of a
- * processing instruction.
+ * cdef class _ListErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
+ * u"Immutable base version of a list based error log."
+ * cdef list _entries
*/
-struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy {
- struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog {
+ struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy;
+static struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog *__pyx_vtabptr_4lxml_5etree__ListErrorLog;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3253
- * pass
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":382
+ * cdef void* old_error_context
*
- * cdef class _Validator: # <<<<<<<<<<<<<<
- * u"Base class for XML validators."
- * cdef _ErrorLog _error_log
+ * cdef class _ErrorLog(_ListErrorLog): # <<<<<<<<<<<<<<
+ * cdef list _logContexts
+ * def __cinit__(self):
*/
-struct __pyx_vtabstruct_4lxml_5etree__Validator {
- PyObject *(*_append_log_message)(struct __pyx_obj_4lxml_5etree__Validator *, int, int, int, int, PyObject *, PyObject *, int __pyx_skip_dispatch);
- PyObject *(*_clear_error_log)(struct __pyx_obj_4lxml_5etree__Validator *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_4lxml_5etree__ErrorLog {
+ struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog __pyx_base;
+ int (*__pyx___enter__)(struct __pyx_obj_4lxml_5etree__ErrorLog *);
+ int (*connect)(struct __pyx_obj_4lxml_5etree__ErrorLog *);
+ int (*disconnect)(struct __pyx_obj_4lxml_5etree__ErrorLog *);
+ PyObject *(*clear)(struct __pyx_obj_4lxml_5etree__ErrorLog *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_4lxml_5etree__Validator *__pyx_vtabptr_4lxml_5etree__Validator;
+static struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *__pyx_vtabptr_4lxml_5etree__ErrorLog;
+static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etree__ErrorLog *);
+static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree__ErrorLog *);
+static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5etree__ErrorLog *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/relaxng.pxi":22
- * # RelaxNG
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":439
+ * self._entries.append(entry)
*
- * cdef class RelaxNG(_Validator): # <<<<<<<<<<<<<<
- * u"""RelaxNG(self, etree=None, file=None)
- * Turn a document into a Relax NG validator.
+ * cdef class _DomainErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
+ * def __init__(self, domains):
+ * _ErrorLog.__init__(self)
*/
-struct __pyx_vtabstruct_4lxml_5etree_RelaxNG {
- struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog {
+ struct __pyx_vtabstruct_4lxml_5etree__ErrorLog __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_RelaxNG *__pyx_vtabptr_4lxml_5etree_RelaxNG;
+static struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog *__pyx_vtabptr_4lxml_5etree__DomainErrorLog;
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":223
- * self._lookup_function = NULL # use default lookup
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":448
+ * _ErrorLog.receive(self, entry)
*
- * cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<
- * [ type LxmlFallbackElementClassLookupType,
- * object LxmlFallbackElementClassLookup ]:
+ * cdef class _RotatingErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
+ * cdef int _max_len
+ * def __init__(self, max_len):
*/
-struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup {
- void (*_setFallback)(struct LxmlFallbackElementClassLookup *, struct LxmlElementClassLookup *);
+struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog {
+ struct __pyx_vtabstruct_4lxml_5etree__ErrorLog __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
+static struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog *__pyx_vtabptr_4lxml_5etree__RotatingErrorLog;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":413
- * # custom class lookup based on node type, namespace, name
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":466
+ * del self._entries[:offset]
*
- * cdef class CustomElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""CustomElementClassLookup(self, fallback=None)
- * Element class lookup based on a subclass method.
+ * cdef class PyErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
+ * u"""PyErrorLog(self, logger_name=None, logger=None)
+ * A global error log that connects to the Python stdlib logging package.
*/
-struct __pyx_vtabstruct_4lxml_5etree_CustomElementClassLookup {
- struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_PyErrorLog {
+ struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_CustomElementClassLookup *__pyx_vtabptr_4lxml_5etree_CustomElementClassLookup;
+static struct __pyx_vtabstruct_4lxml_5etree_PyErrorLog *__pyx_vtabptr_4lxml_5etree_PyErrorLog;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1511
static struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1586
- * return u"<!--%s-->" % self.text
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1578
+ * return []
*
- * cdef class _ProcessingInstruction(__ContentOnlyElement): # <<<<<<<<<<<<<<
+ * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<<
* property tag:
* def __get__(self):
*/
-struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction {
+struct __pyx_vtabstruct_4lxml_5etree__Comment {
struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction *__pyx_vtabptr_4lxml_5etree__ProcessingInstruction;
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":126
- * self._init()
- *
- * cdef class PIBase(_ProcessingInstruction): # <<<<<<<<<<<<<<
- * u"""All custom Processing Instruction classes must inherit from this one.
- *
- */
-
-struct __pyx_vtabstruct_4lxml_5etree_PIBase {
- struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction __pyx_base;
-};
-static struct __pyx_vtabstruct_4lxml_5etree_PIBase *__pyx_vtabptr_4lxml_5etree_PIBase;
+static struct __pyx_vtabstruct_4lxml_5etree__Comment *__pyx_vtabptr_4lxml_5etree__Comment;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":15
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1586
+ * return u"<!--%s-->" % self.text
*
- * @cython.internal
- * cdef class _NamespaceRegistry: # <<<<<<<<<<<<<<
- * u"Dictionary-like namespace registry"
- * cdef object _ns_uri
+ * cdef class _ProcessingInstruction(__ContentOnlyElement): # <<<<<<<<<<<<<<
+ * property tag:
+ * def __get__(self):
*/
-struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry {
- PyObject *(*_get)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, PyObject *);
- PyObject *(*_getForString)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, char *);
+struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction {
+ struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry *__pyx_vtabptr_4lxml_5etree__NamespaceRegistry;
+static struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction *__pyx_vtabptr_4lxml_5etree__ProcessingInstruction;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":192
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1636
+ * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall
*
- * @cython.internal
- * cdef class _FunctionNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
- * def __setitem__(self, name, item):
- * if not callable(item):
+ * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<<
+ * property tag:
+ * def __get__(self):
*/
-struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry {
- struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__Entity {
+ struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry *__pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry;
+static struct __pyx_vtabstruct_4lxml_5etree__Entity *__pyx_vtabptr_4lxml_5etree__Entity;
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":123
- * _XPATH_VERSION_WARNING_REQUIRED = 0
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1735
*
- * cdef class _XPathEvaluatorBase: # <<<<<<<<<<<<<<
- * cdef xpath.xmlXPathContext* _xpathCtxt
- * cdef _XPathContext _context
+ * @cython.freelist(8)
+ * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
+ * object LxmlElementTree ]:
+ * cdef _Document _doc
*/
-struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase {
- PyObject *(*set_context)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathContext *);
- int (*_checkAbsolutePath)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, char *);
- int (*_lock)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
- void (*_unlock)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
- PyObject *(*_raise_parse_error)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
- PyObject *(*_raise_eval_error)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
- PyObject *(*_handle_result)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathObject *, struct LxmlDocument *);
+struct __pyx_vtabstruct_4lxml_5etree__ElementTree {
+ int (*_assertHasRoot)(struct LxmlElementTree *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
-static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
-static void __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
+static struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtabptr_4lxml_5etree__ElementTree;
+static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElementTree *);
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":405
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2385
*
*
- * cdef class XPath(_XPathEvaluatorBase): # <<<<<<<<<<<<<<
- * u"""XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True)
- * A compiled XPath expression that can be called on Elements and ElementTrees.
+ * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
+ * type LxmlElementTagMatcherType ]:
+ * """
*/
-struct __pyx_vtabstruct_4lxml_5etree_XPath {
- struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher {
+ PyObject *(*_initTagMatch)(struct LxmlElementTagMatcher *, PyObject *);
};
-static struct __pyx_vtabstruct_4lxml_5etree_XPath *__pyx_vtabptr_4lxml_5etree_XPath;
+static struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtabptr_4lxml_5etree__ElementTagMatcher;
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":32
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2416
+ * self._name = NULL
*
- * @cython.internal
- * cdef class _BaseContext: # <<<<<<<<<<<<<<
- * cdef xpath.xmlXPathContext* _xpathCtxt
- * cdef _Document _doc
+ * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
+ * object LxmlElementIterator, type LxmlElementIteratorType ]:
+ * """
*/
-struct __pyx_vtabstruct_4lxml_5etree__BaseContext {
- struct __pyx_obj_4lxml_5etree__BaseContext *(*_copy)(struct __pyx_obj_4lxml_5etree__BaseContext *);
- PyObject *(*_to_utf)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
- void (*_set_xpath_context)(struct __pyx_obj_4lxml_5etree__BaseContext *, xmlXPathContext *);
- PyObject *(*_register_context)(struct __pyx_obj_4lxml_5etree__BaseContext *, struct LxmlDocument *);
- PyObject *(*_cleanup_context)(struct __pyx_obj_4lxml_5etree__BaseContext *);
- PyObject *(*_release_context)(struct __pyx_obj_4lxml_5etree__BaseContext *);
- PyObject *(*addNamespace)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *, PyObject *);
- PyObject *(*registerNamespace)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *, PyObject *);
- PyObject *(*registerLocalNamespaces)(struct __pyx_obj_4lxml_5etree__BaseContext *);
- PyObject *(*registerGlobalNamespaces)(struct __pyx_obj_4lxml_5etree__BaseContext *);
- PyObject *(*unregisterGlobalNamespaces)(struct __pyx_obj_4lxml_5etree__BaseContext *);
- void (*_unregisterNamespace)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
- int (*_addLocalExtensionFunction)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *, PyObject *, PyObject *);
- PyObject *(*registerGlobalFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
- PyObject *(*registerLocalFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
- PyObject *(*unregisterAllFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
- PyObject *(*unregisterGlobalFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
- PyObject *(*_find_cached_function)(struct __pyx_obj_4lxml_5etree__BaseContext *, const xmlChar *, const xmlChar *);
- PyObject *(*_release_temp_refs)(struct __pyx_obj_4lxml_5etree__BaseContext *);
- PyObject *(*_hold)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
- struct LxmlDocument *(*_findDocumentForNode)(struct __pyx_obj_4lxml_5etree__BaseContext *, xmlNode *);
+struct __pyx_vtabstruct_4lxml_5etree__ElementIterator {
+ struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher __pyx_base;
+ void (*_storeNext)(struct LxmlElementIterator *, struct LxmlElement *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__BaseContext *__pyx_vtabptr_4lxml_5etree__BaseContext;
-static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__register_context(struct __pyx_obj_4lxml_5etree__BaseContext *, struct LxmlDocument *);
-static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __pyx_obj_4lxml_5etree__BaseContext *);
-static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_context(struct __pyx_obj_4lxml_5etree__BaseContext *);
-static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struct __pyx_obj_4lxml_5etree__BaseContext *, const xmlChar *, const xmlChar *);
-static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(struct __pyx_obj_4lxml_5etree__BaseContext *);
-static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
-static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentForNode(struct __pyx_obj_4lxml_5etree__BaseContext *, xmlNode *);
+static struct __pyx_vtabstruct_4lxml_5etree__ElementIterator *__pyx_vtabptr_4lxml_5etree__ElementIterator;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":271
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2453
* @cython.final
* @cython.internal
- * cdef class _XSLTContext(_BaseContext): # <<<<<<<<<<<<<<
- * cdef xslt.xsltTransformContext* _xsltCtxt
- * cdef _ReadOnlyElementProxy _extension_element_proxy
+ * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<<
+ * """
+ * Match an xmlNode against a list of tags.
*/
-struct __pyx_vtabstruct_4lxml_5etree__XSLTContext {
- struct __pyx_vtabstruct_4lxml_5etree__BaseContext __pyx_base;
- PyObject *(*register_context)(struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *, struct LxmlDocument *);
- PyObject *(*free_context)(struct __pyx_obj_4lxml_5etree__XSLTContext *);
+struct __pyx_vtabstruct_4lxml_5etree__MultiTagMatcher {
+ int (*rejectsAll)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
+ int (*rejectsAllAttributes)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
+ int (*matchesType)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, int);
+ void (*_clear)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
+ PyObject *(*initTagMatch)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *);
+ PyObject *(*_storeTags)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *, PyObject *);
+ int (*cacheTags)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, struct LxmlDocument *, struct __pyx_opt_args_4lxml_5etree_16_MultiTagMatcher_cacheTags *__pyx_optional_args);
+ int (*matches)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlNode *);
+ int (*matchesNsTag)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, const xmlChar *, const xmlChar *);
+ int (*matchesAttribute)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__XSLTContext *__pyx_vtabptr_4lxml_5etree__XSLTContext;
-static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *, struct LxmlDocument *);
-static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_obj_4lxml_5etree__XSLTContext *);
+static struct __pyx_vtabstruct_4lxml_5etree__MultiTagMatcher *__pyx_vtabptr_4lxml_5etree__MultiTagMatcher;
+static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
+static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
+static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, int);
+static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
+static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *, PyObject *);
+static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, struct LxmlDocument *, struct __pyx_opt_args_4lxml_5etree_16_MultiTagMatcher_cacheTags *__pyx_optional_args);
+static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlNode *);
+static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, const xmlChar *, const xmlChar *);
+static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribute(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":101
- *
- *
- * cdef class ElementNamespaceClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""ElementNamespaceClassLookup(self, fallback=None)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2594
+ * return False
*
+ * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<<
+ * cdef _Element _node
+ * cdef _node_to_node_function _next_element
*/
-struct __pyx_vtabstruct_4lxml_5etree_ElementNamespaceClassLookup {
- struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator {
+ PyObject *(*_initTagMatcher)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, PyObject *);
+ int (*_storeNext)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *);
};
-static struct __pyx_vtabstruct_4lxml_5etree_ElementNamespaceClassLookup *__pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup;
+static struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
+static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, PyObject *);
+static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":456
- * @cython.final
- * @cython.internal
- * cdef class _ModifyContentOnlyEntityProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
- * u"A read-only proxy for entity references (for internal use only!)"
- * property name:
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2623
+ * return current_node
+ *
+ * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
+ * u"""ElementChildIterator(self, node, tag=None, reversed=False)
+ * Iterates over the children of an element.
*/
-struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyEntityProxy {
- struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator {
+ struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyEntityProxy *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy;
+static struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator *__pyx_vtabptr_4lxml_5etree_ElementChildIterator;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":168
- * # XSLT file/network access control
- *
- * cdef class XSLTAccessControl: # <<<<<<<<<<<<<<
- * u"""XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2643
+ * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None
*
+ * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
+ * u"""SiblingsIterator(self, node, tag=None, preceding=False)
+ * Iterates over the siblings of an element.
*/
-struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl {
- PyObject *(*_setAccess)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption, int);
- void (*_register_in_context)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltTransformContext *);
- PyObject *(*_optval)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption);
+struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator {
+ struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl *__pyx_vtabptr_4lxml_5etree_XSLTAccessControl;
-static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption, int);
-static void __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltTransformContext *);
-static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption);
+static struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator *__pyx_vtabptr_4lxml_5etree_SiblingsIterator;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":651
- * @cython.final
- * @cython.internal
- * cdef class _IncrementalFileWriter: # <<<<<<<<<<<<<<
- * cdef tree.xmlOutputBuffer* _c_out
- * cdef bytes _encoding
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2658
+ * self._storeNext(node)
+ *
+ * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
+ * u"""AncestorsIterator(self, node, tag=None)
+ * Iterates over the ancestors of an element (from parent to parent).
*/
-struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter {
- PyObject *(*_write_qname)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *);
- PyObject *(*_write_start_element)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
- PyObject *(*_write_attributes_and_namespaces)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
- PyObject *(*_write_attributes_list)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
- PyObject *(*_write_end_element)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
- PyObject *(*_find_prefix)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
- PyObject *(*_collect_namespaces)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
- PyObject *(*_close)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
- PyObject *(*_handle_error)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
+struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator {
+ struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter *__pyx_vtabptr_4lxml_5etree__IncrementalFileWriter;
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_element(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes_and_namespaces(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes_list(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_element(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespaces(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
-static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
+static struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator *__pyx_vtabptr_4lxml_5etree_AncestorsIterator;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":466
- * del self._entries[:offset]
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2668
+ * self._storeNext(node)
*
- * cdef class PyErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
- * u"""PyErrorLog(self, logger_name=None, logger=None)
- * A global error log that connects to the Python stdlib logging package.
+ * cdef class ElementDepthFirstIterator: # <<<<<<<<<<<<<<
+ * u"""ElementDepthFirstIterator(self, node, tag=None, inclusive=True)
+ * Iterates over an element and its sub-elements in document order (depth
*/
-struct __pyx_vtabstruct_4lxml_5etree_PyErrorLog {
- struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_ElementDepthFirstIterator {
+ xmlNode *(*_nextNodeAnyTag)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
+ xmlNode *(*_nextNodeMatchTag)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
};
-static struct __pyx_vtabstruct_4lxml_5etree_PyErrorLog *__pyx_vtabptr_4lxml_5etree_PyErrorLog;
+static struct __pyx_vtabstruct_4lxml_5etree_ElementDepthFirstIterator *__pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator;
+static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
+static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchTag(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":207
- * @cython.final
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":4
+ *
* @cython.internal
- * cdef class _XPathFunctionNamespaceRegistry(_FunctionNamespaceRegistry): # <<<<<<<<<<<<<<
- * cdef object _prefix
- * cdef bytes _prefix_utf
+ * cdef class _ReadOnlyProxy: # <<<<<<<<<<<<<<
+ * u"A read-only proxy class suitable for PIs/Comments (for internal use only!)."
+ * cdef bint _free_after_use
*/
-struct __pyx_vtabstruct_4lxml_5etree__XPathFunctionNamespaceRegistry {
- struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy {
+ int (*_assertNode)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *);
+ int (*_raise_unsupported_type)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *);
+ void (*free_after_use)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *);
+ PyObject *(*__pyx___copy__)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch);
+ PyObject *(*getchildren)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_4lxml_5etree__XPathFunctionNamespaceRegistry *__pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry;
+static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":733
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":248
+ * @cython.final
* @cython.internal
- * cdef class _BaseParser: # <<<<<<<<<<<<<<
- * cdef ElementClassLookup _class_lookup
- * cdef _ResolverRegistry _resolvers
+ * cdef class _ReadOnlyPIProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"A read-only proxy for processing instructions (for internal use only!)"
+ * property target:
*/
-struct __pyx_vtabstruct_4lxml_5etree__BaseParser {
- PyObject *(*_setBaseURL)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *);
- PyObject *(*_collectEvents)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *);
- struct __pyx_obj_4lxml_5etree__ParserContext *(*_getParserContext)(struct __pyx_obj_4lxml_5etree__BaseParser *);
- struct __pyx_obj_4lxml_5etree__ParserContext *(*_getPushParserContext)(struct __pyx_obj_4lxml_5etree__BaseParser *);
- struct __pyx_obj_4lxml_5etree__ParserContext *(*_createContext)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *);
- int (*_registerHtmlErrorHandler)(struct __pyx_obj_4lxml_5etree__BaseParser *, xmlParserCtxt *);
- xmlParserCtxt *(*_newParserCtxt)(struct __pyx_obj_4lxml_5etree__BaseParser *);
- xmlParserCtxt *(*_newPushParserCtxt)(struct __pyx_obj_4lxml_5etree__BaseParser *);
- struct __pyx_obj_4lxml_5etree__BaseParser *(*_copy)(struct __pyx_obj_4lxml_5etree__BaseParser *);
- xmlDoc *(*_parseUnicodeDoc)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, char *);
- xmlDoc *(*_parseDoc)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *, int, char *);
- xmlDoc *(*_parseDocFromFile)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *);
- xmlDoc *(*_parseDocFromFilelike)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *, PyObject *);
+struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy {
+ struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__BaseParser *__pyx_vtabptr_4lxml_5etree__BaseParser;
+static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1123
- * ############################################################
- *
- * cdef class _FeedParser(_BaseParser): # <<<<<<<<<<<<<<
- * cdef bint _feed_parser_running
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":257
+ * @cython.final
+ * @cython.internal
+ * cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"A read-only proxy for entity references (for internal use only!)"
+ * property name:
*/
-struct __pyx_vtabstruct_4lxml_5etree__FeedParser {
- struct __pyx_vtabstruct_4lxml_5etree__BaseParser __pyx_base;
- PyObject *(*feed)(struct __pyx_obj_4lxml_5etree__FeedParser *, PyObject *, int __pyx_skip_dispatch);
- PyObject *(*close)(struct __pyx_obj_4lxml_5etree__FeedParser *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyEntityProxy {
+ struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__FeedParser *__pyx_vtabptr_4lxml_5etree__FeedParser;
+static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyEntityProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1303
- * )
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":275
*
- * cdef class XMLParser(_FeedParser): # <<<<<<<<<<<<<<
- * u"""XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, XMLSchema schema=None, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, target=None, compact=True)
+ * @cython.internal
+ * cdef class _ReadOnlyElementProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"The main read-only Element proxy class (for internal use only!)."
*
*/
-struct __pyx_vtabstruct_4lxml_5etree_XMLParser {
- struct __pyx_vtabstruct_4lxml_5etree__FeedParser __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy {
+ struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_XMLParser *__pyx_vtabptr_4lxml_5etree_XMLParser;
+static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1415
- *
- *
- * cdef class ETCompatXMLParser(XMLParser): # <<<<<<<<<<<<<<
- * u"""ETCompatXMLParser(self, encoding=None, attribute_defaults=False, \
- * dtd_validation=False, load_dtd=False, no_network=True, \
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":372
+ * @cython.final
+ * @cython.internal
+ * cdef class _OpaqueDocumentWrapper(_OpaqueNodeWrapper): # <<<<<<<<<<<<<<
+ * cdef int _assertNode(self) except -1:
+ * u"""This is our way of saying: this proxy is invalid!
*/
-struct __pyx_vtabstruct_4lxml_5etree_ETCompatXMLParser {
- struct __pyx_vtabstruct_4lxml_5etree_XMLParser __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper {
+ int (*_assertNode)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *);
+ PyObject *(*append)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *, PyObject *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_4lxml_5etree_ETCompatXMLParser *__pyx_vtabptr_4lxml_5etree_ETCompatXMLParser;
+static struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper *__pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper;
+static int __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *);
+static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *, PyObject *, int __pyx_skip_dispatch);
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1735
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":416
*
- * @cython.freelist(8)
- * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
- * object LxmlElementTree ]:
- * cdef _Document _doc
+ * @cython.internal
+ * cdef class _ModifyContentOnlyProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
+ * u"""A read-only proxy that allows changing the text content.
+ * """
*/
-struct __pyx_vtabstruct_4lxml_5etree__ElementTree {
- int (*_assertHasRoot)(struct LxmlElementTree *);
+struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy {
+ struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtabptr_4lxml_5etree__ElementTree;
-static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElementTree *);
+static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2668
- * self._storeNext(node)
- *
- * cdef class ElementDepthFirstIterator: # <<<<<<<<<<<<<<
- * u"""ElementDepthFirstIterator(self, node, tag=None, inclusive=True)
- * Iterates over an element and its sub-elements in document order (depth
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":439
+ * @cython.final
+ * @cython.internal
+ * cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
+ * u"""A read-only proxy that allows changing the text/target content of a
+ * processing instruction.
*/
-struct __pyx_vtabstruct_4lxml_5etree_ElementDepthFirstIterator {
- xmlNode *(*_nextNodeAnyTag)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
- xmlNode *(*_nextNodeMatchTag)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
+struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy {
+ struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_ElementDepthFirstIterator *__pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator;
-static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
-static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchTag(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *);
+static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":344
- * # attribute based lookup scheme
- *
- * cdef class AttributeBasedElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None)
- * Checks an attribute of an Element and looks up the value in a
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":456
+ * @cython.final
+ * @cython.internal
+ * cdef class _ModifyContentOnlyEntityProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<<
+ * u"A read-only proxy for entity references (for internal use only!)"
+ * property name:
*/
-struct __pyx_vtabstruct_4lxml_5etree_AttributeBasedElementClassLookup {
- struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyEntityProxy {
+ struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_AttributeBasedElementClassLookup *__pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup;
+static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyEntityProxy *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/iterparse.pxi":5
- * DEF __ITERPARSE_CHUNK_SIZE = 32768
- *
- * cdef class iterparse: # <<<<<<<<<<<<<<
- * u"""iterparse(self, source, events=("end",), tag=None, \
- * attribute_defaults=False, dtd_validation=False, \
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":472
+ * @cython.final
+ * @cython.internal
+ * cdef class _AppendOnlyElementProxy(_ReadOnlyElementProxy): # <<<<<<<<<<<<<<
+ * u"""A read-only element that allows adding children and changing the
+ * text content (i.e. everything that adds to the subtree).
*/
-struct __pyx_vtabstruct_4lxml_5etree_iterparse {
- PyObject *(*_close_source)(struct __pyx_obj_4lxml_5etree_iterparse *);
- int (*_read_more_events)(struct __pyx_obj_4lxml_5etree_iterparse *, struct __pyx_obj_4lxml_5etree__SaxParserContext *);
+struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy {
+ struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy __pyx_base;
+ PyObject *(*append)(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *, PyObject *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_4lxml_5etree_iterparse *__pyx_vtabptr_4lxml_5etree_iterparse;
-static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_4lxml_5etree_iterparse *);
-static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4lxml_5etree_iterparse *, struct __pyx_obj_4lxml_5etree__SaxParserContext *);
+static struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy *__pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy;
+static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *, PyObject *, int __pyx_skip_dispatch);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlid.pxi":58
- * return (_elementTreeFactory(doc, None), _IDDict(doc))
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":97
+ * raise TypeError, "Invalid child type: %r" % type(child)
*
- * cdef class _IDDict: # <<<<<<<<<<<<<<
- * u"""IDDict(self, etree)
- * A dictionary-like proxy class that mapps ID attributes to elements.
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__IDDict {
- PyObject *(*_build_keys)(struct __pyx_obj_4lxml_5etree__IDDict *);
- PyObject *(*_build_items)(struct __pyx_obj_4lxml_5etree__IDDict *);
-};
-static struct __pyx_vtabstruct_4lxml_5etree__IDDict *__pyx_vtabptr_4lxml_5etree__IDDict;
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":267
- * # DTD
+ * cdef class CommentBase(_Comment): # <<<<<<<<<<<<<<
+ * u"""All custom Comment classes must inherit from this one.
*
- * cdef class DTD(_Validator): # <<<<<<<<<<<<<<
- * u"""DTD(self, file=None, external_id=None)
- * A DTD validator.
*/
-struct __pyx_vtabstruct_4lxml_5etree_DTD {
- struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_CommentBase {
+ struct __pyx_vtabstruct_4lxml_5etree__Comment __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_DTD *__pyx_vtabptr_4lxml_5etree_DTD;
+static struct __pyx_vtabstruct_4lxml_5etree_CommentBase *__pyx_vtabptr_4lxml_5etree_CommentBase;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":334
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":126
+ * self._init()
*
- * @cython.no_gc_clear
- * cdef class XSLT: # <<<<<<<<<<<<<<
- * u"""XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)
+ * cdef class PIBase(_ProcessingInstruction): # <<<<<<<<<<<<<<
+ * u"""All custom Processing Instruction classes must inherit from this one.
*
*/
-struct __pyx_vtabstruct_4lxml_5etree_XSLT {
- xmlDoc *(*_run_transform)(struct __pyx_obj_4lxml_5etree_XSLT *, xmlDoc *, const char **, struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *);
+struct __pyx_vtabstruct_4lxml_5etree_PIBase {
+ struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_XSLT *__pyx_vtabptr_4lxml_5etree_XSLT;
+static struct __pyx_vtabstruct_4lxml_5etree_PIBase *__pyx_vtabptr_4lxml_5etree_PIBase;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":256
- * return message
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":157
+ * self._init()
*
- * cdef class _ListErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<<
- * u"Immutable base version of a list based error log."
- * cdef list _entries
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog {
- struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog __pyx_base;
-};
-static struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog *__pyx_vtabptr_4lxml_5etree__ListErrorLog;
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":382
- * cdef void* old_error_context
+ * cdef class EntityBase(_Entity): # <<<<<<<<<<<<<<
+ * u"""All custom Entity classes must inherit from this one.
*
- * cdef class _ErrorLog(_ListErrorLog): # <<<<<<<<<<<<<<
- * cdef list _logContexts
- * def __cinit__(self):
*/
-struct __pyx_vtabstruct_4lxml_5etree__ErrorLog {
- struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog __pyx_base;
- int (*__pyx___enter__)(struct __pyx_obj_4lxml_5etree__ErrorLog *);
- int (*connect)(struct __pyx_obj_4lxml_5etree__ErrorLog *);
- int (*disconnect)(struct __pyx_obj_4lxml_5etree__ErrorLog *);
- PyObject *(*clear)(struct __pyx_obj_4lxml_5etree__ErrorLog *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_4lxml_5etree_EntityBase {
+ struct __pyx_vtabstruct_4lxml_5etree__Entity __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *__pyx_vtabptr_4lxml_5etree__ErrorLog;
-static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etree__ErrorLog *);
-static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree__ErrorLog *);
-static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5etree__ErrorLog *);
+static struct __pyx_vtabstruct_4lxml_5etree_EntityBase *__pyx_vtabptr_4lxml_5etree_EntityBase;
+__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":448
- * _ErrorLog.receive(self, entry)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":223
+ * self._lookup_function = NULL # use default lookup
*
- * cdef class _RotatingErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
- * cdef int _max_len
- * def __init__(self, max_len):
+ * cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<
+ * [ type LxmlFallbackElementClassLookupType,
+ * object LxmlFallbackElementClassLookup ]:
*/
-struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog {
- struct __pyx_vtabstruct_4lxml_5etree__ErrorLog __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup {
+ void (*_setFallback)(struct LxmlFallbackElementClassLookup *, struct LxmlElementClassLookup *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog *__pyx_vtabptr_4lxml_5etree__RotatingErrorLog;
+static struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/schematron.pxi":22
- * # Schematron
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":344
+ * # attribute based lookup scheme
*
- * cdef class Schematron(_Validator): # <<<<<<<<<<<<<<
- * u"""Schematron(self, etree=None, file=None)
- * A Schematron validator.
+ * cdef class AttributeBasedElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None)
+ * Checks an attribute of an Element and looks up the value in a
*/
-struct __pyx_vtabstruct_4lxml_5etree_Schematron {
- struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_AttributeBasedElementClassLookup {
+ struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_Schematron *__pyx_vtabptr_4lxml_5etree_Schematron;
+static struct __pyx_vtabstruct_4lxml_5etree_AttributeBasedElementClassLookup *__pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":396
static struct __pyx_vtabstruct_4lxml_5etree_ParserBasedElementClassLookup *__pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":39
- *
- * @cython.freelist(16)
- * cdef class _LogEntry: # <<<<<<<<<<<<<<
- * """A log message entry from an error log.
- *
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__LogEntry {
- PyObject *(*_setError)(struct __pyx_obj_4lxml_5etree__LogEntry *, xmlError *);
- PyObject *(*_setGeneric)(struct __pyx_obj_4lxml_5etree__LogEntry *, int, int, int, int, PyObject *, PyObject *);
-};
-static struct __pyx_vtabstruct_4lxml_5etree__LogEntry *__pyx_vtabptr_4lxml_5etree__LogEntry;
-static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxml_5etree__LogEntry *, xmlError *);
-static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4lxml_5etree__LogEntry *, int, int, int, int, PyObject *, PyObject *);
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":113
- * @cython.final
- * @cython.internal
- * cdef class _ResolverRegistry: # <<<<<<<<<<<<<<
- * cdef object _resolvers
- * cdef Resolver _default_resolver
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry {
- struct __pyx_obj_4lxml_5etree__ResolverRegistry *(*_copy)(struct __pyx_obj_4lxml_5etree__ResolverRegistry *);
-};
-static struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry *__pyx_vtabptr_4lxml_5etree__ResolverRegistry;
-static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(struct __pyx_obj_4lxml_5etree__ResolverRegistry *);
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1636
- * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":413
+ * # custom class lookup based on node type, namespace, name
*
- * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<<
- * property tag:
- * def __get__(self):
+ * cdef class CustomElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""CustomElementClassLookup(self, fallback=None)
+ * Element class lookup based on a subclass method.
*/
-struct __pyx_vtabstruct_4lxml_5etree__Entity {
- struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_CustomElementClassLookup {
+ struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__Entity *__pyx_vtabptr_4lxml_5etree__Entity;
+static struct __pyx_vtabstruct_4lxml_5etree_CustomElementClassLookup *__pyx_vtabptr_4lxml_5etree_CustomElementClassLookup;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":1578
- * return []
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":468
+ * # read-only tree based class lookup
*
- * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<<
- * property tag:
- * def __get__(self):
+ * cdef class PythonElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""PythonElementClassLookup(self, fallback=None)
+ * Element class lookup based on a subclass method.
*/
-struct __pyx_vtabstruct_4lxml_5etree__Comment {
- struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_PythonElementClassLookup {
+ struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__Comment *__pyx_vtabptr_4lxml_5etree__Comment;
+static struct __pyx_vtabstruct_4lxml_5etree_PythonElementClassLookup *__pyx_vtabptr_4lxml_5etree_PythonElementClassLookup;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":97
- * raise TypeError, "Invalid child type: %r" % type(child)
- *
- * cdef class CommentBase(_Comment): # <<<<<<<<<<<<<<
- * u"""All custom Comment classes must inherit from this one.
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":15
*
- */
-
-struct __pyx_vtabstruct_4lxml_5etree_CommentBase {
- struct __pyx_vtabstruct_4lxml_5etree__Comment __pyx_base;
-};
-static struct __pyx_vtabstruct_4lxml_5etree_CommentBase *__pyx_vtabptr_4lxml_5etree_CommentBase;
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlschema.pxi":170
- * @cython.final
* @cython.internal
- * cdef class _ParserSchemaValidationContext: # <<<<<<<<<<<<<<
- * cdef XMLSchema _schema
- * cdef xmlschema.xmlSchemaValidCtxt* _valid_ctxt
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__ParserSchemaValidationContext {
- struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *(*copy)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
- void (*inject_default_attributes)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlDoc *);
- int (*connect)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlParserCtxt *, struct __pyx_obj_4lxml_5etree__BaseErrorLog *);
- void (*disconnect)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
- int (*isvalid)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
-};
-static struct __pyx_vtabstruct_4lxml_5etree__ParserSchemaValidationContext *__pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext;
-static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
-static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlDoc *);
-static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlParserCtxt *, struct __pyx_obj_4lxml_5etree__BaseErrorLog *);
-static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
-static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2594
- * return False
- *
- * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<<
- * cdef _Element _node
- * cdef _node_to_node_function _next_element
+ * cdef class _NamespaceRegistry: # <<<<<<<<<<<<<<
+ * u"Dictionary-like namespace registry"
+ * cdef object _ns_uri
*/
-struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator {
- PyObject *(*_initTagMatcher)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, PyObject *);
- int (*_storeNext)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *);
+struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry {
+ PyObject *(*_get)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, PyObject *);
+ PyObject *(*_getForString)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, char *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
-static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, PyObject *);
-static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *);
+static struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry *__pyx_vtabptr_4lxml_5etree__NamespaceRegistry;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2643
- * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None
- *
- * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
- * u"""SiblingsIterator(self, node, tag=None, preceding=False)
- * Iterates over the siblings of an element.
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":87
+ * @cython.final
+ * @cython.internal
+ * cdef class _ClassNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
+ * u"Dictionary-like registry for namespace implementation classes"
+ * def __setitem__(self, name, item):
*/
-struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator {
- struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ClassNamespaceRegistry {
+ struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator *__pyx_vtabptr_4lxml_5etree_SiblingsIterator;
+static struct __pyx_vtabstruct_4lxml_5etree__ClassNamespaceRegistry *__pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":275
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":101
*
- * @cython.internal
- * cdef class _ReadOnlyElementProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"The main read-only Element proxy class (for internal use only!)."
+ *
+ * cdef class ElementNamespaceClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
+ * u"""ElementNamespaceClassLookup(self, fallback=None)
*
*/
-struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy {
- struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_ElementNamespaceClassLookup {
+ struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy;
+static struct __pyx_vtabstruct_4lxml_5etree_ElementNamespaceClassLookup *__pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":472
- * @cython.final
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":192
+ *
* @cython.internal
- * cdef class _AppendOnlyElementProxy(_ReadOnlyElementProxy): # <<<<<<<<<<<<<<
- * u"""A read-only element that allows adding children and changing the
- * text content (i.e. everything that adds to the subtree).
+ * cdef class _FunctionNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
+ * def __setitem__(self, name, item):
+ * if not callable(item):
*/
-struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy {
- struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy __pyx_base;
- PyObject *(*append)(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *, PyObject *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry {
+ struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy *__pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy;
-static PyObject *__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *, PyObject *, int __pyx_skip_dispatch);
+static struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry *__pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":372
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":207
* @cython.final
* @cython.internal
- * cdef class _OpaqueDocumentWrapper(_OpaqueNodeWrapper): # <<<<<<<<<<<<<<
- * cdef int _assertNode(self) except -1:
- * u"""This is our way of saying: this proxy is invalid!
+ * cdef class _XPathFunctionNamespaceRegistry(_FunctionNamespaceRegistry): # <<<<<<<<<<<<<<
+ * cdef object _prefix
+ * cdef bytes _prefix_utf
*/
-struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper {
- int (*_assertNode)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *);
- PyObject *(*append)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *, PyObject *, int __pyx_skip_dispatch);
+struct __pyx_vtabstruct_4lxml_5etree__XPathFunctionNamespaceRegistry {
+ struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper *__pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper;
-static int __pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *);
-static PyObject *__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *, PyObject *, int __pyx_skip_dispatch);
+static struct __pyx_vtabstruct_4lxml_5etree__XPathFunctionNamespaceRegistry *__pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2658
- * self._storeNext(node)
- *
- * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
- * u"""AncestorsIterator(self, node, tag=None)
- * Iterates over the ancestors of an element (from parent to parent).
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":113
+ * @cython.final
+ * @cython.internal
+ * cdef class _ResolverRegistry: # <<<<<<<<<<<<<<
+ * cdef object _resolvers
+ * cdef Resolver _default_resolver
*/
-struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator {
- struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry {
+ struct __pyx_obj_4lxml_5etree__ResolverRegistry *(*_copy)(struct __pyx_obj_4lxml_5etree__ResolverRegistry *);
};
-static struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator *__pyx_vtabptr_4lxml_5etree_AncestorsIterator;
+static struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry *__pyx_vtabptr_4lxml_5etree__ResolverRegistry;
+static struct __pyx_obj_4lxml_5etree__ResolverRegistry *__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(struct __pyx_obj_4lxml_5etree__ResolverRegistry *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":257
- * @cython.final
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/docloader.pxi":161
+ *
* @cython.internal
- * cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"A read-only proxy for entity references (for internal use only!)"
- * property name:
+ * cdef class _ResolverContext(_ExceptionContext): # <<<<<<<<<<<<<<
+ * cdef _ResolverRegistry _resolvers
+ * cdef _TempStore _storage
*/
-struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyEntityProxy {
- struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ResolverContext {
+ struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyEntityProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy;
+static struct __pyx_vtabstruct_4lxml_5etree__ResolverContext *__pyx_vtabptr_4lxml_5etree__ResolverContext;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":503
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":504
*
* @cython.internal
* cdef class _ParserContext(_ResolverContext): # <<<<<<<<<<<<<<
static void __pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserContext(struct __pyx_obj_4lxml_5etree__TargetParserContext *, xmlDoc *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":157
- * self._init()
- *
- * cdef class EntityBase(_Entity): # <<<<<<<<<<<<<<
- * u"""All custom Entity classes must inherit from this one.
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlschema.pxi":170
+ * @cython.final
+ * @cython.internal
+ * cdef class _ParserSchemaValidationContext: # <<<<<<<<<<<<<<
+ * cdef XMLSchema _schema
+ * cdef xmlschema.xmlSchemaValidCtxt* _valid_ctxt
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__ParserSchemaValidationContext {
+ struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *(*copy)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
+ void (*inject_default_attributes)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlDoc *);
+ int (*connect)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlParserCtxt *, struct __pyx_obj_4lxml_5etree__BaseErrorLog *);
+ void (*disconnect)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
+ int (*isvalid)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__ParserSchemaValidationContext *__pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext;
+static struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
+static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlDoc *);
+static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlParserCtxt *, struct __pyx_obj_4lxml_5etree__BaseErrorLog *);
+static void __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
+static int __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *);
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3253
+ * pass
*
+ * cdef class _Validator: # <<<<<<<<<<<<<<
+ * u"Base class for XML validators."
+ * cdef _ErrorLog _error_log
*/
-struct __pyx_vtabstruct_4lxml_5etree_EntityBase {
- struct __pyx_vtabstruct_4lxml_5etree__Entity __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__Validator {
+ PyObject *(*_append_log_message)(struct __pyx_obj_4lxml_5etree__Validator *, int, int, int, int, PyObject *, PyObject *, int __pyx_skip_dispatch);
+ PyObject *(*_clear_error_log)(struct __pyx_obj_4lxml_5etree__Validator *, int __pyx_skip_dispatch);
};
-static struct __pyx_vtabstruct_4lxml_5etree_EntityBase *__pyx_vtabptr_4lxml_5etree_EntityBase;
+static struct __pyx_vtabstruct_4lxml_5etree__Validator *__pyx_vtabptr_4lxml_5etree__Validator;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlschema.pxi":26
static struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *__pyx_vtabptr_4lxml_5etree_XMLSchema;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/iterparse.pxi":203
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":42
+ * @cython.final
+ * @cython.internal
+ * cdef class _ParserDictionaryContext: # <<<<<<<<<<<<<<
+ * # Global parser context to share the string dictionary.
+ * #
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext {
+ void (*initMainParserContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+ struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *(*_findThreadParserContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+ void (*setDefaultParser)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
+ struct __pyx_obj_4lxml_5etree__BaseParser *(*getDefaultParser)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+ xmlDict *(*_getThreadDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict *);
+ void (*initThreadDictRef)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict **);
+ void (*initParserDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlParserCtxt *);
+ void (*initXPathParserDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlXPathContext *);
+ void (*initDocDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDoc *);
+ struct __pyx_obj_4lxml_5etree__ParserContext *(*findImpliedContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+ void (*pushImpliedContextFromParser)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
+ void (*pushImpliedContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__ParserContext *);
+ void (*popImpliedContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext *__pyx_vtabptr_4lxml_5etree__ParserDictionaryContext;
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
+static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict *);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict **);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlParserCtxt *);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlXPathContext *);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDoc *);
+static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_ParserDictionaryContext_findImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFromParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__ParserContext *);
+static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":253
+ * @cython.final
+ * @cython.internal
+ * cdef class _FileReaderContext: # <<<<<<<<<<<<<<
+ * cdef object _filelike
+ * cdef object _encoding
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext {
+ PyObject *(*_close_file)(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
+ xmlParserInputBuffer *(*_createParserInputBuffer)(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
+ xmlParserInput *(*_createParserInput)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *);
+ xmlDtd *(*_readDtd)(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
+ xmlDoc *(*_readDoc)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *, int);
+ int (*copyToBuffer)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, char *, int);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext *__pyx_vtabptr_4lxml_5etree__FileReaderContext;
+static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
+static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserInputBuffer(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
+static xmlParserInput *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserInput(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *);
+static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
+static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *, int);
+static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_obj_4lxml_5etree__FileReaderContext *, char *, int);
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1143
+ * ############################################################
*
+ * cdef class _FeedParser(_BaseParser): # <<<<<<<<<<<<<<
+ * cdef bint _feed_parser_running
*
- * cdef class iterwalk: # <<<<<<<<<<<<<<
- * u"""iterwalk(self, element_or_tree, events=("end",), tag=None)
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__FeedParser {
+ struct __pyx_vtabstruct_4lxml_5etree__BaseParser __pyx_base;
+ PyObject *(*feed)(struct __pyx_obj_4lxml_5etree__FeedParser *, PyObject *, int __pyx_skip_dispatch);
+ PyObject *(*close)(struct __pyx_obj_4lxml_5etree__FeedParser *, int __pyx_skip_dispatch);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__FeedParser *__pyx_vtabptr_4lxml_5etree__FeedParser;
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1359
+ * )
+ *
+ * cdef class XMLParser(_FeedParser): # <<<<<<<<<<<<<<
+ * u"""XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, XMLSchema schema=None, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, target=None, compact=True)
*
*/
-struct __pyx_vtabstruct_4lxml_5etree_iterwalk {
- int (*_start_node)(struct __pyx_obj_4lxml_5etree_iterwalk *, struct LxmlElement *);
- struct LxmlElement *(*_end_node)(struct __pyx_obj_4lxml_5etree_iterwalk *);
+struct __pyx_vtabstruct_4lxml_5etree_XMLParser {
+ struct __pyx_vtabstruct_4lxml_5etree__FeedParser __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_iterwalk *__pyx_vtabptr_4lxml_5etree_iterwalk;
+static struct __pyx_vtabstruct_4lxml_5etree_XMLParser *__pyx_vtabptr_4lxml_5etree_XMLParser;
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1442
+ *
+ *
+ * cdef class XMLPullParser(XMLParser): # <<<<<<<<<<<<<<
+ * """XMLPullParser(self, events=None, *, tag=None, **kwargs)
+ *
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser {
+ struct __pyx_vtabstruct_4lxml_5etree_XMLParser __pyx_base;
+};
+static struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *__pyx_vtabptr_4lxml_5etree_XMLPullParser;
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1471
+ *
+ *
+ * cdef class ETCompatXMLParser(XMLParser): # <<<<<<<<<<<<<<
+ * u"""ETCompatXMLParser(self, encoding=None, attribute_defaults=False, \
+ * dtd_validation=False, load_dtd=False, no_network=True, \
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree_ETCompatXMLParser {
+ struct __pyx_vtabstruct_4lxml_5etree_XMLParser __pyx_base;
+};
+static struct __pyx_vtabstruct_4lxml_5etree_ETCompatXMLParser *__pyx_vtabptr_4lxml_5etree_ETCompatXMLParser;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1494
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1550
* )
*
* cdef class HTMLParser(_FeedParser): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_4lxml_5etree_HTMLParser *__pyx_vtabptr_4lxml_5etree_HTMLParser;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1550
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1606
*
*
* cdef class HTMLPullParser(HTMLParser): # <<<<<<<<<<<<<<
static struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *__pyx_vtabptr_4lxml_5etree_HTMLPullParser;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":257
- * @cython.final
- * @cython.internal
- * cdef class _TempStore: # <<<<<<<<<<<<<<
- * cdef list _storage
- * def __init__(self):
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__TempStore {
- int (*add)(struct __pyx_obj_4lxml_5etree__TempStore *, PyObject *);
- int (*clear)(struct __pyx_obj_4lxml_5etree__TempStore *);
-};
-static struct __pyx_vtabstruct_4lxml_5etree__TempStore *__pyx_vtabptr_4lxml_5etree__TempStore;
-static int __pyx_f_4lxml_5etree_10_TempStore_add(struct __pyx_obj_4lxml_5etree__TempStore *, PyObject *);
-static int __pyx_f_4lxml_5etree_10_TempStore_clear(struct __pyx_obj_4lxml_5etree__TempStore *);
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":369
- * @cython.final
- * @cython.internal
- * cdef class _FilelikeWriter: # <<<<<<<<<<<<<<
- * cdef object _filelike
- * cdef object _close_filelike
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter {
- xmlOutputBuffer *(*_createOutputBuffer)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, xmlCharEncodingHandler *);
- int (*write)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, char *, int);
- int (*close)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *);
-};
-static struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter *__pyx_vtabptr_4lxml_5etree__FilelikeWriter;
-static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, xmlCharEncodingHandler *);
-static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, char *, int);
-static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5etree__FilelikeWriter *);
-
-
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":41
*
*
static struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget *__pyx_vtabptr_4lxml_5etree__SaxParserTarget;
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":627
+ * ############################################################
+ *
+ * cdef class TreeBuilder(_SaxParserTarget): # <<<<<<<<<<<<<<
+ * u"""TreeBuilder(self, element_factory=None, parser=None)
+ * Parser target that builds a tree.
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree_TreeBuilder {
+ struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget __pyx_base;
+ int (*_flush)(struct __pyx_obj_4lxml_5etree_TreeBuilder *);
+};
+static struct __pyx_vtabstruct_4lxml_5etree_TreeBuilder *__pyx_vtabptr_4lxml_5etree_TreeBuilder;
+static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etree_TreeBuilder *);
+
+
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parsertarget.pxi":15
* @cython.final
* @cython.internal
};
static struct __pyx_vtabstruct_4lxml_5etree__PythonSaxParserTarget *__pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget;
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2385
- *
- *
- * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
- * type LxmlElementTagMatcherType ]:
- * """
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":369
+ * @cython.final
+ * @cython.internal
+ * cdef class _FilelikeWriter: # <<<<<<<<<<<<<<
+ * cdef object _filelike
+ * cdef object _close_filelike
*/
-struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher {
- PyObject *(*_initTagMatch)(struct LxmlElementTagMatcher *, PyObject *);
+struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter {
+ xmlOutputBuffer *(*_createOutputBuffer)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, xmlCharEncodingHandler *);
+ int (*write)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, char *, int);
+ int (*close)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtabptr_4lxml_5etree__ElementTagMatcher;
+static struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter *__pyx_vtabptr_4lxml_5etree__FilelikeWriter;
+static xmlOutputBuffer *__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, xmlCharEncodingHandler *);
+static int __pyx_f_4lxml_5etree_15_FilelikeWriter_write(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, char *, int);
+static int __pyx_f_4lxml_5etree_15_FilelikeWriter_close(struct __pyx_obj_4lxml_5etree__FilelikeWriter *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":252
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/serializer.pxi":651
* @cython.final
* @cython.internal
- * cdef class _FileReaderContext: # <<<<<<<<<<<<<<
- * cdef object _filelike
- * cdef object _encoding
+ * cdef class _IncrementalFileWriter: # <<<<<<<<<<<<<<
+ * cdef tree.xmlOutputBuffer* _c_out
+ * cdef bytes _encoding
*/
-struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext {
- PyObject *(*_close_file)(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
- xmlParserInputBuffer *(*_createParserInputBuffer)(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
- xmlParserInput *(*_createParserInput)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *);
- xmlDtd *(*_readDtd)(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
- xmlDoc *(*_readDoc)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *, int);
- int (*copyToBuffer)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, char *, int);
+struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter {
+ PyObject *(*_write_qname)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *);
+ PyObject *(*_write_start_element)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+ PyObject *(*_write_attributes_and_namespaces)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
+ PyObject *(*_write_attributes_list)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+ PyObject *(*_write_end_element)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+ PyObject *(*_find_prefix)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
+ PyObject *(*_collect_namespaces)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+ PyObject *(*_close)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
+ PyObject *(*_handle_error)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
};
-static struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext *__pyx_vtabptr_4lxml_5etree__FileReaderContext;
-static PyObject *__pyx_f_4lxml_5etree_18_FileReaderContext__close_file(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
-static xmlParserInputBuffer *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserInputBuffer(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
-static xmlParserInput *__pyx_f_4lxml_5etree_18_FileReaderContext__createParserInput(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *);
-static xmlDtd *__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd(struct __pyx_obj_4lxml_5etree__FileReaderContext *);
-static xmlDoc *__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *, int);
-static int __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(struct __pyx_obj_4lxml_5etree__FileReaderContext *, char *, int);
+static struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter *__pyx_vtabptr_4lxml_5etree__IncrementalFileWriter;
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_element(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes_and_namespaces(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_attributes_list(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_end_element(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__find_prefix(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__collect_namespaces(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__close(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
+static PyObject *__pyx_f_4lxml_5etree_22_IncrementalFileWriter__handle_error(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, int);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2623
- * return current_node
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/iterparse.pxi":5
+ * DEF __ITERPARSE_CHUNK_SIZE = 32768
*
- * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<<
- * u"""ElementChildIterator(self, node, tag=None, reversed=False)
- * Iterates over the children of an element.
+ * cdef class iterparse: # <<<<<<<<<<<<<<
+ * u"""iterparse(self, source, events=("end",), tag=None, \
+ * attribute_defaults=False, dtd_validation=False, \
*/
-struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator {
- struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_iterparse {
+ PyObject *(*_close_source)(struct __pyx_obj_4lxml_5etree_iterparse *);
+ int (*_read_more_events)(struct __pyx_obj_4lxml_5etree_iterparse *, struct __pyx_obj_4lxml_5etree__SaxParserContext *);
};
-static struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator *__pyx_vtabptr_4lxml_5etree_ElementChildIterator;
+static struct __pyx_vtabstruct_4lxml_5etree_iterparse *__pyx_vtabptr_4lxml_5etree_iterparse;
+static PyObject *__pyx_f_4lxml_5etree_9iterparse__close_source(struct __pyx_obj_4lxml_5etree_iterparse *);
+static int __pyx_f_4lxml_5etree_9iterparse__read_more_events(struct __pyx_obj_4lxml_5etree_iterparse *, struct __pyx_obj_4lxml_5etree__SaxParserContext *);
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2416
- * self._name = NULL
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/iterparse.pxi":203
+ *
+ *
+ * cdef class iterwalk: # <<<<<<<<<<<<<<
+ * u"""iterwalk(self, element_or_tree, events=("end",), tag=None)
*
- * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
- * object LxmlElementIterator, type LxmlElementIteratorType ]:
- * """
*/
-struct __pyx_vtabstruct_4lxml_5etree__ElementIterator {
- struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher __pyx_base;
- void (*_storeNext)(struct LxmlElementIterator *, struct LxmlElement *);
+struct __pyx_vtabstruct_4lxml_5etree_iterwalk {
+ int (*_start_node)(struct __pyx_obj_4lxml_5etree_iterwalk *, struct LxmlElement *);
+ struct LxmlElement *(*_end_node)(struct __pyx_obj_4lxml_5etree_iterwalk *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementIterator *__pyx_vtabptr_4lxml_5etree__ElementIterator;
+static struct __pyx_vtabstruct_4lxml_5etree_iterwalk *__pyx_vtabptr_4lxml_5etree_iterwalk;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/nsclasses.pxi":87
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlid.pxi":58
+ * return (_elementTreeFactory(doc, None), _IDDict(doc))
+ *
+ * cdef class _IDDict: # <<<<<<<<<<<<<<
+ * u"""IDDict(self, etree)
+ * A dictionary-like proxy class that mapps ID attributes to elements.
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__IDDict {
+ PyObject *(*_build_keys)(struct __pyx_obj_4lxml_5etree__IDDict *);
+ PyObject *(*_build_items)(struct __pyx_obj_4lxml_5etree__IDDict *);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__IDDict *__pyx_vtabptr_4lxml_5etree__IDDict;
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":456
* @cython.final
* @cython.internal
- * cdef class _ClassNamespaceRegistry(_NamespaceRegistry): # <<<<<<<<<<<<<<
- * u"Dictionary-like registry for namespace implementation classes"
- * def __setitem__(self, name, item):
+ * cdef class _ExsltRegExp: # <<<<<<<<<<<<<<
+ * cdef dict _compile_map
+ * def __cinit__(self):
*/
-struct __pyx_vtabstruct_4lxml_5etree__ClassNamespaceRegistry {
- struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp {
+ PyObject *(*_make_string)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *);
+ PyObject *(*_compile)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *, PyObject *);
+ PyObject *(*_register_in_context)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, struct __pyx_obj_4lxml_5etree__BaseContext *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__ClassNamespaceRegistry *__pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry;
+static struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp *__pyx_vtabptr_4lxml_5etree__ExsltRegExp;
+static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, struct __pyx_obj_4lxml_5etree__BaseContext *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":698
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":32
*
+ * @cython.internal
+ * cdef class _BaseContext: # <<<<<<<<<<<<<<
+ * cdef xpath.xmlXPathContext* _xpathCtxt
+ * cdef _Document _doc
+ */
+
+struct __pyx_vtabstruct_4lxml_5etree__BaseContext {
+ struct __pyx_obj_4lxml_5etree__BaseContext *(*_copy)(struct __pyx_obj_4lxml_5etree__BaseContext *);
+ PyObject *(*_to_utf)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
+ void (*_set_xpath_context)(struct __pyx_obj_4lxml_5etree__BaseContext *, xmlXPathContext *);
+ PyObject *(*_register_context)(struct __pyx_obj_4lxml_5etree__BaseContext *, struct LxmlDocument *);
+ PyObject *(*_cleanup_context)(struct __pyx_obj_4lxml_5etree__BaseContext *);
+ PyObject *(*_release_context)(struct __pyx_obj_4lxml_5etree__BaseContext *);
+ PyObject *(*addNamespace)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *, PyObject *);
+ PyObject *(*registerNamespace)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *, PyObject *);
+ PyObject *(*registerLocalNamespaces)(struct __pyx_obj_4lxml_5etree__BaseContext *);
+ PyObject *(*registerGlobalNamespaces)(struct __pyx_obj_4lxml_5etree__BaseContext *);
+ PyObject *(*unregisterGlobalNamespaces)(struct __pyx_obj_4lxml_5etree__BaseContext *);
+ void (*_unregisterNamespace)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
+ int (*_addLocalExtensionFunction)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *, PyObject *, PyObject *);
+ PyObject *(*registerGlobalFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
+ PyObject *(*registerLocalFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
+ PyObject *(*unregisterAllFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
+ PyObject *(*unregisterGlobalFunctions)(struct __pyx_obj_4lxml_5etree__BaseContext *, void *, __pyx_t_4lxml_5etree__register_function);
+ PyObject *(*_find_cached_function)(struct __pyx_obj_4lxml_5etree__BaseContext *, const xmlChar *, const xmlChar *);
+ PyObject *(*_release_temp_refs)(struct __pyx_obj_4lxml_5etree__BaseContext *);
+ PyObject *(*_hold)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
+ struct LxmlDocument *(*_findDocumentForNode)(struct __pyx_obj_4lxml_5etree__BaseContext *, xmlNode *);
+};
+static struct __pyx_vtabstruct_4lxml_5etree__BaseContext *__pyx_vtabptr_4lxml_5etree__BaseContext;
+static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__register_context(struct __pyx_obj_4lxml_5etree__BaseContext *, struct LxmlDocument *);
+static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__cleanup_context(struct __pyx_obj_4lxml_5etree__BaseContext *);
+static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_context(struct __pyx_obj_4lxml_5etree__BaseContext *);
+static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struct __pyx_obj_4lxml_5etree__BaseContext *, const xmlChar *, const xmlChar *);
+static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__release_temp_refs(struct __pyx_obj_4lxml_5etree__BaseContext *);
+static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__hold(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *);
+static struct LxmlDocument *__pyx_f_4lxml_5etree_12_BaseContext__findDocumentForNode(struct __pyx_obj_4lxml_5etree__BaseContext *, xmlNode *);
+
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":52
* @cython.final
- * cdef class _XSLTResultTree(_ElementTree): # <<<<<<<<<<<<<<
- * cdef XSLT _xslt
- * cdef _Document _profile
+ * @cython.internal
+ * cdef class _XPathContext(_BaseContext): # <<<<<<<<<<<<<<
+ * cdef object _variables
+ * def __init__(self, namespaces, extensions, error_log, enable_regexp, variables,
*/
-struct __pyx_vtabstruct_4lxml_5etree__XSLTResultTree {
- struct __pyx_vtabstruct_4lxml_5etree__ElementTree __pyx_base;
- PyObject *(*_saveToStringAndSize)(struct __pyx_obj_4lxml_5etree__XSLTResultTree *, xmlChar **, int *);
+struct __pyx_vtabstruct_4lxml_5etree__XPathContext {
+ struct __pyx_vtabstruct_4lxml_5etree__BaseContext __pyx_base;
+ PyObject *(*set_context)(struct __pyx_obj_4lxml_5etree__XPathContext *, xmlXPathContext *);
+ PyObject *(*register_context)(struct __pyx_obj_4lxml_5etree__XPathContext *, struct LxmlDocument *);
+ PyObject *(*unregister_context)(struct __pyx_obj_4lxml_5etree__XPathContext *);
+ void (*registerExsltFunctions)(struct __pyx_obj_4lxml_5etree__XPathContext *);
+ PyObject *(*registerVariables)(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *);
+ PyObject *(*registerVariable)(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *, PyObject *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__XSLTResultTree *__pyx_vtabptr_4lxml_5etree__XSLTResultTree;
-static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(struct __pyx_obj_4lxml_5etree__XSLTResultTree *, xmlChar **, int *);
+static struct __pyx_vtabstruct_4lxml_5etree__XPathContext *__pyx_vtabptr_4lxml_5etree__XPathContext;
+static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_obj_4lxml_5etree__XPathContext *, xmlXPathContext *);
+static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __pyx_obj_4lxml_5etree__XPathContext *, struct LxmlDocument *);
+static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct __pyx_obj_4lxml_5etree__XPathContext *);
+static void __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(struct __pyx_obj_4lxml_5etree__XPathContext *);
+static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *);
+static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *, PyObject *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":468
- * # read-only tree based class lookup
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":123
+ * _XPATH_VERSION_WARNING_REQUIRED = 0
*
- * cdef class PythonElementClassLookup(FallbackElementClassLookup): # <<<<<<<<<<<<<<
- * u"""PythonElementClassLookup(self, fallback=None)
- * Element class lookup based on a subclass method.
+ * cdef class _XPathEvaluatorBase: # <<<<<<<<<<<<<<
+ * cdef xpath.xmlXPathContext* _xpathCtxt
+ * cdef _XPathContext _context
*/
-struct __pyx_vtabstruct_4lxml_5etree_PythonElementClassLookup {
- struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase {
+ PyObject *(*set_context)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathContext *);
+ int (*_checkAbsolutePath)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, char *);
+ int (*_lock)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
+ void (*_unlock)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
+ PyObject *(*_raise_parse_error)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
+ PyObject *(*_raise_eval_error)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
+ PyObject *(*_handle_result)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathObject *, struct LxmlDocument *);
};
-static struct __pyx_vtabstruct_4lxml_5etree_PythonElementClassLookup *__pyx_vtabptr_4lxml_5etree_PythonElementClassLookup;
+static struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
+static int __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
+static void __pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *);
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":249
static struct __pyx_vtabstruct_4lxml_5etree_XPathDocumentEvaluator *__pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1386
- *
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":405
*
- * cdef class XMLPullParser(XMLParser): # <<<<<<<<<<<<<<
- * """XMLPullParser(self, events=None, *, tag=None, **kwargs)
*
+ * cdef class XPath(_XPathEvaluatorBase): # <<<<<<<<<<<<<<
+ * u"""XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True)
+ * A compiled XPath expression that can be called on Elements and ElementTrees.
*/
-struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser {
- struct __pyx_vtabstruct_4lxml_5etree_XMLParser __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree_XPath {
+ struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *__pyx_vtabptr_4lxml_5etree_XMLPullParser;
+static struct __pyx_vtabstruct_4lxml_5etree_XPath *__pyx_vtabptr_4lxml_5etree_XPath;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":52
- * @cython.final
- * @cython.internal
- * cdef class _XPathContext(_BaseContext): # <<<<<<<<<<<<<<
- * cdef object _variables
- * def __init__(self, namespaces, extensions, error_log, enable_regexp, variables,
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":481
+ * _find_namespaces = re.compile(b'({[^}]+})').findall
+ *
+ * cdef class ETXPath(XPath): # <<<<<<<<<<<<<<
+ * u"""ETXPath(self, path, extensions=None, regexp=True, smart_strings=True)
+ * Special XPath class that supports the ElementTree {uri} notation for namespaces.
*/
-struct __pyx_vtabstruct_4lxml_5etree__XPathContext {
- struct __pyx_vtabstruct_4lxml_5etree__BaseContext __pyx_base;
- PyObject *(*set_context)(struct __pyx_obj_4lxml_5etree__XPathContext *, xmlXPathContext *);
- PyObject *(*register_context)(struct __pyx_obj_4lxml_5etree__XPathContext *, struct LxmlDocument *);
- PyObject *(*unregister_context)(struct __pyx_obj_4lxml_5etree__XPathContext *);
- void (*registerExsltFunctions)(struct __pyx_obj_4lxml_5etree__XPathContext *);
- PyObject *(*registerVariables)(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *);
- PyObject *(*registerVariable)(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *, PyObject *);
+struct __pyx_vtabstruct_4lxml_5etree_ETXPath {
+ struct __pyx_vtabstruct_4lxml_5etree_XPath __pyx_base;
+ PyObject *(*_nsextract_path)(struct __pyx_obj_4lxml_5etree_ETXPath *, PyObject *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__XPathContext *__pyx_vtabptr_4lxml_5etree__XPathContext;
-static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_set_context(struct __pyx_obj_4lxml_5etree__XPathContext *, xmlXPathContext *);
-static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_register_context(struct __pyx_obj_4lxml_5etree__XPathContext *, struct LxmlDocument *);
-static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_unregister_context(struct __pyx_obj_4lxml_5etree__XPathContext *);
-static void __pyx_f_4lxml_5etree_13_XPathContext_registerExsltFunctions(struct __pyx_obj_4lxml_5etree__XPathContext *);
-static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariables(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_13_XPathContext_registerVariable(struct __pyx_obj_4lxml_5etree__XPathContext *, PyObject *, PyObject *);
+static struct __pyx_vtabstruct_4lxml_5etree_ETXPath *__pyx_vtabptr_4lxml_5etree_ETXPath;
-__PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlDocumentType;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":317
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":52
* @cython.final
- * @cython.freelist(8)
- * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
- * u"""Internal base class to reference a libxml document.
- *
+ * @cython.internal
+ * cdef class _XSLTResolverContext(_ResolverContext): # <<<<<<<<<<<<<<
+ * cdef xmlDoc* _c_style_doc
+ * cdef _BaseParser _parser
*/
-struct __pyx_vtabstruct_4lxml_5etree__Document {
- PyObject *(*getroot)(struct LxmlDocument *);
- int (*hasdoctype)(struct LxmlDocument *);
- PyObject *(*getdoctype)(struct LxmlDocument *);
- PyObject *(*getxmlinfo)(struct LxmlDocument *);
- PyObject *(*isstandalone)(struct LxmlDocument *);
- PyObject *(*buildNewPrefix)(struct LxmlDocument *);
- xmlNs *(*_findOrBuildNodeNs)(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *, int);
- int (*_setNodeNs)(struct LxmlDocument *, xmlNode *, const xmlChar *);
+struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext {
+ struct __pyx_vtabstruct_4lxml_5etree__ResolverContext __pyx_base;
+ struct __pyx_obj_4lxml_5etree__XSLTResolverContext *(*_copy)(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtabptr_4lxml_5etree__Document;
-static PyObject *__pyx_f_4lxml_5etree_9_Document_getroot(struct LxmlDocument *);
-static int __pyx_f_4lxml_5etree_9_Document_hasdoctype(struct LxmlDocument *);
-static PyObject *__pyx_f_4lxml_5etree_9_Document_getdoctype(struct LxmlDocument *);
-static PyObject *__pyx_f_4lxml_5etree_9_Document_getxmlinfo(struct LxmlDocument *);
-static PyObject *__pyx_f_4lxml_5etree_9_Document_isstandalone(struct LxmlDocument *);
-static PyObject *__pyx_f_4lxml_5etree_9_Document_buildNewPrefix(struct LxmlDocument *);
-static xmlNs *__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *, int);
-static int __pyx_f_4lxml_5etree_9_Document__setNodeNs(struct LxmlDocument *, xmlNode *, const xmlChar *);
+static struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext *__pyx_vtabptr_4lxml_5etree__XSLTResolverContext;
+static struct __pyx_obj_4lxml_5etree__XSLTResolverContext *__pyx_f_4lxml_5etree_20_XSLTResolverContext__copy(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":439
- * self._entries.append(entry)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":168
+ * # XSLT file/network access control
*
- * cdef class _DomainErrorLog(_ErrorLog): # <<<<<<<<<<<<<<
- * def __init__(self, domains):
- * _ErrorLog.__init__(self)
- */
-
-struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog {
- struct __pyx_vtabstruct_4lxml_5etree__ErrorLog __pyx_base;
-};
-static struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog *__pyx_vtabptr_4lxml_5etree__DomainErrorLog;
-
-
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":627
- * ############################################################
+ * cdef class XSLTAccessControl: # <<<<<<<<<<<<<<
+ * u"""XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)
*
- * cdef class TreeBuilder(_SaxParserTarget): # <<<<<<<<<<<<<<
- * u"""TreeBuilder(self, element_factory=None, parser=None)
- * Parser target that builds a tree.
*/
-struct __pyx_vtabstruct_4lxml_5etree_TreeBuilder {
- struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget __pyx_base;
- int (*_flush)(struct __pyx_obj_4lxml_5etree_TreeBuilder *);
+struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl {
+ PyObject *(*_setAccess)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption, int);
+ void (*_register_in_context)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltTransformContext *);
+ PyObject *(*_optval)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption);
};
-static struct __pyx_vtabstruct_4lxml_5etree_TreeBuilder *__pyx_vtabptr_4lxml_5etree_TreeBuilder;
-static int __pyx_f_4lxml_5etree_11TreeBuilder__flush(struct __pyx_obj_4lxml_5etree_TreeBuilder *);
+static struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl *__pyx_vtabptr_4lxml_5etree_XSLTAccessControl;
+static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption, int);
+static void __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltTransformContext *);
+static PyObject *__pyx_f_4lxml_5etree_17XSLTAccessControl__optval(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2453
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":271
* @cython.final
* @cython.internal
- * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<<
- * """
- * Match an xmlNode against a list of tags.
+ * cdef class _XSLTContext(_BaseContext): # <<<<<<<<<<<<<<
+ * cdef xslt.xsltTransformContext* _xsltCtxt
+ * cdef _ReadOnlyElementProxy _extension_element_proxy
*/
-struct __pyx_vtabstruct_4lxml_5etree__MultiTagMatcher {
- int (*rejectsAll)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
- int (*rejectsAllAttributes)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
- int (*matchesType)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, int);
- void (*_clear)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
- PyObject *(*initTagMatch)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *);
- PyObject *(*_storeTags)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *, PyObject *);
- int (*cacheTags)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, struct LxmlDocument *, struct __pyx_opt_args_4lxml_5etree_16_MultiTagMatcher_cacheTags *__pyx_optional_args);
- int (*matches)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlNode *);
- int (*matchesNsTag)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, const xmlChar *, const xmlChar *);
- int (*matchesAttribute)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *);
+struct __pyx_vtabstruct_4lxml_5etree__XSLTContext {
+ struct __pyx_vtabstruct_4lxml_5etree__BaseContext __pyx_base;
+ PyObject *(*register_context)(struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *, struct LxmlDocument *);
+ PyObject *(*free_context)(struct __pyx_obj_4lxml_5etree__XSLTContext *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__MultiTagMatcher *__pyx_vtabptr_4lxml_5etree__MultiTagMatcher;
-static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
-static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
-static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, int);
-static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *);
-static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *, PyObject *);
-static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, struct LxmlDocument *, struct __pyx_opt_args_4lxml_5etree_16_MultiTagMatcher_cacheTags *__pyx_optional_args);
-static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlNode *);
-static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, const xmlChar *, const xmlChar *);
-static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribute(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *);
+static struct __pyx_vtabstruct_4lxml_5etree__XSLTContext *__pyx_vtabptr_4lxml_5etree__XSLTContext;
+static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_register_context(struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *, struct LxmlDocument *);
+static PyObject *__pyx_f_4lxml_5etree_12_XSLTContext_free_context(struct __pyx_obj_4lxml_5etree__XSLTContext *);
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xsltext.pxi":3
- * # XSLT extension elements
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":334
+ *
+ * @cython.no_gc_clear
+ * cdef class XSLT: # <<<<<<<<<<<<<<
+ * u"""XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)
*
- * cdef class XSLTExtension: # <<<<<<<<<<<<<<
- * u"""Base class of an XSLT extension element.
- * """
*/
-struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension {
- PyObject *(*_collectXSLTResultContent)(struct __pyx_obj_4lxml_5etree_XSLTExtension *, struct __pyx_obj_4lxml_5etree__XSLTContext *, xmlNode *, int, int);
+struct __pyx_vtabstruct_4lxml_5etree_XSLT {
+ xmlDoc *(*_run_transform)(struct __pyx_obj_4lxml_5etree_XSLT *, xmlDoc *, const char **, struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *);
};
-static struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *__pyx_vtabptr_4lxml_5etree_XSLTExtension;
+static struct __pyx_vtabstruct_4lxml_5etree_XSLT *__pyx_vtabptr_4lxml_5etree_XSLT;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/readonlytree.pxi":248
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":698
+ *
* @cython.final
- * @cython.internal
- * cdef class _ReadOnlyPIProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<<
- * u"A read-only proxy for processing instructions (for internal use only!)"
- * property target:
+ * cdef class _XSLTResultTree(_ElementTree): # <<<<<<<<<<<<<<
+ * cdef XSLT _xslt
+ * cdef _Document _profile
*/
-struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy {
- struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy __pyx_base;
+struct __pyx_vtabstruct_4lxml_5etree__XSLTResultTree {
+ struct __pyx_vtabstruct_4lxml_5etree__ElementTree __pyx_base;
+ PyObject *(*_saveToStringAndSize)(struct __pyx_obj_4lxml_5etree__XSLTResultTree *, xmlChar **, int *);
};
-static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy *__pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy;
+static struct __pyx_vtabstruct_4lxml_5etree__XSLTResultTree *__pyx_vtabptr_4lxml_5etree__XSLTResultTree;
+static PyObject *__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize(struct __pyx_obj_4lxml_5etree__XSLTResultTree *, xmlChar **, int *);
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xslt.pxi":849
static struct __pyx_vtabstruct_4lxml_5etree__XSLTProcessingInstruction *__pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":481
- * _find_namespaces = re.compile(b'({[^}]+})').findall
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xsltext.pxi":3
+ * # XSLT extension elements
*
- * cdef class ETXPath(XPath): # <<<<<<<<<<<<<<
- * u"""ETXPath(self, path, extensions=None, regexp=True, smart_strings=True)
- * Special XPath class that supports the ElementTree {uri} notation for namespaces.
+ * cdef class XSLTExtension: # <<<<<<<<<<<<<<
+ * u"""Base class of an XSLT extension element.
+ * """
*/
-struct __pyx_vtabstruct_4lxml_5etree_ETXPath {
- struct __pyx_vtabstruct_4lxml_5etree_XPath __pyx_base;
- PyObject *(*_nsextract_path)(struct __pyx_obj_4lxml_5etree_ETXPath *, PyObject *);
+struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension {
+ PyObject *(*_collectXSLTResultContent)(struct __pyx_obj_4lxml_5etree_XSLTExtension *, struct __pyx_obj_4lxml_5etree__XSLTContext *, xmlNode *, int, int);
};
-static struct __pyx_vtabstruct_4lxml_5etree_ETXPath *__pyx_vtabptr_4lxml_5etree_ETXPath;
+static struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *__pyx_vtabptr_4lxml_5etree_XSLTExtension;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":456
- * @cython.final
- * @cython.internal
- * cdef class _ExsltRegExp: # <<<<<<<<<<<<<<
- * cdef dict _compile_map
- * def __cinit__(self):
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/dtd.pxi":267
+ * # DTD
+ *
+ * cdef class DTD(_Validator): # <<<<<<<<<<<<<<
+ * u"""DTD(self, file=None, external_id=None)
+ * A DTD validator.
*/
-struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp {
- PyObject *(*_make_string)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *);
- PyObject *(*_compile)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *, PyObject *);
- PyObject *(*_register_in_context)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, struct __pyx_obj_4lxml_5etree__BaseContext *);
+struct __pyx_vtabstruct_4lxml_5etree_DTD {
+ struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp *__pyx_vtabptr_4lxml_5etree__ExsltRegExp;
-static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__compile(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *, PyObject *);
-static PyObject *__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, struct __pyx_obj_4lxml_5etree__BaseContext *);
+static struct __pyx_vtabstruct_4lxml_5etree_DTD *__pyx_vtabptr_4lxml_5etree_DTD;
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":42
- * @cython.final
- * @cython.internal
- * cdef class _ParserDictionaryContext: # <<<<<<<<<<<<<<
- * # Global parser context to share the string dictionary.
- * #
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/relaxng.pxi":22
+ * # RelaxNG
+ *
+ * cdef class RelaxNG(_Validator): # <<<<<<<<<<<<<<
+ * u"""RelaxNG(self, etree=None, file=None)
+ * Turn a document into a Relax NG validator.
*/
-struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext {
- void (*initMainParserContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
- struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *(*_findThreadParserContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
- void (*setDefaultParser)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
- struct __pyx_obj_4lxml_5etree__BaseParser *(*getDefaultParser)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
- xmlDict *(*_getThreadDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict *);
- void (*initThreadDictRef)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict **);
- void (*initParserDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlParserCtxt *);
- void (*initXPathParserDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlXPathContext *);
- void (*initDocDict)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDoc *);
- struct __pyx_obj_4lxml_5etree__ParserContext *(*findImpliedContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
- void (*pushImpliedContextFromParser)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
- void (*pushImpliedContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__ParserContext *);
- void (*popImpliedContext)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+struct __pyx_vtabstruct_4lxml_5etree_RelaxNG {
+ struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_base;
};
-static struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext *__pyx_vtabptr_4lxml_5etree__ParserDictionaryContext;
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
-static struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
-static struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
-static xmlDict *__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict *);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict **);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlParserCtxt *);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlXPathContext *);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDoc *);
-static struct __pyx_obj_4lxml_5etree__ParserContext *__pyx_f_4lxml_5etree_24_ParserDictionaryContext_findImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFromParser(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__ParserContext *);
-static void __pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *);
+static struct __pyx_vtabstruct_4lxml_5etree_RelaxNG *__pyx_vtabptr_4lxml_5etree_RelaxNG;
+
+
+struct __pyx_vtabstruct_4lxml_5etree_Schematron {
+ struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_base;
+};
+static struct __pyx_vtabstruct_4lxml_5etree_Schematron *__pyx_vtabptr_4lxml_5etree_Schematron;
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
const char* function_name); /*proto*/
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
if (unlikely(!args)) return NULL;
method = __Pyx_PyObject_GetAttrStr(obj, method_name);
if (unlikely(!method)) goto bad;
- result = PyObject_Call(method, args, NULL);
+ result = __Pyx_PyObject_Call(method, args, NULL);
Py_DECREF(method);
bad:
Py_DECREF(args);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
-#if CYTHON_COMPILING_IN_CPYTHON
+#if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX >= 0x03020000 || PY_MAJOR_VERSION < 3 && PY_VERSION_HEX >= 0x02070000)
static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
PyObject *res;
PyTypeObject *tp = Py_TYPE(obj);
return res;
}
#else
-#define __Pyx_PyObject_LookupSpecial(o,n) PyObject_GetAttr(o,n)
+#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /*proto*/
((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
PyCFunctionObject func;
- int flags;
PyObject *func_dict;
PyObject *func_weakreflist;
PyObject *func_name;
PyObject *func_classobj; /* No-args super() class cell */
void *defaults;
int defaults_pyobjects;
+ int flags;
PyObject *defaults_tuple; /* Const defaults tuple */
PyObject *defaults_kwdict; /* Const kwonly defaults dict */
PyObject *(*defaults_getter)(PyObject *);
/* Module declarations from 'lxml.includes.schematron' */
/* Module declarations from 'lxml.etree' */
-static PyTypeObject *__pyx_ptype_4lxml_5etree__BaseParser = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__FeedParser = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XMLParser = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ETCompatXMLParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__TempStore = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ExceptionContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__Document = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__Element = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__BaseParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_QName = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__LogEntry = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__BaseErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ListErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ErrorLogContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__DomainErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__RotatingErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_PyErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_DocInfo = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree___ContentOnlyElement = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__Comment = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__ProcessingInstruction = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_PIBase = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTProcessingInstruction = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XMLPullParser = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct__itervalues = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__NamespaceRegistry = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__FunctionNamespaceRegistry = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__FileReaderContext = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__BaseErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__Entity = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementTree = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__Attrib = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__AttribIterator = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementTagMatcher = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XSLT = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementClassLookup = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ResolverRegistry = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__SaxParserTarget = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_TreeBuilder = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XPathEvaluatorBase = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XPathElementEvaluator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct_1_iterattributes = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__Comment = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementIterator = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__MultiTagMatcher = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XPath = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ETXPath = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_FallbackElementClassLookup = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_CustomElementClassLookup = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__IncrementalFileWriter = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementMatchIterator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementChildIterator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_SiblingsIterator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_AncestorsIterator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementTextIterator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_CDATA = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__ReadOnlyProxy = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ReadOnlyPIProxy = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ReadOnlyEntityProxy = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__ReadOnlyElementProxy = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__OpaqueNodeWrapper = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__OpaqueDocumentWrapper = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ModifyContentOnlyPIProxy = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ModifyContentOnlyEntityProxy = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__AppendOnlyElementProxy = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementBase = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree_CommentBase = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTQuotedStringParam = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__BaseContext = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTContext = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__DTDElementDecl = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XSLTExtension = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ExceptionContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_PIBase = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_EntityBase = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_FallbackElementClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementDefaultClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_AttributeBasedElementClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_CustomElementClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_PythonElementClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__NamespaceRegistry = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ClassNamespaceRegistry = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__FunctionNamespaceRegistry = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__InputDocument = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_Resolver = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ResolverRegistry = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__ResolverContext = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__ParserContext = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__SaxParserContext = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__TargetParserContext = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_Resolver = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XPathContext = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ParseEventsIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__Entity = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_EntityBase = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__Document = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__InputDocument = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementTree = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ParserSchemaValidationContext = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__Validator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_RelaxNG = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__LogEntry = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XMLSchema = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ParserDictionaryContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__FileReaderContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__FeedParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XMLParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XMLPullParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ETCompatXMLParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_HTMLParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_HTMLPullParser = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__SaxParserTarget = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ParseEventsIterator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_TreeBuilder = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__PythonSaxParserTarget = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_CDATA = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__FilelikeWriter = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree_xmlfile = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__DTDElementContentDecl = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ListErrorLog = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ErrorLog = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ReadOnlyPIProxy = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTResultTree = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementTextIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementBase = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_PyErrorLog = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_DTD = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__IncrementalFileWriter = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__FileWriterElement = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree_iterparse = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct_2_iterelements = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTResolverContext = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ParserDictionaryContext = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree_iterwalk = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__DomainErrorLog = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_AttributeBasedElementClassLookup = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_DocInfo = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XInclude = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__DTDAttributeDecl = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_XMLSchema = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementMatchIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_AncestorsIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_HTMLParser = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_HTMLPullParser = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__IDDict = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__AppendOnlyElementProxy = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ModifyContentOnlyEntityProxy = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ReadOnlyEntityProxy = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__FileWriterElement = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__MemDebug = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__Attrib = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementDefaultClassLookup = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementUnicodeResult = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XInclude = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__ExsltRegExp = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_QName = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct_3_iterentities = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__TempStore = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__OpaqueNodeWrapper = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__FilelikeWriter = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__OpaqueDocumentWrapper = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_Schematron = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ErrorLogContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__BaseContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__ElementUnicodeResult = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XPathContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XPathEvaluatorBase = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XPathElementEvaluator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XPath = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_ETXPath = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTResolverContext = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree_XSLTAccessControl = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_SiblingsIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ModifyContentOnlyPIProxy = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ClassNamespaceRegistry = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__ParserSchemaValidationContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTContext = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTQuotedStringParam = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XSLT = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTResultTree = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__XSLTProcessingInstruction = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_XSLTExtension = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__DTDElementContentDecl = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__DTDAttributeDecl = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__DTDElementDecl = 0;
static PyTypeObject *__pyx_ptype_4lxml_5etree__DTDEntityDecl = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__AttribIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_PythonElementClassLookup = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree_ElementChildIterator = 0;
-static PyTypeObject *__pyx_ptype_4lxml_5etree__RotatingErrorLog = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_DTD = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_RelaxNG = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree_Schematron = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree__MemDebug = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct__itervalues = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct_1_iterattributes = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct_2_iterelements = 0;
+static PyTypeObject *__pyx_ptype_4lxml_5etree___pyx_scope_struct_3_iterentities = 0;
static PyObject *__pyx_v_4lxml_5etree__unicode = 0;
static PyObject *__pyx_v_4lxml_5etree_os_path_abspath = 0;
static PyObject *__pyx_v_4lxml_5etree_BytesIO = 0;
static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *, PyObject *, struct __pyx_obj_4lxml_5etree__ErrorLog *); /*proto*/
static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5etree__ParserContext *, xmlParserCtxt *, xmlDoc *, PyObject *, int, int); /*proto*/
static int __pyx_f_4lxml_5etree__fixHtmlDictNames(xmlDict *, xmlDoc *); /*proto*/
+static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *, xmlDoc *, xmlNode *); /*proto*/
static CYTHON_INLINE int __pyx_f_4lxml_5etree__fixHtmlDictNodeNames(xmlDict *, xmlNode *); /*proto*/
static int __pyx_f_4lxml_5etree__htmlCtxtResetPush(xmlParserCtxt *, const char *, int, const char *, const char *, int); /*proto*/
static xmlDoc *__pyx_f_4lxml_5etree__parseDoc(PyObject *, PyObject *, struct __pyx_obj_4lxml_5etree__BaseParser *); /*proto*/
static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_4dict_size(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__MemDebug *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_6dump(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__MemDebug *__pyx_v_self, PyObject *__pyx_v_output_file, PyObject *__pyx_v_byte_count); /* proto */
static PyObject *__pyx_pf_4lxml_5etree_9_MemDebug_8show(CYTHON_UNUSED struct __pyx_obj_4lxml_5etree__MemDebug *__pyx_v_self, PyObject *__pyx_v_output_file, PyObject *__pyx_v_block_count); /* proto */
-static PyObject *__pyx_tp_new_4lxml_5etree__BaseParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__FeedParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XMLParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ETCompatXMLParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__TempStore(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ExceptionContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__Document(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__Element(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__BaseParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_QName(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__LogEntry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__BaseErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ListErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLogContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__DomainErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__RotatingErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_PyErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_DocInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree___ContentOnlyElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__Comment(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__ProcessingInstruction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_PIBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTProcessingInstruction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct__itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__NamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XPathFunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__FileReaderContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__BaseErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__Entity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementTree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__Attrib(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__AttribIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__ElementTagMatcher(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XSLT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementDepthFirstIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ResolverRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__SaxParserTarget(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_TreeBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XPathElementEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XPathDocumentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__Comment(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__MultiTagMatcher(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XPath(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ETXPath(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_CustomElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__IncrementalFileWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementMatchIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementChildIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_SiblingsIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_AncestorsIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementDepthFirstIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementTextIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_CDATA(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueDocumentWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__AppendOnlyElementProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree_CommentBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTQuotedStringParam(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__BaseContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementDecl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XSLTExtension(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ExceptionContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_PIBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_EntityBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementDefaultClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_AttributeBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ParserBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_CustomElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_PythonElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__NamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ClassNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementNamespaceClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XPathFunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__InputDocument(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_Resolver(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ResolverRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__ResolverContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__ParserContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__SaxParserContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__TargetParserContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_Resolver(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XPathContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ParseEventsIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__Entity(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_EntityBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__Document(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__InputDocument(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementTree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ParserBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__Validator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_RelaxNG(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__LogEntry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XMLSchema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ParserDictionaryContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__FileReaderContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__FeedParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XMLParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ETCompatXMLParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_HTMLParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_HTMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__SaxParserTarget(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ParseEventsIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_TreeBuilder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__PythonSaxParserTarget(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_CDATA(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__FilelikeWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree_xmlfile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementContentDecl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ListErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResultTree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementTextIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_PyErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_DTD(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__IncrementalFileWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__FileWriterElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree_iterparse(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_2_iterelements(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResolverContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ParserDictionaryContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree_iterwalk(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__DomainErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_AttributeBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_DocInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XInclude(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__DTDAttributeDecl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_XMLSchema(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementMatchIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_AncestorsIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_HTMLParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_HTMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__IDDict(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementNamespaceClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__AppendOnlyElementProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__FileWriterElement(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__MemDebug(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__Attrib(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementDefaultClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementUnicodeResult(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XInclude(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__ExsltRegExp(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_QName(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_3_iterentities(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__TempStore(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__FilelikeWriter(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueDocumentWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_Schematron(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLogContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__BaseContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementUnicodeResult(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XPathContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XPathElementEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XPathDocumentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XPath(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_ETXPath(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResolverContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree_XSLTAccessControl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_SiblingsIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ClassNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTContext(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTQuotedStringParam(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XSLT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResultTree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTProcessingInstruction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_XSLTExtension(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementContentDecl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__DTDAttributeDecl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementDecl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4lxml_5etree__DTDEntityDecl(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__AttribIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_PythonElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementChildIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_4lxml_5etree__RotatingErrorLog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_DTD(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_RelaxNG(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree_Schematron(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree__MemDebug(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct__itervalues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_2_iterelements(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_3_iterentities(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static char __pyx_k_A[] = "A";
static char __pyx_k_B[] = "B";
static char __pyx_k_U[] = "U";
static char __pyx_k_extensions[] = "extensions";
static char __pyx_k_fromstring[] = "fromstring";
static char __pyx_k_getargspec[] = "getargspec";
+static char __pyx_k_has_raised[] = "has_raised";
static char __pyx_k_input_node[] = "input_node";
static char __pyx_k_itervalues[] = "itervalues";
static char __pyx_k_last_error[] = "last_error";
static char __pyx_k_memory_debugger[] = "memory_debugger";
static char __pyx_k_no_context_node[] = "no context node";
static char __pyx_k_remove_comments[] = "remove_comments";
+static char __pyx_k_store_exception[] = "store_exception";
static char __pyx_k_tree_or_element[] = "tree_or_element";
static char __pyx_k_unknown_error_d[] = "unknown error %d";
static char __pyx_k_xml_declaration[] = "xml_declaration";
static PyObject *__pyx_n_s_group;
static PyObject *__pyx_n_s_groups;
static PyObject *__pyx_n_s_gzip;
+static PyObject *__pyx_n_s_has_raised;
static PyObject *__pyx_kp_s_home_stefan_source_Python_lxml;
static PyObject *__pyx_kp_s_home_stefan_source_Python_lxml_10;
static PyObject *__pyx_kp_s_home_stefan_source_Python_lxml_11;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_stdout;
static PyObject *__pyx_n_s_stop;
+static PyObject *__pyx_n_s_store_exception;
static PyObject *__pyx_n_s_str;
static PyObject *__pyx_kp_u_string;
static PyObject *__pyx_n_s_string_2;
__Pyx_INCREF(__pyx_v_prefix_utf);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_prefix_utf);
__Pyx_GIVEREF(__pyx_v_prefix_utf);
- __pyx_t_1 = PyObject_Call(__pyx_v_4lxml_5etree__check_internal_prefix, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__check_internal_prefix, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* _tagValidOrRaise(prefix_utf)
* _uriValidOrRaise(uri_utf)
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
- __pyx_t_3 = PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
- __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
- __pyx_t_3 = PyObject_Call(__pyx_v_4lxml_5etree_error_super_init, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_error_super_init, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_error_log, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_error_log, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_version, __pyx_n_s_decode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyList_New(1 * 4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*/
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
*/
__pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_11 = PyObject_Call(__pyx_t_12, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
*/
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_item, __pyx_n_s_startswith); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
static int __pyx_f_4lxml_5etree__isProxyAliveInPypy(xmlNode *__pyx_v_c_node) {
int __pyx_v_retval;
- PyObject *__pyx_v_obj_ptr;
+ PyObject *__pyx_v_weakref_ptr;
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
* retval = True
* if python.PyWeakref_LockObject(<python.PyObject*>c_node._private) is None: # <<<<<<<<<<<<<<
* # proxy has already died => remove weak reference
- * obj_ptr = <python.PyObject*>c_node._private
+ * weakref_ptr = <python.PyObject*>c_node._private
*/
__pyx_t_1 = PyWeakref_LockObject(((PyObject *)__pyx_v_c_node->_private)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":37
* if python.PyWeakref_LockObject(<python.PyObject*>c_node._private) is None:
* # proxy has already died => remove weak reference
- * obj_ptr = <python.PyObject*>c_node._private # <<<<<<<<<<<<<<
+ * weakref_ptr = <python.PyObject*>c_node._private # <<<<<<<<<<<<<<
* c_node._private = NULL
- * python.Py_XDECREF(obj_ptr)
+ * python.Py_XDECREF(weakref_ptr)
*/
- __pyx_v_obj_ptr = ((PyObject *)__pyx_v_c_node->_private);
+ __pyx_v_weakref_ptr = ((PyObject *)__pyx_v_c_node->_private);
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":38
* # proxy has already died => remove weak reference
- * obj_ptr = <python.PyObject*>c_node._private
+ * weakref_ptr = <python.PyObject*>c_node._private
* c_node._private = NULL # <<<<<<<<<<<<<<
- * python.Py_XDECREF(obj_ptr)
+ * python.Py_XDECREF(weakref_ptr)
* retval = False
*/
__pyx_v_c_node->_private = NULL;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":39
- * obj_ptr = <python.PyObject*>c_node._private
+ * weakref_ptr = <python.PyObject*>c_node._private
* c_node._private = NULL
- * python.Py_XDECREF(obj_ptr) # <<<<<<<<<<<<<<
+ * python.Py_XDECREF(weakref_ptr) # <<<<<<<<<<<<<<
* retval = False
* return retval
*/
- Py_XDECREF(__pyx_v_obj_ptr);
+ Py_XDECREF(__pyx_v_weakref_ptr);
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":40
* c_node._private = NULL
- * python.Py_XDECREF(obj_ptr)
+ * python.Py_XDECREF(weakref_ptr)
* retval = False # <<<<<<<<<<<<<<
* return retval
*
__pyx_L3:;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":41
- * python.Py_XDECREF(obj_ptr)
+ * python.Py_XDECREF(weakref_ptr)
* retval = False
* return retval # <<<<<<<<<<<<<<
*
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
+ PyObject *__pyx_t_2;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
* proxy._c_node = c_node
* if python.IS_PYPY: # <<<<<<<<<<<<<<
* c_node._private = <void*>python.PyWeakref_NewRef(proxy, NULL)
- * if c_node._private is NULL:
+ * else:
*/
__pyx_t_1 = (IS_PYPY != 0);
if (__pyx_t_1) {
* proxy._c_node = c_node
* if python.IS_PYPY:
* c_node._private = <void*>python.PyWeakref_NewRef(proxy, NULL) # <<<<<<<<<<<<<<
- * if c_node._private is NULL:
- * return -1 # manual exception propagation
- */
- __pyx_v_c_node->_private = ((void *)PyWeakref_NewRef(((PyObject *)__pyx_v_proxy), NULL));
-
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":53
- * if python.IS_PYPY:
- * c_node._private = <void*>python.PyWeakref_NewRef(proxy, NULL)
- * if c_node._private is NULL: # <<<<<<<<<<<<<<
- * return -1 # manual exception propagation
- * else:
- */
- __pyx_t_1 = ((__pyx_v_c_node->_private == NULL) != 0);
- if (__pyx_t_1) {
-
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":54
- * c_node._private = <void*>python.PyWeakref_NewRef(proxy, NULL)
- * if c_node._private is NULL:
- * return -1 # manual exception propagation # <<<<<<<<<<<<<<
* else:
* c_node._private = <void*>proxy
*/
- __pyx_r = -1;
- goto __pyx_L0;
- }
+ __pyx_t_2 = PyWeakref_NewRef(((PyObject *)__pyx_v_proxy), NULL); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_c_node->_private = ((void *)__pyx_t_2);
goto __pyx_L3;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":56
- * return -1 # manual exception propagation
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":54
+ * c_node._private = <void*>python.PyWeakref_NewRef(proxy, NULL)
* else:
* c_node._private = <void*>proxy # <<<<<<<<<<<<<<
* return 0
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":57
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":55
* else:
* c_node._private = <void*>proxy
* return 0 # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":59
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":57
* return 0
*
* cdef inline int _unregisterProxy(_Element proxy) except -1: # <<<<<<<<<<<<<<
static CYTHON_INLINE int __pyx_f_4lxml_5etree__unregisterProxy(struct LxmlElement *__pyx_v_proxy) {
xmlNode *__pyx_v_c_node;
- PyObject *__pyx_v_obj_ptr;
+ PyObject *__pyx_v_weakref_ptr;
int __pyx_r;
__Pyx_RefNannyDeclarations
xmlNode *__pyx_t_1;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_unregisterProxy", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":63
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":60
+ * u"""Unregister a proxy for the node it's proxying for.
* """
- * cdef xmlNode* c_node
- * c_node = proxy._c_node # <<<<<<<<<<<<<<
+ * cdef xmlNode* c_node = proxy._c_node # <<<<<<<<<<<<<<
* if python.IS_PYPY:
- * obj_ptr = <python.PyObject*>c_node._private
+ * weakref_ptr = <python.PyObject*>c_node._private
*/
__pyx_t_1 = __pyx_v_proxy->_c_node;
__pyx_v_c_node = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":64
- * cdef xmlNode* c_node
- * c_node = proxy._c_node
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":61
+ * """
+ * cdef xmlNode* c_node = proxy._c_node
* if python.IS_PYPY: # <<<<<<<<<<<<<<
- * obj_ptr = <python.PyObject*>c_node._private
+ * weakref_ptr = <python.PyObject*>c_node._private
* c_node._private = NULL
*/
__pyx_t_2 = (IS_PYPY != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":65
- * c_node = proxy._c_node
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":62
+ * cdef xmlNode* c_node = proxy._c_node
* if python.IS_PYPY:
- * obj_ptr = <python.PyObject*>c_node._private # <<<<<<<<<<<<<<
+ * weakref_ptr = <python.PyObject*>c_node._private # <<<<<<<<<<<<<<
* c_node._private = NULL
- * python.Py_XDECREF(obj_ptr)
+ * python.Py_XDECREF(weakref_ptr)
*/
- __pyx_v_obj_ptr = ((PyObject *)__pyx_v_c_node->_private);
+ __pyx_v_weakref_ptr = ((PyObject *)__pyx_v_c_node->_private);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":66
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":63
* if python.IS_PYPY:
- * obj_ptr = <python.PyObject*>c_node._private
+ * weakref_ptr = <python.PyObject*>c_node._private
* c_node._private = NULL # <<<<<<<<<<<<<<
- * python.Py_XDECREF(obj_ptr)
+ * python.Py_XDECREF(weakref_ptr)
* else:
*/
__pyx_v_c_node->_private = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":67
- * obj_ptr = <python.PyObject*>c_node._private
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":64
+ * weakref_ptr = <python.PyObject*>c_node._private
* c_node._private = NULL
- * python.Py_XDECREF(obj_ptr) # <<<<<<<<<<<<<<
+ * python.Py_XDECREF(weakref_ptr) # <<<<<<<<<<<<<<
* else:
* assert c_node._private is <void*>proxy, u"Tried to unregister unknown proxy"
*/
- Py_XDECREF(__pyx_v_obj_ptr);
+ Py_XDECREF(__pyx_v_weakref_ptr);
goto __pyx_L3;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":69
- * python.Py_XDECREF(obj_ptr)
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":66
+ * python.Py_XDECREF(weakref_ptr)
* else:
* assert c_node._private is <void*>proxy, u"Tried to unregister unknown proxy" # <<<<<<<<<<<<<<
* c_node._private = NULL
if (unlikely(!Py_OptimizeFlag)) {
if (unlikely(!((__pyx_v_c_node->_private == ((void *)__pyx_v_proxy)) != 0))) {
PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Tried_to_unregister_unknown_prox);
- {__pyx_filename = __pyx_f[3]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
}
#endif
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":70
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":67
* else:
* assert c_node._private is <void*>proxy, u"Tried to unregister unknown proxy"
* c_node._private = NULL # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":71
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":68
* assert c_node._private is <void*>proxy, u"Tried to unregister unknown proxy"
* c_node._private = NULL
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":59
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":57
* return 0
*
* cdef inline int _unregisterProxy(_Element proxy) except -1: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":76
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":73
* # temporarily make a node the root node of its document
*
* cdef xmlDoc* _fakeRootDoc(xmlDoc* c_base_doc, xmlNode* c_node) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_fakeRootDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":77
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":74
*
* cdef xmlDoc* _fakeRootDoc(xmlDoc* c_base_doc, xmlNode* c_node) except NULL:
* return _plainFakeRootDoc(c_base_doc, c_node, 1) # <<<<<<<<<<<<<<
*
* cdef xmlDoc* _plainFakeRootDoc(xmlDoc* c_base_doc, xmlNode* c_node,
*/
- __pyx_t_1 = __pyx_f_4lxml_5etree__plainFakeRootDoc(__pyx_v_c_base_doc, __pyx_v_c_node, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4lxml_5etree__plainFakeRootDoc(__pyx_v_c_base_doc, __pyx_v_c_node, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_1;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":76
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":73
* # temporarily make a node the root node of its document
*
* cdef xmlDoc* _fakeRootDoc(xmlDoc* c_base_doc, xmlNode* c_node) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":79
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":76
* return _plainFakeRootDoc(c_base_doc, c_node, 1)
*
* cdef xmlDoc* _plainFakeRootDoc(xmlDoc* c_base_doc, xmlNode* c_node, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_plainFakeRootDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":88
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":85
* cdef xmlNode* c_new_root
* cdef xmlDoc* c_doc
* if with_siblings or (c_node.prev is NULL and c_node.next is NULL): # <<<<<<<<<<<<<<
}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":89
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":86
* cdef xmlDoc* c_doc
* if with_siblings or (c_node.prev is NULL and c_node.next is NULL):
* c_root = tree.xmlDocGetRootElement(c_base_doc) # <<<<<<<<<<<<<<
*/
__pyx_v_c_root = xmlDocGetRootElement(__pyx_v_c_base_doc);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":90
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":87
* if with_siblings or (c_node.prev is NULL and c_node.next is NULL):
* c_root = tree.xmlDocGetRootElement(c_base_doc)
* if c_root is c_node: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_root == __pyx_v_c_node) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":92
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":89
* if c_root is c_node:
* # already the root node, no siblings
* return c_base_doc # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":94
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":91
* return c_base_doc
*
* c_doc = _copyDoc(c_base_doc, 0) # non recursive! # <<<<<<<<<<<<<<
* c_new_root = tree.xmlDocCopyNode(c_node, c_doc, 2) # non recursive!
* tree.xmlDocSetRootElement(c_doc, c_new_root)
*/
- __pyx_t_4 = __pyx_f_4lxml_5etree__copyDoc(__pyx_v_c_base_doc, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_4lxml_5etree__copyDoc(__pyx_v_c_base_doc, 0); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_doc = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":95
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":92
*
* c_doc = _copyDoc(c_base_doc, 0) # non recursive!
* c_new_root = tree.xmlDocCopyNode(c_node, c_doc, 2) # non recursive! # <<<<<<<<<<<<<<
*/
__pyx_v_c_new_root = xmlDocCopyNode(__pyx_v_c_node, __pyx_v_c_doc, 2);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":96
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":93
* c_doc = _copyDoc(c_base_doc, 0) # non recursive!
* c_new_root = tree.xmlDocCopyNode(c_node, c_doc, 2) # non recursive!
* tree.xmlDocSetRootElement(c_doc, c_new_root) # <<<<<<<<<<<<<<
*/
xmlDocSetRootElement(__pyx_v_c_doc, __pyx_v_c_new_root);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":97
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":94
* c_new_root = tree.xmlDocCopyNode(c_node, c_doc, 2) # non recursive!
* tree.xmlDocSetRootElement(c_doc, c_new_root)
* _copyParentNamespaces(c_node, c_new_root) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree__copyParentNamespaces(__pyx_v_c_node, __pyx_v_c_new_root);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":99
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":96
* _copyParentNamespaces(c_node, c_new_root)
*
* c_new_root.children = c_node.children # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_c_node->children;
__pyx_v_c_new_root->children = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":100
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":97
*
* c_new_root.children = c_node.children
* c_new_root.last = c_node.last # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_c_node->last;
__pyx_v_c_new_root->last = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":101
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":98
* c_new_root.children = c_node.children
* c_new_root.last = c_node.last
* c_new_root.next = c_new_root.prev = NULL # <<<<<<<<<<<<<<
__pyx_v_c_new_root->next = NULL;
__pyx_v_c_new_root->prev = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":104
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":101
*
* # store original node
* c_doc._private = c_node # <<<<<<<<<<<<<<
*/
__pyx_v_c_doc->_private = __pyx_v_c_node;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":107
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":104
*
* # divert parent pointers of children
* c_child = c_new_root.children # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_c_new_root->children;
__pyx_v_c_child = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":108
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":105
* # divert parent pointers of children
* c_child = c_new_root.children
* while c_child is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_child != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":109
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":106
* c_child = c_new_root.children
* while c_child is not NULL:
* c_child.parent = c_new_root # <<<<<<<<<<<<<<
*/
__pyx_v_c_child->parent = __pyx_v_c_new_root;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":110
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":107
* while c_child is not NULL:
* c_child.parent = c_new_root
* c_child = c_child.next # <<<<<<<<<<<<<<
__pyx_v_c_child = __pyx_t_5;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":112
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":109
* c_child = c_child.next
*
* c_doc.children = c_new_root # <<<<<<<<<<<<<<
*/
__pyx_v_c_doc->children = __pyx_v_c_new_root;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":113
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":110
*
* c_doc.children = c_new_root
* return c_doc # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_c_doc;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":79
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":76
* return _plainFakeRootDoc(c_base_doc, c_node, 1)
*
* cdef xmlDoc* _plainFakeRootDoc(xmlDoc* c_base_doc, xmlNode* c_node, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":115
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":112
* return c_doc
*
* cdef void _destroyFakeDoc(xmlDoc* c_base_doc, xmlDoc* c_doc): # <<<<<<<<<<<<<<
xmlNode *__pyx_t_2;
__Pyx_RefNannySetupContext("_destroyFakeDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":120
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":117
* cdef xmlNode* c_parent
* cdef xmlNode* c_root
* if c_doc is c_base_doc: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_doc == __pyx_v_c_base_doc) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":121
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":118
* cdef xmlNode* c_root
* if c_doc is c_base_doc:
* return # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":122
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":119
* if c_doc is c_base_doc:
* return
* c_root = tree.xmlDocGetRootElement(c_doc) # <<<<<<<<<<<<<<
*/
__pyx_v_c_root = xmlDocGetRootElement(__pyx_v_c_doc);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":125
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":122
*
* # restore parent pointers of children
* c_parent = <xmlNode*>c_doc._private # <<<<<<<<<<<<<<
*/
__pyx_v_c_parent = ((xmlNode *)__pyx_v_c_doc->_private);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":126
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":123
* # restore parent pointers of children
* c_parent = <xmlNode*>c_doc._private
* c_child = c_root.children # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_c_root->children;
__pyx_v_c_child = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":127
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":124
* c_parent = <xmlNode*>c_doc._private
* c_child = c_root.children
* while c_child is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_child != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":128
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":125
* c_child = c_root.children
* while c_child is not NULL:
* c_child.parent = c_parent # <<<<<<<<<<<<<<
*/
__pyx_v_c_child->parent = __pyx_v_c_parent;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":129
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":126
* while c_child is not NULL:
* c_child.parent = c_parent
* c_child = c_child.next # <<<<<<<<<<<<<<
__pyx_v_c_child = __pyx_t_2;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":132
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":129
*
* # prevent recursive removal of children
* c_root.children = c_root.last = NULL # <<<<<<<<<<<<<<
__pyx_v_c_root->children = NULL;
__pyx_v_c_root->last = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":133
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":130
* # prevent recursive removal of children
* c_root.children = c_root.last = NULL
* tree.xmlFreeDoc(c_doc) # <<<<<<<<<<<<<<
*/
xmlFreeDoc(__pyx_v_c_doc);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":115
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":112
* return c_doc
*
* cdef void _destroyFakeDoc(xmlDoc* c_base_doc, xmlDoc* c_doc): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":135
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":132
* tree.xmlFreeDoc(c_doc)
*
* cdef _Element _fakeDocElementFactory(_Document doc, xmlNode* c_element): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_fakeDocElementFactory", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":144
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":141
* instantiate the original node instead.
* """
* if c_element.doc is not doc._c_doc: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_element->doc != __pyx_v_doc->_c_doc) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":145
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":142
* """
* if c_element.doc is not doc._c_doc:
* if c_element.doc._private is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_element->doc->_private != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":146
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":143
* if c_element.doc is not doc._c_doc:
* if c_element.doc._private is not NULL:
* if c_element is c_element.doc.children: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_element == __pyx_v_c_element->doc->children) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":147
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":144
* if c_element.doc._private is not NULL:
* if c_element is c_element.doc.children:
* c_element = <xmlNode*>c_element.doc._private # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":149
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":146
* c_element = <xmlNode*>c_element.doc._private
* #assert c_element.type == tree.XML_ELEMENT_NODE
* return _elementFactory(doc, c_element) # <<<<<<<<<<<<<<
* ################################################################################
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_element)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct LxmlElement *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":135
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":132
* tree.xmlFreeDoc(c_doc)
*
* cdef _Element _fakeDocElementFactory(_Document doc, xmlNode* c_element): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":154
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":151
* # support for freeing tree elements when proxy objects are destroyed
*
* cdef int attemptDeallocation(xmlNode* c_node): # <<<<<<<<<<<<<<
int __pyx_t_1;
__Pyx_RefNannySetupContext("attemptDeallocation", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":159
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":156
* cdef xmlNode* c_top
* # could be we actually aren't referring to the tree at all
* if c_node is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":161
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":158
* if c_node is NULL:
* #print "not freeing, node is NULL"
* return 0 # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":162
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":159
* #print "not freeing, node is NULL"
* return 0
* c_top = getDeallocationTop(c_node) # <<<<<<<<<<<<<<
*/
__pyx_v_c_top = __pyx_f_4lxml_5etree_getDeallocationTop(__pyx_v_c_node);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":163
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":160
* return 0
* c_top = getDeallocationTop(c_node)
* if c_top is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_top != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":165
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":162
* if c_top is not NULL:
* #print "freeing:", c_top.name
* _removeText(c_top.next) # tail # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree__removeText(__pyx_v_c_top->next);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":166
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":163
* #print "freeing:", c_top.name
* _removeText(c_top.next) # tail
* tree.xmlFreeNode(c_top) # <<<<<<<<<<<<<<
*/
xmlFreeNode(__pyx_v_c_top);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":167
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":164
* _removeText(c_top.next) # tail
* tree.xmlFreeNode(c_top)
* return 1 # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":168
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":165
* tree.xmlFreeNode(c_top)
* return 1
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":154
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":151
* # support for freeing tree elements when proxy objects are destroyed
*
* cdef int attemptDeallocation(xmlNode* c_node): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":170
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":167
* return 0
*
* cdef xmlNode* getDeallocationTop(xmlNode* c_node): # <<<<<<<<<<<<<<
xmlNode *__pyx_t_2;
__Pyx_RefNannySetupContext("getDeallocationTop", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":174
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":171
* """
* #print "trying to do deallocating:", c_node.type
* if hasProxy(c_node): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":176
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":173
* if hasProxy(c_node):
* #print "Not freeing: proxies still exist"
* return NULL # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":177
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":174
* #print "Not freeing: proxies still exist"
* return NULL
* while c_node.parent is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node->parent != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":178
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":175
* return NULL
* while c_node.parent is not NULL:
* c_node = c_node.parent # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_c_node->parent;
__pyx_v_c_node = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":180
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":177
* c_node = c_node.parent
* #print "checking:", c_current.type
* if c_node.type == tree.XML_DOCUMENT_NODE or \ # <<<<<<<<<<<<<<
switch (__pyx_v_c_node->type) {
case XML_DOCUMENT_NODE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":181
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":178
* #print "checking:", c_current.type
* if c_node.type == tree.XML_DOCUMENT_NODE or \
* c_node.type == tree.XML_HTML_DOCUMENT_NODE: # <<<<<<<<<<<<<<
*/
case XML_HTML_DOCUMENT_NODE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":183
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":180
* c_node.type == tree.XML_HTML_DOCUMENT_NODE:
* #print "not freeing: still in doc"
* return NULL # <<<<<<<<<<<<<<
default: break;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":185
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":182
* return NULL
* # if we're still attached to the document, don't deallocate
* if hasProxy(c_node): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":187
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":184
* if hasProxy(c_node):
* #print "Not freeing: proxies still exist"
* return NULL # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":189
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":186
* return NULL
* # see whether we have children to deallocate
* if canDeallocateChildNodes(c_node): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_f_4lxml_5etree_canDeallocateChildNodes(__pyx_v_c_node) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":190
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":187
* # see whether we have children to deallocate
* if canDeallocateChildNodes(c_node):
* return c_node # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":192
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":189
* return c_node
* else:
* return NULL # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":170
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":167
* return 0
*
* cdef xmlNode* getDeallocationTop(xmlNode* c_node): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":194
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":191
* return NULL
*
* cdef int canDeallocateChildNodes(xmlNode* c_parent): # <<<<<<<<<<<<<<
int __pyx_t_2;
__Pyx_RefNannySetupContext("canDeallocateChildNodes", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":196
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":193
* cdef int canDeallocateChildNodes(xmlNode* c_parent):
* cdef xmlNode* c_node
* c_node = c_parent.children # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_c_parent->children;
__pyx_v_c_node = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":197
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":194
* cdef xmlNode* c_node
* c_node = c_parent.children
* tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_parent, c_node, 1) # <<<<<<<<<<<<<<
*/
BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_parent, __pyx_v_c_node, 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":198
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":195
* c_node = c_parent.children
* tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_parent, c_node, 1)
* if hasProxy(c_node): # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":199
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":196
* tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_parent, c_node, 1)
* if hasProxy(c_node):
* return 0 # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":200
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":197
* if hasProxy(c_node):
* return 0
* tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<<
*/
END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":201
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":198
* return 0
* tree.END_FOR_EACH_ELEMENT_FROM(c_node)
* return 1 # <<<<<<<<<<<<<<
__pyx_r = 1;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":194
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":191
* return NULL
*
* cdef int canDeallocateChildNodes(xmlNode* c_parent): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":206
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":203
* # fix _Document references and namespaces when a node changes documents
*
* cdef void _copyParentNamespaces(xmlNode* c_from_node, xmlNode* c_to_node) nogil: # <<<<<<<<<<<<<<
int __pyx_t_4;
xmlNs *__pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":213
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":210
* cdef xmlNs* c_new_ns
* cdef int prefix_known
* c_parent = c_from_node.parent # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_c_from_node->parent;
__pyx_v_c_parent = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":214
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":211
* cdef int prefix_known
* c_parent = c_from_node.parent
* while c_parent and (tree._isElementOrXInclude(c_parent) or # <<<<<<<<<<<<<<
__pyx_t_2 = (_isElementOrXInclude(__pyx_v_c_parent) != 0);
if (!__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":215
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":212
* c_parent = c_from_node.parent
* while c_parent and (tree._isElementOrXInclude(c_parent) or
* c_parent.type == tree.XML_DOCUMENT_NODE): # <<<<<<<<<<<<<<
}
if (!__pyx_t_2) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":216
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":213
* while c_parent and (tree._isElementOrXInclude(c_parent) or
* c_parent.type == tree.XML_DOCUMENT_NODE):
* c_new_ns = c_parent.nsDef # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_c_parent->nsDef;
__pyx_v_c_new_ns = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":217
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":214
* c_parent.type == tree.XML_DOCUMENT_NODE):
* c_new_ns = c_parent.nsDef
* while c_new_ns: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_c_new_ns != 0);
if (!__pyx_t_2) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":219
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":216
* while c_new_ns:
* # libxml2 will check if the prefix is already defined
* tree.xmlNewNs(c_to_node, c_new_ns.href, c_new_ns.prefix) # <<<<<<<<<<<<<<
*/
xmlNewNs(__pyx_v_c_to_node, __pyx_v_c_new_ns->href, __pyx_v_c_new_ns->prefix);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":220
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":217
* # libxml2 will check if the prefix is already defined
* tree.xmlNewNs(c_to_node, c_new_ns.href, c_new_ns.prefix)
* c_new_ns = c_new_ns.next # <<<<<<<<<<<<<<
__pyx_v_c_new_ns = __pyx_t_5;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":221
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":218
* tree.xmlNewNs(c_to_node, c_new_ns.href, c_new_ns.prefix)
* c_new_ns = c_new_ns.next
* c_parent = c_parent.parent # <<<<<<<<<<<<<<
__pyx_v_c_parent = __pyx_t_1;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":206
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":203
* # fix _Document references and namespaces when a node changes documents
*
* cdef void _copyParentNamespaces(xmlNode* c_from_node, xmlNode* c_to_node) nogil: # <<<<<<<<<<<<<<
/* function exit code */
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":229
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":226
* size_t last
*
* cdef int _growNsCache(_nscache* c_ns_cache) except -1: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_growNsCache", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":231
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":228
* cdef int _growNsCache(_nscache* c_ns_cache) except -1:
* cdef xmlNs** c_ns_ptr
* if c_ns_cache.size == 0: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ns_cache->size == 0) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":232
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":229
* cdef xmlNs** c_ns_ptr
* if c_ns_cache.size == 0:
* c_ns_cache.size = 20 # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":234
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":231
* c_ns_cache.size = 20
* else:
* c_ns_cache.size *= 2 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":235
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":232
* else:
* c_ns_cache.size *= 2
* c_ns_ptr = <xmlNs**> stdlib.realloc( # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns_ptr = ((xmlNs **)realloc(__pyx_v_c_ns_cache->new, (__pyx_v_c_ns_cache->size * (sizeof(xmlNs *)))));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":237
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":234
* c_ns_ptr = <xmlNs**> stdlib.realloc(
* c_ns_cache.new, c_ns_cache.size * sizeof(xmlNs*))
* if c_ns_ptr is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ns_ptr != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":238
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":235
* c_ns_cache.new, c_ns_cache.size * sizeof(xmlNs*))
* if c_ns_ptr is not NULL:
* c_ns_cache.new = c_ns_ptr # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns_cache->new = __pyx_v_c_ns_ptr;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":239
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":236
* if c_ns_ptr is not NULL:
* c_ns_cache.new = c_ns_ptr
* c_ns_ptr = <xmlNs**> stdlib.realloc( # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":241
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":238
* c_ns_ptr = <xmlNs**> stdlib.realloc(
* c_ns_cache.old, c_ns_cache.size * sizeof(xmlNs*))
* if c_ns_ptr is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ns_ptr != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":242
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":239
* c_ns_cache.old, c_ns_cache.size * sizeof(xmlNs*))
* if c_ns_ptr is not NULL:
* c_ns_cache.old = c_ns_ptr # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":244
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":241
* c_ns_cache.old = c_ns_ptr
* else:
* stdlib.free(c_ns_cache.new) # <<<<<<<<<<<<<<
*/
free(__pyx_v_c_ns_cache->new);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":245
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":242
* else:
* stdlib.free(c_ns_cache.new)
* stdlib.free(c_ns_cache.old) # <<<<<<<<<<<<<<
*/
free(__pyx_v_c_ns_cache->old);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":246
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":243
* stdlib.free(c_ns_cache.new)
* stdlib.free(c_ns_cache.old)
* raise MemoryError() # <<<<<<<<<<<<<<
* return 0
*
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":247
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":244
* stdlib.free(c_ns_cache.old)
* raise MemoryError()
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":229
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":226
* size_t last
*
* cdef int _growNsCache(_nscache* c_ns_cache) except -1: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":249
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":246
* return 0
*
* cdef inline int _appendToNsCache(_nscache* c_ns_cache, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_appendToNsCache", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":251
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":248
* cdef inline int _appendToNsCache(_nscache* c_ns_cache,
* xmlNs* c_old_ns, xmlNs* c_new_ns) except -1:
* if c_ns_cache.last >= c_ns_cache.size: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ns_cache->last >= __pyx_v_c_ns_cache->size) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":252
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":249
* xmlNs* c_old_ns, xmlNs* c_new_ns) except -1:
* if c_ns_cache.last >= c_ns_cache.size:
* _growNsCache(c_ns_cache) # <<<<<<<<<<<<<<
* c_ns_cache.old[c_ns_cache.last] = c_old_ns
* c_ns_cache.new[c_ns_cache.last] = c_new_ns
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__growNsCache(__pyx_v_c_ns_cache); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__growNsCache(__pyx_v_c_ns_cache); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":253
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":250
* if c_ns_cache.last >= c_ns_cache.size:
* _growNsCache(c_ns_cache)
* c_ns_cache.old[c_ns_cache.last] = c_old_ns # <<<<<<<<<<<<<<
*/
(__pyx_v_c_ns_cache->old[__pyx_v_c_ns_cache->last]) = __pyx_v_c_old_ns;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":254
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":251
* _growNsCache(c_ns_cache)
* c_ns_cache.old[c_ns_cache.last] = c_old_ns
* c_ns_cache.new[c_ns_cache.last] = c_new_ns # <<<<<<<<<<<<<<
*/
(__pyx_v_c_ns_cache->new[__pyx_v_c_ns_cache->last]) = __pyx_v_c_new_ns;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":255
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":252
* c_ns_cache.old[c_ns_cache.last] = c_old_ns
* c_ns_cache.new[c_ns_cache.last] = c_new_ns
* c_ns_cache.last += 1 # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns_cache->last = (__pyx_v_c_ns_cache->last + 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":249
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":246
* return 0
*
* cdef inline int _appendToNsCache(_nscache* c_ns_cache, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":257
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":254
* c_ns_cache.last += 1
*
* cdef int _stripRedundantNamespaceDeclarations( # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_stripRedundantNamespaceDeclarations", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":267
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":264
* cdef xmlNs** c_nsdef
* # use a xmlNs** to handle assignments to "c_element.nsDef" correctly
* c_nsdef = &c_element.nsDef # <<<<<<<<<<<<<<
*/
__pyx_v_c_nsdef = (&__pyx_v_c_element->nsDef);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":268
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":265
* # use a xmlNs** to handle assignments to "c_element.nsDef" correctly
* c_nsdef = &c_element.nsDef
* while c_nsdef[0] is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = (((__pyx_v_c_nsdef[0]) != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":269
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":266
* c_nsdef = &c_element.nsDef
* while c_nsdef[0] is not NULL:
* c_ns = tree.xmlSearchNsByHref( # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns = xmlSearchNsByHref(__pyx_v_c_element->doc, __pyx_v_c_element->parent, (__pyx_v_c_nsdef[0])->href);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":271
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":268
* c_ns = tree.xmlSearchNsByHref(
* c_element.doc, c_element.parent, c_nsdef[0].href)
* if c_ns is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ns == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":273
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":270
* if c_ns is NULL:
* # new namespace href => keep and cache the ns declaration
* _appendToNsCache(c_ns_cache, c_nsdef[0], c_nsdef[0]) # <<<<<<<<<<<<<<
* c_nsdef = &c_nsdef[0].next
* else:
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, (__pyx_v_c_nsdef[0]), (__pyx_v_c_nsdef[0])); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, (__pyx_v_c_nsdef[0]), (__pyx_v_c_nsdef[0])); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":274
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":271
* # new namespace href => keep and cache the ns declaration
* _appendToNsCache(c_ns_cache, c_nsdef[0], c_nsdef[0])
* c_nsdef = &c_nsdef[0].next # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":277
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":274
* else:
* # known namespace href => cache mapping and strip old ns
* _appendToNsCache(c_ns_cache, c_nsdef[0], c_ns) # <<<<<<<<<<<<<<
* # cut out c_nsdef.next and prepend it to garbage chain
* c_ns_next = c_nsdef[0].next
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, (__pyx_v_c_nsdef[0]), __pyx_v_c_ns); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, (__pyx_v_c_nsdef[0]), __pyx_v_c_ns); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":279
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":276
* _appendToNsCache(c_ns_cache, c_nsdef[0], c_ns)
* # cut out c_nsdef.next and prepend it to garbage chain
* c_ns_next = c_nsdef[0].next # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_c_nsdef[0])->next;
__pyx_v_c_ns_next = __pyx_t_3;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":280
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":277
* # cut out c_nsdef.next and prepend it to garbage chain
* c_ns_next = c_nsdef[0].next
* c_nsdef[0].next = c_del_ns_list[0] # <<<<<<<<<<<<<<
*/
(__pyx_v_c_nsdef[0])->next = (__pyx_v_c_del_ns_list[0]);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":281
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":278
* c_ns_next = c_nsdef[0].next
* c_nsdef[0].next = c_del_ns_list[0]
* c_del_ns_list[0] = c_nsdef[0] # <<<<<<<<<<<<<<
*/
(__pyx_v_c_del_ns_list[0]) = (__pyx_v_c_nsdef[0]);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":282
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":279
* c_nsdef[0].next = c_del_ns_list[0]
* c_del_ns_list[0] = c_nsdef[0]
* c_nsdef[0] = c_ns_next # <<<<<<<<<<<<<<
__pyx_L5:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":283
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":280
* c_del_ns_list[0] = c_nsdef[0]
* c_nsdef[0] = c_ns_next
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":257
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":254
* c_ns_cache.last += 1
*
* cdef int _stripRedundantNamespaceDeclarations( # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":285
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":282
* return 0
*
* cdef int moveNodeToDocument(_Document doc, xmlDoc* c_source_doc, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("moveNodeToDocument", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":324
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":321
* cdef xmlNs* c_nsdef
* cdef xmlNs* c_del_ns_list
* cdef size_t i, proxy_count = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_proxy_count = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":326
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":323
* cdef size_t i, proxy_count = 0
*
* if not tree._isElementOrXInclude(c_element): # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(_isElementOrXInclude(__pyx_v_c_element) != 0)) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":327
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":324
*
* if not tree._isElementOrXInclude(c_element):
* return 0 # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":329
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":326
* return 0
*
* c_start_node = c_element # <<<<<<<<<<<<<<
*/
__pyx_v_c_start_node = __pyx_v_c_element;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":330
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":327
*
* c_start_node = c_element
* c_del_ns_list = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_c_del_ns_list = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":332
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":329
* c_del_ns_list = NULL
*
* c_ns_cache.new = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns_cache.new = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":333
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":330
*
* c_ns_cache.new = NULL
* c_ns_cache.old = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns_cache.old = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":334
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":331
* c_ns_cache.new = NULL
* c_ns_cache.old = NULL
* c_ns_cache.size = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns_cache.size = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":335
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":332
* c_ns_cache.old = NULL
* c_ns_cache.size = 0
* c_ns_cache.last = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns_cache.last = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":337
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":334
* c_ns_cache.last = 0
*
* tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) # <<<<<<<<<<<<<<
*/
BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_element, 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":338
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":335
*
* tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1)
* if tree._isElementOrXInclude(c_element): # <<<<<<<<<<<<<<
__pyx_t_1 = (_isElementOrXInclude(__pyx_v_c_element) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":339
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":336
* tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1)
* if tree._isElementOrXInclude(c_element):
* if hasProxy(c_element): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_element) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":340
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":337
* if tree._isElementOrXInclude(c_element):
* if hasProxy(c_element):
* proxy_count += 1 # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":344
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":341
* # 1) cut out namespaces defined here that are already known by
* # the ancestors
* if c_element.nsDef is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_element->nsDef != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":345
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":342
* # the ancestors
* if c_element.nsDef is not NULL:
* _stripRedundantNamespaceDeclarations( # <<<<<<<<<<<<<<
* c_element, &c_ns_cache, &c_del_ns_list)
*
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(__pyx_v_c_element, (&__pyx_v_c_ns_cache), (&__pyx_v_c_del_ns_list)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(__pyx_v_c_element, (&__pyx_v_c_ns_cache), (&__pyx_v_c_del_ns_list)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":350
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":347
* # 2) make sure the namespaces of an element and its attributes
* # are declared in this document (i.e. on the node or its parents)
* c_node = c_element # <<<<<<<<<<<<<<
*/
__pyx_v_c_node = __pyx_v_c_element;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":351
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":348
* # are declared in this document (i.e. on the node or its parents)
* c_node = c_element
* while c_node is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":352
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":349
* c_node = c_element
* while c_node is not NULL:
* if c_node.ns is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node->ns != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":353
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":350
* while c_node is not NULL:
* if c_node.ns is not NULL:
* c_ns = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":354
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":351
* if c_node.ns is not NULL:
* c_ns = NULL
* for i in range(c_ns_cache.last): # <<<<<<<<<<<<<<
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
__pyx_v_i = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":355
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":352
* c_ns = NULL
* for i in range(c_ns_cache.last):
* if c_node.ns is c_ns_cache.old[i]: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node->ns == (__pyx_v_c_ns_cache.old[__pyx_v_i])) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":356
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":353
* for i in range(c_ns_cache.last):
* if c_node.ns is c_ns_cache.old[i]:
* if (c_node.type == tree.XML_ATTRIBUTE_NODE # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node->type == XML_ATTRIBUTE_NODE) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":357
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":354
* if c_node.ns is c_ns_cache.old[i]:
* if (c_node.type == tree.XML_ATTRIBUTE_NODE
* and c_node.ns.prefix # <<<<<<<<<<<<<<
*/
if ((__pyx_v_c_node->ns->prefix != 0)) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":358
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":355
* if (c_node.type == tree.XML_ATTRIBUTE_NODE
* and c_node.ns.prefix
* and not c_ns_cache.new[i].prefix): # <<<<<<<<<<<<<<
}
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":360
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":357
* and not c_ns_cache.new[i].prefix):
* # avoid dropping prefix from attributes
* continue # <<<<<<<<<<<<<<
goto __pyx_L10_continue;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":361
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":358
* # avoid dropping prefix from attributes
* continue
* c_ns = c_ns_cache.new[i] # <<<<<<<<<<<<<<
*/
__pyx_v_c_ns = (__pyx_v_c_ns_cache.new[__pyx_v_i]);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":362
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":359
* continue
* c_ns = c_ns_cache.new[i]
* break # <<<<<<<<<<<<<<
}
__pyx_L11_break:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":364
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":361
* break
*
* if not c_ns: # <<<<<<<<<<<<<<
__pyx_t_5 = ((!(__pyx_v_c_ns != 0)) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":367
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":364
* # not in cache or not acceptable
* # => find a replacement from this document
* c_ns = doc._findOrBuildNodeNs( # <<<<<<<<<<<<<<
* c_start_node, c_node.ns.href, c_node.ns.prefix,
* c_node.type == tree.XML_ATTRIBUTE_NODE)
*/
- __pyx_t_7 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_node->ns->href, __pyx_v_c_node->ns->prefix, (__pyx_v_c_node->type == XML_ATTRIBUTE_NODE)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_node->ns->href, __pyx_v_c_node->ns->prefix, (__pyx_v_c_node->type == XML_ATTRIBUTE_NODE)); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_ns = __pyx_t_7;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":370
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":367
* c_start_node, c_node.ns.href, c_node.ns.prefix,
* c_node.type == tree.XML_ATTRIBUTE_NODE)
* _appendToNsCache(&c_ns_cache, c_node.ns, c_ns) # <<<<<<<<<<<<<<
* c_node.ns = c_ns
*
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache((&__pyx_v_c_ns_cache), __pyx_v_c_node->ns, __pyx_v_c_ns); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__appendToNsCache((&__pyx_v_c_ns_cache), __pyx_v_c_node->ns, __pyx_v_c_ns); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 367; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L14;
}
__pyx_L14:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":371
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":368
* c_node.type == tree.XML_ATTRIBUTE_NODE)
* _appendToNsCache(&c_ns_cache, c_node.ns, c_ns)
* c_node.ns = c_ns # <<<<<<<<<<<<<<
}
__pyx_L9:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":373
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":370
* c_node.ns = c_ns
*
* if c_node is c_element: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_c_node == __pyx_v_c_element) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":375
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":372
* if c_node is c_element:
* # after the element, continue with its attributes
* c_node = <xmlNode*>c_element.properties # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":377
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":374
* c_node = <xmlNode*>c_element.properties
* else:
* c_node = c_node.next # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":378
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":375
* else:
* c_node = c_node.next
* tree.END_FOR_EACH_FROM(c_element) # <<<<<<<<<<<<<<
*/
END_FOR_EACH_FROM(__pyx_v_c_element);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":381
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":378
*
* # free now unused namespace declarations
* if c_del_ns_list is not NULL: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_c_del_ns_list != NULL) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":382
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":379
* # free now unused namespace declarations
* if c_del_ns_list is not NULL:
* tree.xmlFreeNsList(c_del_ns_list) # <<<<<<<<<<<<<<
}
__pyx_L16:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":385
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":382
*
* # cleanup
* if c_ns_cache.new is not NULL: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_c_ns_cache.new != NULL) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":386
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":383
* # cleanup
* if c_ns_cache.new is not NULL:
* stdlib.free(c_ns_cache.new) # <<<<<<<<<<<<<<
}
__pyx_L17:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":387
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":384
* if c_ns_cache.new is not NULL:
* stdlib.free(c_ns_cache.new)
* if c_ns_cache.old is not NULL: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_c_ns_cache.old != NULL) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":388
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":385
* stdlib.free(c_ns_cache.new)
* if c_ns_cache.old is not NULL:
* stdlib.free(c_ns_cache.old) # <<<<<<<<<<<<<<
}
__pyx_L18:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":391
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":388
*
* # 3) fix the names in the tree if we moved it from a different thread
* if doc._c_doc.dict is not c_source_doc.dict: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_doc->_c_doc->dict != __pyx_v_c_source_doc->dict) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":392
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":389
* # 3) fix the names in the tree if we moved it from a different thread
* if doc._c_doc.dict is not c_source_doc.dict:
* fixThreadDictNames(c_start_node, c_source_doc.dict, doc._c_doc.dict) # <<<<<<<<<<<<<<
}
__pyx_L19:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":396
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":393
* # 4) fix _Document references
* # (and potentially deallocate the source document)
* if proxy_count > 0: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_proxy_count > 0) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":397
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":394
* # (and potentially deallocate the source document)
* if proxy_count > 0:
* if proxy_count == 1 and c_start_node._private is not NULL: # <<<<<<<<<<<<<<
}
if (__pyx_t_6) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":398
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":395
* if proxy_count > 0:
* if proxy_count == 1 and c_start_node._private is not NULL:
* proxy = getProxy(c_start_node) # <<<<<<<<<<<<<<
* if proxy is not None:
* if proxy._doc is not doc:
*/
- __pyx_t_9 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_start_node)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_start_node)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__pyx_v_proxy = ((struct LxmlElement *)__pyx_t_9);
__pyx_t_9 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":399
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":396
* if proxy_count == 1 and c_start_node._private is not NULL:
* proxy = getProxy(c_start_node)
* if proxy is not None: # <<<<<<<<<<<<<<
__pyx_t_5 = (__pyx_t_6 != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":400
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":397
* proxy = getProxy(c_start_node)
* if proxy is not None:
* if proxy._doc is not doc: # <<<<<<<<<<<<<<
__pyx_t_6 = (__pyx_t_5 != 0);
if (__pyx_t_6) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":401
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":398
* if proxy is not None:
* if proxy._doc is not doc:
* proxy._doc = doc # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":403
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":400
* proxy._doc = doc
* else:
* fixElementDocument(c_start_node, doc, proxy_count) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":405
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":402
* fixElementDocument(c_start_node, doc, proxy_count)
* else:
* fixElementDocument(c_start_node, doc, proxy_count) # <<<<<<<<<<<<<<
}
__pyx_L20:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":407
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":404
* fixElementDocument(c_start_node, doc, proxy_count)
*
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":285
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":282
* return 0
*
* cdef int moveNodeToDocument(_Document doc, xmlDoc* c_source_doc, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":410
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":407
*
*
* cdef void fixElementDocument(xmlNode* c_element, _Document doc, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("fixElementDocument", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":412
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":409
* cdef void fixElementDocument(xmlNode* c_element, _Document doc,
* size_t proxy_count):
* cdef xmlNode* c_node = c_element # <<<<<<<<<<<<<<
*/
__pyx_v_c_node = __pyx_v_c_element;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":413
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":410
* size_t proxy_count):
* cdef xmlNode* c_node = c_element
* cdef _Element proxy = None # init-to-None required due to fake-loop below # <<<<<<<<<<<<<<
__Pyx_INCREF(Py_None);
__pyx_v_proxy = ((struct LxmlElement *)Py_None);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":414
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":411
* cdef xmlNode* c_node = c_element
* cdef _Element proxy = None # init-to-None required due to fake-loop below
* tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) # <<<<<<<<<<<<<<
*/
BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_node, 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":415
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":412
* cdef _Element proxy = None # init-to-None required due to fake-loop below
* tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1)
* if c_node._private is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node->_private != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":416
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":413
* tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1)
* if c_node._private is not NULL:
* proxy = getProxy(c_node) # <<<<<<<<<<<<<<
* if proxy is not None:
* if proxy._doc is not doc:
*/
- __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF_SET(__pyx_v_proxy, ((struct LxmlElement *)__pyx_t_2));
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":417
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":414
* if c_node._private is not NULL:
* proxy = getProxy(c_node)
* if proxy is not None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_1 != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":418
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":415
* proxy = getProxy(c_node)
* if proxy is not None:
* if proxy._doc is not doc: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_3 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":419
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":416
* if proxy is not None:
* if proxy._doc is not doc:
* proxy._doc = doc # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":420
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":417
* if proxy._doc is not doc:
* proxy._doc = doc
* proxy_count -= 1 # <<<<<<<<<<<<<<
*/
__pyx_v_proxy_count = (__pyx_v_proxy_count - 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":421
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":418
* proxy._doc = doc
* proxy_count -= 1
* if proxy_count == 0: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_proxy_count == 0) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":422
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":419
* proxy_count -= 1
* if proxy_count == 0:
* return # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":423
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":420
* if proxy_count == 0:
* return
* tree.END_FOR_EACH_FROM(c_node) # <<<<<<<<<<<<<<
*/
END_FOR_EACH_FROM(__pyx_v_c_node);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":410
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":407
*
*
* cdef void fixElementDocument(xmlNode* c_element, _Document doc, # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":425
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":422
* tree.END_FOR_EACH_FROM(c_node)
*
* cdef void fixThreadDictNames(xmlNode* c_element, # <<<<<<<<<<<<<<
int __pyx_t_1;
xmlNode *__pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":432
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":429
* # this should only be called when the element is based on a
* # different libxml2 tag name dictionary
* if c_element.type == tree.XML_DOCUMENT_NODE or \ # <<<<<<<<<<<<<<
switch (__pyx_v_c_element->type) {
case XML_DOCUMENT_NODE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":433
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":430
* # different libxml2 tag name dictionary
* if c_element.type == tree.XML_DOCUMENT_NODE or \
* c_element.type == tree.XML_HTML_DOCUMENT_NODE: # <<<<<<<<<<<<<<
*/
case XML_HTML_DOCUMENT_NODE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":432
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":429
* # this should only be called when the element is based on a
* # different libxml2 tag name dictionary
* if c_element.type == tree.XML_DOCUMENT_NODE or \ # <<<<<<<<<<<<<<
}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":435
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":432
* c_element.type == tree.XML_HTML_DOCUMENT_NODE:
* # may define "xml" namespace
* fixThreadDictNsForNode(c_element, c_src_dict, c_dict) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_fixThreadDictNsForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":436
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":433
* # may define "xml" namespace
* fixThreadDictNsForNode(c_element, c_src_dict, c_dict)
* c_element = c_element.children # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_c_element->children;
__pyx_v_c_element = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":437
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":434
* fixThreadDictNsForNode(c_element, c_src_dict, c_dict)
* c_element = c_element.children
* while c_element is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_element != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":438
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":435
* c_element = c_element.children
* while c_element is not NULL:
* fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_fixThreadDictNamesForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":439
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":436
* while c_element is not NULL:
* fixThreadDictNamesForNode(c_element, c_src_dict, c_dict)
* c_element = c_element.next # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":440
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":437
* fixThreadDictNamesForNode(c_element, c_src_dict, c_dict)
* c_element = c_element.next
* elif tree._isElementOrXInclude(c_element): # <<<<<<<<<<<<<<
__pyx_t_1 = (_isElementOrXInclude(__pyx_v_c_element) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":441
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":438
* c_element = c_element.next
* elif tree._isElementOrXInclude(c_element):
* fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":425
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":422
* tree.END_FOR_EACH_FROM(c_node)
*
* cdef void fixThreadDictNames(xmlNode* c_element, # <<<<<<<<<<<<<<
/* function exit code */
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":443
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":440
* fixThreadDictNamesForNode(c_element, c_src_dict, c_dict)
*
* cdef void fixThreadDictNamesForNode(xmlNode* c_element, # <<<<<<<<<<<<<<
xmlNode *__pyx_v_c_node;
int __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":446
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":443
* tree.xmlDict* c_src_dict,
* tree.xmlDict* c_dict) nogil:
* cdef xmlNode* c_node = c_element # <<<<<<<<<<<<<<
*/
__pyx_v_c_node = __pyx_v_c_element;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":447
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":444
* tree.xmlDict* c_dict) nogil:
* cdef xmlNode* c_node = c_element
* tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) # <<<<<<<<<<<<<<
*/
BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_node, 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":448
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":445
* cdef xmlNode* c_node = c_element
* tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1)
* if c_node.name is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node->name != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":449
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":446
* tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1)
* if c_node.name is not NULL:
* fixThreadDictNameForNode(c_node, c_src_dict, c_dict) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":454
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":451
* c_node.properties, c_src_dict, c_dict)
* fixThreadDictNsForNode(c_node, c_src_dict, c_dict)
* elif c_node.type == tree.XML_TEXT_NODE: # <<<<<<<<<<<<<<
*/
switch (__pyx_v_c_node->type) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":450
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":447
* if c_node.name is not NULL:
* fixThreadDictNameForNode(c_node, c_src_dict, c_dict)
* if c_node.type in (tree.XML_ELEMENT_NODE, tree.XML_XINCLUDE_START): # <<<<<<<<<<<<<<
case XML_ELEMENT_NODE:
case XML_XINCLUDE_START:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":451
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":448
* fixThreadDictNameForNode(c_node, c_src_dict, c_dict)
* if c_node.type in (tree.XML_ELEMENT_NODE, tree.XML_XINCLUDE_START):
* fixThreadDictNamesForAttributes( # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(__pyx_v_c_node->properties, __pyx_v_c_src_dict, __pyx_v_c_dict);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":453
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":450
* fixThreadDictNamesForAttributes(
* c_node.properties, c_src_dict, c_dict)
* fixThreadDictNsForNode(c_node, c_src_dict, c_dict) # <<<<<<<<<<<<<<
__pyx_f_4lxml_5etree_fixThreadDictNsForNode(__pyx_v_c_node, __pyx_v_c_src_dict, __pyx_v_c_dict);
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":454
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":451
* c_node.properties, c_src_dict, c_dict)
* fixThreadDictNsForNode(c_node, c_src_dict, c_dict)
* elif c_node.type == tree.XML_TEXT_NODE: # <<<<<<<<<<<<<<
*/
case XML_TEXT_NODE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":456
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":453
* elif c_node.type == tree.XML_TEXT_NODE:
* # libxml2's SAX2 parser interns some indentation space
* fixThreadDictContentForNode(c_node, c_src_dict, c_dict) # <<<<<<<<<<<<<<
default: break;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":457
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":454
* # libxml2's SAX2 parser interns some indentation space
* fixThreadDictContentForNode(c_node, c_src_dict, c_dict)
* tree.END_FOR_EACH_FROM(c_node) # <<<<<<<<<<<<<<
*/
END_FOR_EACH_FROM(__pyx_v_c_node);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":443
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":440
* fixThreadDictNamesForNode(c_element, c_src_dict, c_dict)
*
* cdef void fixThreadDictNamesForNode(xmlNode* c_element, # <<<<<<<<<<<<<<
/* function exit code */
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":459
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":456
* tree.END_FOR_EACH_FROM(c_node)
*
* cdef inline void fixThreadDictNamesForAttributes(tree.xmlAttr* c_attr, # <<<<<<<<<<<<<<
int __pyx_t_1;
xmlNode *__pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":463
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":460
* tree.xmlDict* c_dict) nogil:
* cdef xmlNode* c_child
* cdef xmlNode* c_node = <xmlNode*>c_attr # <<<<<<<<<<<<<<
*/
__pyx_v_c_node = ((xmlNode *)__pyx_v_c_attr);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":464
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":461
* cdef xmlNode* c_child
* cdef xmlNode* c_node = <xmlNode*>c_attr
* while c_node is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":465
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":462
* cdef xmlNode* c_node = <xmlNode*>c_attr
* while c_node is not NULL:
* fixThreadDictNameForNode(c_node, c_src_dict, c_dict) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_fixThreadDictNameForNode(__pyx_v_c_node, __pyx_v_c_src_dict, __pyx_v_c_dict);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":467
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":464
* fixThreadDictNameForNode(c_node, c_src_dict, c_dict)
* # libxml2 keeps some (!) attribute values in the dict
* c_child = c_node.children # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_c_node->children;
__pyx_v_c_child = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":468
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":465
* # libxml2 keeps some (!) attribute values in the dict
* c_child = c_node.children
* while c_child is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_child != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":469
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":466
* c_child = c_node.children
* while c_child is not NULL:
* fixThreadDictContentForNode(c_child, c_src_dict, c_dict) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_fixThreadDictContentForNode(__pyx_v_c_child, __pyx_v_c_src_dict, __pyx_v_c_dict);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":470
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":467
* while c_child is not NULL:
* fixThreadDictContentForNode(c_child, c_src_dict, c_dict)
* c_child = c_child.next # <<<<<<<<<<<<<<
__pyx_v_c_child = __pyx_t_2;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":471
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":468
* fixThreadDictContentForNode(c_child, c_src_dict, c_dict)
* c_child = c_child.next
* c_node = c_node.next # <<<<<<<<<<<<<<
__pyx_v_c_node = __pyx_t_2;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":459
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":456
* tree.END_FOR_EACH_FROM(c_node)
*
* cdef inline void fixThreadDictNamesForAttributes(tree.xmlAttr* c_attr, # <<<<<<<<<<<<<<
/* function exit code */
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":473
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":470
* c_node = c_node.next
*
* cdef inline void fixThreadDictNameForNode(xmlNode* c_node, # <<<<<<<<<<<<<<
int __pyx_t_3;
int __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":476
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":473
* tree.xmlDict* c_src_dict,
* tree.xmlDict* c_dict) nogil:
* cdef const_xmlChar* c_name = c_node.name # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_c_node->name;
__pyx_v_c_name = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":477
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":474
* tree.xmlDict* c_dict) nogil:
* cdef const_xmlChar* c_name = c_node.name
* if c_name is not NULL and \ # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_name != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":478
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":475
* cdef const_xmlChar* c_name = c_node.name
* if c_name is not NULL and \
* c_node.type != tree.XML_TEXT_NODE and \ # <<<<<<<<<<<<<<
switch (__pyx_v_c_node->type) {
case XML_TEXT_NODE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":479
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":476
* if c_name is not NULL and \
* c_node.type != tree.XML_TEXT_NODE and \
* c_node.type != tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<<
*/
case XML_COMMENT_NODE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":478
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":475
* cdef const_xmlChar* c_name = c_node.name
* if c_name is not NULL and \
* c_node.type != tree.XML_TEXT_NODE and \ # <<<<<<<<<<<<<<
}
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":480
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":477
* c_node.type != tree.XML_TEXT_NODE and \
* c_node.type != tree.XML_COMMENT_NODE:
* if tree.xmlDictOwns(c_src_dict, c_node.name): # <<<<<<<<<<<<<<
__pyx_t_4 = (xmlDictOwns(__pyx_v_c_src_dict, __pyx_v_c_node->name) != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":482
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":479
* if tree.xmlDictOwns(c_src_dict, c_node.name):
* # c_name can be NULL on memory error, but we don't handle that here
* c_name = tree.xmlDictLookup(c_dict, c_name, -1) # <<<<<<<<<<<<<<
*/
__pyx_v_c_name = xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_name, -1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":483
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":480
* # c_name can be NULL on memory error, but we don't handle that here
* c_name = tree.xmlDictLookup(c_dict, c_name, -1)
* if c_name is not NULL: # <<<<<<<<<<<<<<
__pyx_t_4 = ((__pyx_v_c_name != NULL) != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":484
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":481
* c_name = tree.xmlDictLookup(c_dict, c_name, -1)
* if c_name is not NULL:
* c_node.name = c_name # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":473
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":470
* c_node = c_node.next
*
* cdef inline void fixThreadDictNameForNode(xmlNode* c_node, # <<<<<<<<<<<<<<
/* function exit code */
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":486
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":483
* c_node.name = c_name
*
* cdef inline void fixThreadDictContentForNode(xmlNode* c_node, # <<<<<<<<<<<<<<
int __pyx_t_2;
int __pyx_t_3;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":489
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":486
* tree.xmlDict* c_src_dict,
* tree.xmlDict* c_dict) nogil:
* if c_node.content is not NULL and \ # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node->content != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":490
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":487
* tree.xmlDict* c_dict) nogil:
* if c_node.content is not NULL and \
* c_node.content is not <xmlChar*>&c_node.properties: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":491
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":488
* if c_node.content is not NULL and \
* c_node.content is not <xmlChar*>&c_node.properties:
* if tree.xmlDictOwns(c_src_dict, c_node.content): # <<<<<<<<<<<<<<
__pyx_t_3 = (xmlDictOwns(__pyx_v_c_src_dict, __pyx_v_c_node->content) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":493
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":490
* if tree.xmlDictOwns(c_src_dict, c_node.content):
* # result can be NULL on memory error, but we don't handle that here
* c_node.content = <xmlChar*>tree.xmlDictLookup(c_dict, c_node.content, -1) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":486
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":483
* c_node.name = c_name
*
* cdef inline void fixThreadDictContentForNode(xmlNode* c_node, # <<<<<<<<<<<<<<
/* function exit code */
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":495
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":492
* c_node.content = <xmlChar*>tree.xmlDictLookup(c_dict, c_node.content, -1)
*
* cdef inline void fixThreadDictNsForNode(xmlNode* c_node, # <<<<<<<<<<<<<<
xmlNs *__pyx_t_1;
int __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":498
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":495
* tree.xmlDict* c_src_dict,
* tree.xmlDict* c_dict) nogil:
* cdef xmlNs* c_ns = c_node.nsDef # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_c_node->nsDef;
__pyx_v_c_ns = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":499
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":496
* tree.xmlDict* c_dict) nogil:
* cdef xmlNs* c_ns = c_node.nsDef
* while c_ns is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_ns != NULL) != 0);
if (!__pyx_t_2) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":500
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":497
* cdef xmlNs* c_ns = c_node.nsDef
* while c_ns is not NULL:
* if c_ns.href is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_ns->href != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":501
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":498
* while c_ns is not NULL:
* if c_ns.href is not NULL:
* if tree.xmlDictOwns(c_src_dict, c_ns.href): # <<<<<<<<<<<<<<
__pyx_t_2 = (xmlDictOwns(__pyx_v_c_src_dict, __pyx_v_c_ns->href) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":502
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":499
* if c_ns.href is not NULL:
* if tree.xmlDictOwns(c_src_dict, c_ns.href):
* c_ns.href = tree.xmlDictLookup(c_dict, c_ns.href, -1) # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":503
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":500
* if tree.xmlDictOwns(c_src_dict, c_ns.href):
* c_ns.href = tree.xmlDictLookup(c_dict, c_ns.href, -1)
* if c_ns.prefix is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_ns->prefix != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":504
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":501
* c_ns.href = tree.xmlDictLookup(c_dict, c_ns.href, -1)
* if c_ns.prefix is not NULL:
* if tree.xmlDictOwns(c_src_dict, c_ns.prefix): # <<<<<<<<<<<<<<
__pyx_t_2 = (xmlDictOwns(__pyx_v_c_src_dict, __pyx_v_c_ns->prefix) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":505
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":502
* if c_ns.prefix is not NULL:
* if tree.xmlDictOwns(c_src_dict, c_ns.prefix):
* c_ns.prefix = tree.xmlDictLookup(c_dict, c_ns.prefix, -1) # <<<<<<<<<<<<<<
}
__pyx_L7:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":506
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":503
* if tree.xmlDictOwns(c_src_dict, c_ns.prefix):
* c_ns.prefix = tree.xmlDictLookup(c_dict, c_ns.prefix, -1)
* c_ns = c_ns.next # <<<<<<<<<<<<<<
__pyx_v_c_ns = __pyx_t_1;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":495
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/proxy.pxi":492
* c_node.content = <xmlChar*>tree.xmlDictLookup(c_dict, c_node.content, -1)
*
* cdef inline void fixThreadDictNsForNode(xmlNode* c_node, # <<<<<<<<<<<<<<
__Pyx_INCREF(((PyObject *)__pyx_v_element));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_element));
__Pyx_GIVEREF(((PyObject *)__pyx_v_element));
- __pyx_t_2 = PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyUnicode_Format(__pyx_kp_u_invalid_Element_proxy_at_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_doc));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_doc));
__Pyx_GIVEREF(((PyObject *)__pyx_v_doc));
- __pyx_t_2 = PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyUnicode_Format(__pyx_kp_u_invalid_Document_proxy_at_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_init_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_nsdefs = ((PyObject*)__pyx_t_5);
__Pyx_INCREF(__pyx_v_item);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_item);
__Pyx_GIVEREF(__pyx_v_item);
- __pyx_t_8 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_6);
*/
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_5);
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_6);
__Pyx_INCREF(__pyx_v_xml_string);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_xml_string);
__Pyx_GIVEREF(__pyx_v_xml_string);
- __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_5etree___REPLACE_XML_ENCODING, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree___REPLACE_XML_ENCODING, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(__pyx_v_xml_string);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_xml_string);
__Pyx_GIVEREF(__pyx_v_xml_string);
- __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_5etree___HAS_XML_ENCODING, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree___HAS_XML_ENCODING, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (__pyx_t_2 != Py_None);
int __pyx_r;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
- PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_2;
int __pyx_t_3;
- int __pyx_t_4;
+ PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
Py_ssize_t __pyx_t_6;
PyObject *__pyx_t_7 = NULL;
* elements = list(elements)
*
*/
- __Pyx_INCREF(__pyx_v_elements);
- __pyx_t_2 = __pyx_v_elements;
- __pyx_t_1 = PyList_Check(__pyx_t_2);
+ __pyx_t_1 = PyList_Check(__pyx_v_elements);
if (!__pyx_t_1) {
- __pyx_t_3 = PyTuple_Check(__pyx_t_2);
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_2 = PyTuple_Check(__pyx_v_elements);
+ __pyx_t_3 = __pyx_t_2;
} else {
- __pyx_t_4 = __pyx_t_1;
+ __pyx_t_3 = __pyx_t_1;
}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_1 = ((!(__pyx_t_4 != 0)) != 0);
+ __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0);
if (__pyx_t_1) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1131
*
* if step > 1:
*/
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_elements);
- PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_elements);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_elements);
__Pyx_GIVEREF(__pyx_v_elements);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF_SET(__pyx_v_elements, __pyx_t_5);
__pyx_t_5 = 0;
goto __pyx_L4;
*/
__pyx_t_5 = PyInt_FromSsize_t(__pyx_v_seqlength); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_slicelength); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_slicelength); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
__pyx_t_5 = 0;
- __pyx_t_2 = 0;
- __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_attempt_to_assign_sequence_of_si, __pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_attempt_to_assign_sequence_of_si, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_2, 0, 0);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
goto __pyx_L5;
* _appendChild(parent, element)
*/
if (PyList_CheckExact(__pyx_v_elements) || PyTuple_CheckExact(__pyx_v_elements)) {
- __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_4 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_8(__pyx_t_2);
+ __pyx_t_7 = __pyx_t_8(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
*/
__pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L8;
}
/*else*/ {
* _prependChild(parent, element)
*/
if (PyList_CheckExact(__pyx_v_elements) || PyTuple_CheckExact(__pyx_v_elements)) {
- __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_4 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_8(__pyx_t_2);
+ __pyx_t_7 = __pyx_t_8(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
*/
__pyx_t_9 = __pyx_f_4lxml_5etree__prependChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__pyx_L8:;
while (1) {
__pyx_t_1 = ((__pyx_v_c_node != NULL) != 0);
if (__pyx_t_1) {
- __pyx_t_4 = ((__pyx_v_c < __pyx_v_slicelength) != 0);
- __pyx_t_3 = __pyx_t_4;
+ __pyx_t_3 = ((__pyx_v_c < __pyx_v_slicelength) != 0);
+ __pyx_t_2 = __pyx_t_3;
} else {
- __pyx_t_3 = __pyx_t_1;
+ __pyx_t_2 = __pyx_t_1;
}
- if (!__pyx_t_3) break;
+ if (!__pyx_t_2) break;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1167
* c_next = c_node
* c += 1
* c_node = c_next
*/
- __pyx_t_2 = ((PyObject *)__pyx_v_parent->_doc);
- __Pyx_INCREF(__pyx_t_2);
- __pyx_t_9 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_2), __pyx_v_c_node); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((PyObject *)__pyx_v_parent->_doc);
+ __Pyx_INCREF(__pyx_t_4);
+ __pyx_t_9 = __pyx_f_4lxml_5etree__removeNode(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_node); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1170
* c_next = next_element(c_next)
*
* # find the first node right of the new insertion point
*/
- __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __Pyx_DECREF_SET(__pyx_v_elements, __pyx_t_2);
- __pyx_t_2 = 0;
+ __pyx_t_4 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_elements, __pyx_t_4);
+ __pyx_t_4 = 0;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1177
*
* if c_orig_neighbour is not NULL:
* c_node = next_element(c_orig_neighbour)
*/
- __pyx_t_3 = (__pyx_v_left_to_right != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = (__pyx_v_left_to_right != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1178
* # find the first node right of the new insertion point
* c_node = next_element(c_orig_neighbour)
* else:
*/
- __pyx_t_3 = ((__pyx_v_c_orig_neighbour != NULL) != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = ((__pyx_v_c_orig_neighbour != NULL) != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1179
* if left_to_right:
* # at the end, but reversed stepping
* # append one element and go to the next insertion point
*/
- __pyx_t_3 = ((__pyx_v_c_orig_neighbour == NULL) != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = ((__pyx_v_c_orig_neighbour == NULL) != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1186
* # at the end, but reversed stepping
* _appendChild(parent, element)
*/
if (PyList_CheckExact(__pyx_v_elements) || PyTuple_CheckExact(__pyx_v_elements)) {
- __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_4 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_8(__pyx_t_2);
+ __pyx_t_7 = __pyx_t_8(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
- __pyx_t_3 = (((PyObject *)__pyx_v_element) != Py_None);
- if (unlikely(!(__pyx_t_3 != 0))) {
+ __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None);
+ if (unlikely(!(__pyx_t_2 != 0))) {
PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None);
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
* slicelength -= 1
* for i in range(1, step):
*/
- __pyx_t_3 = ((__pyx_v_slicelength > 0) != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = ((__pyx_v_slicelength > 0) != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1191
* c_node = element._c_node
goto __pyx_L21_break;
}
__pyx_L21_break:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L18;
}
__pyx_L18:;
* # adjust step size after removing slice as we are not stepping
* # over the newly inserted elements
*/
- __pyx_t_3 = (__pyx_v_left_to_right != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = (__pyx_v_left_to_right != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1199
* # adjust step size after removing slice as we are not stepping
* for element in elements:
* assert element is not None, u"Node must not be None"
*/
- __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = ((__pyx_v_c_node != NULL) != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1203
* # now insert elements where we removed them
* _assertValidNode(element)
*/
if (PyList_CheckExact(__pyx_v_elements) || PyTuple_CheckExact(__pyx_v_elements)) {
- __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_4 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_8(__pyx_t_2);
+ __pyx_t_7 = __pyx_t_8(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
- __pyx_t_3 = (((PyObject *)__pyx_v_element) != Py_None);
- if (unlikely(!(__pyx_t_3 != 0))) {
+ __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None);
+ if (unlikely(!(__pyx_t_2 != 0))) {
PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None);
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
* slicelength = slicelength - 1
* for i in range(step):
*/
- __pyx_t_3 = ((__pyx_v_slicelength > 0) != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = ((__pyx_v_slicelength > 0) != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1217
* # stop at the end of the slice
* break
* else:
*/
- __pyx_t_3 = ((__pyx_v_c_node == NULL) != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = ((__pyx_v_c_node == NULL) != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1221
* c_node = next_element(c_node)
* # append the remaining elements at the respective end
*/
__pyx_r = 0;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L0;
}
__pyx_L28_break:;
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L26;
}
__pyx_L26:;
* for element in elements:
* assert element is not None, u"Node must not be None"
*/
- __pyx_t_3 = (__pyx_v_left_to_right != 0);
- if (__pyx_t_3) {
+ __pyx_t_2 = (__pyx_v_left_to_right != 0);
+ if (__pyx_t_2) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/apihelpers.pxi":1228
* # append the remaining elements at the respective end
* _assertValidNode(element)
*/
if (PyList_CheckExact(__pyx_v_elements) || PyTuple_CheckExact(__pyx_v_elements)) {
- __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_4 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_8(__pyx_t_2);
+ __pyx_t_7 = __pyx_t_8(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
- __pyx_t_3 = (((PyObject *)__pyx_v_element) != Py_None);
- if (unlikely(!(__pyx_t_3 != 0))) {
+ __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None);
+ if (unlikely(!(__pyx_t_2 != 0))) {
PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None);
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 1229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
*/
__pyx_t_9 = __pyx_f_4lxml_5etree__appendChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L34;
}
/*else*/ {
* _assertValidNode(element)
*/
if (PyList_CheckExact(__pyx_v_elements) || PyTuple_CheckExact(__pyx_v_elements)) {
- __pyx_t_2 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_4 = __pyx_v_elements; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_elements); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_2)) {
- if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ } else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_8(__pyx_t_2);
+ __pyx_t_7 = __pyx_t_8(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
*/
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
- __pyx_t_3 = (((PyObject *)__pyx_v_element) != Py_None);
- if (unlikely(!(__pyx_t_3 != 0))) {
+ __pyx_t_2 = (((PyObject *)__pyx_v_element) != Py_None);
+ if (unlikely(!(__pyx_t_2 != 0))) {
PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_Node_must_not_be_None);
{__pyx_filename = __pyx_f[4]; __pyx_lineno = 1234; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
*/
__pyx_t_9 = __pyx_f_4lxml_5etree__prependChild(__pyx_v_parent, __pyx_v_element); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__pyx_L34:;
/* function exit code */
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("lxml.etree._replaceSlice", __pyx_clineno, __pyx_lineno, __pyx_filename);
* c_parent = c_parent.parent
* # store possible text node
*/
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* c_parent = c_parent.parent
* # store possible text node
*/
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_s);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_s);
__Pyx_GIVEREF(__pyx_v_s);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_utf8_string = ((PyObject*)__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
* "All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters")
* return utf8_string
*/
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
*
* cdef object _decodeFilename(const_xmlChar* c_path):
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
*
* cdef tuple _getNsTag(tag):
*/
- __pyx_t_10 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_Raise(__pyx_t_10, 0, 0, 0);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1600; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_geturl); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_filename);
__Pyx_GIVEREF(__pyx_v_filename);
- __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_5etree_os_path_abspath, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_os_path_abspath, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L11_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_r = __pyx_t_4;
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filename);
__Pyx_GIVEREF(__pyx_v_filename);
- __pyx_t_5 = PyObject_Call(__pyx_v_4lxml_5etree_os_path_abspath, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_os_path_abspath, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 1641; __pyx_clineno = __LINE__; goto __pyx_L20_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_unknown);
__Pyx_GIVEREF(__pyx_n_u_unknown);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_unknown);
__Pyx_GIVEREF(__pyx_n_u_unknown);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_v_getName, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_getName, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_unknown);
__Pyx_GIVEREF(__pyx_n_u_unknown);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_13_BaseErrorLog_3copy)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_self->last_error);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->last_error);
__Pyx_GIVEREF(__pyx_v_self->last_error);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__BaseErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__BaseErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(((PyObject *)__pyx_v_entry));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_entry));
__Pyx_GIVEREF(((PyObject *)__pyx_v_entry));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_v_exctype, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_exctype, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_4 = 0;
__pyx_t_6 = 0;
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_v_exctype, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_exctype, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(__pyx_v_last_error);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_last_error);
__Pyx_GIVEREF(__pyx_v_last_error);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_3copy)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_self->__pyx_base.last_error);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.last_error);
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.last_error);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_log = ((struct __pyx_obj_4lxml_5etree__ListErrorLog *)__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_v_4lxml_5etree_islice, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_islice, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_entries, __pyx_t_1);
PyObject *__pyx_v_filtered = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
- int __pyx_t_4;
+ PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
Py_ssize_t __pyx_t_6;
PyObject *(*__pyx_t_7)(PyObject *);
* domains = (domains,)
* filtered = [entry for entry in self if entry.domain in domains]
*/
- __Pyx_INCREF(__pyx_v_domains);
- __pyx_t_1 = __pyx_v_domains;
- __pyx_t_2 = PyInt_Check(__pyx_t_1);
- if (!__pyx_t_2) {
- __pyx_t_3 = PyLong_Check(__pyx_t_1);
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_1 = PyInt_Check(__pyx_v_domains);
+ if (!__pyx_t_1) {
+ __pyx_t_2 = PyLong_Check(__pyx_v_domains);
+ __pyx_t_3 = __pyx_t_2;
} else {
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_3 = __pyx_t_1;
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = (__pyx_t_4 != 0);
- if (__pyx_t_2) {
+ __pyx_t_1 = (__pyx_t_3 != 0);
+ if (__pyx_t_1) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":313
* cdef _LogEntry entry
* filtered = [entry for entry in self if entry.domain in domains]
* return _ListErrorLog(filtered, None, None)
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_domains);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_domains);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_domains);
__Pyx_GIVEREF(__pyx_v_domains);
- __Pyx_DECREF_SET(__pyx_v_domains, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_domains, __pyx_t_4);
+ __pyx_t_4 = 0;
goto __pyx_L3;
}
__pyx_L3:;
* return _ListErrorLog(filtered, None, None)
*
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
if (PyList_CheckExact(((PyObject *)__pyx_v_self)) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
__pyx_t_5 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
__pyx_t_7 = NULL;
__pyx_t_8 = 0;
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->domain); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_v_domains, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_v_domains, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_4 = (__pyx_t_2 != 0);
- if (__pyx_t_4) {
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_entry))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__pyx_t_1 != 0);
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_filtered = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
+ __pyx_v_filtered = ((PyObject*)__pyx_t_4);
+ __pyx_t_4 = 0;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":315
* domains = (domains,)
* def filter_types(self, types):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_filtered);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filtered);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filtered);
__Pyx_GIVEREF(__pyx_v_filtered);
__Pyx_INCREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__Pyx_INCREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+ PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
__Pyx_GIVEREF(Py_None);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("lxml.etree._ListErrorLog.filter_domains", __pyx_clineno, __pyx_lineno, __pyx_filename);
PyObject *__pyx_v_filtered = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
- int __pyx_t_4;
+ PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
Py_ssize_t __pyx_t_6;
PyObject *(*__pyx_t_7)(PyObject *);
* types = (types,)
* filtered = [entry for entry in self if entry.type in types]
*/
- __Pyx_INCREF(__pyx_v_types);
- __pyx_t_1 = __pyx_v_types;
- __pyx_t_2 = PyInt_Check(__pyx_t_1);
- if (!__pyx_t_2) {
- __pyx_t_3 = PyLong_Check(__pyx_t_1);
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_1 = PyInt_Check(__pyx_v_types);
+ if (!__pyx_t_1) {
+ __pyx_t_2 = PyLong_Check(__pyx_v_types);
+ __pyx_t_3 = __pyx_t_2;
} else {
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_3 = __pyx_t_1;
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = (__pyx_t_4 != 0);
- if (__pyx_t_2) {
+ __pyx_t_1 = (__pyx_t_3 != 0);
+ if (__pyx_t_1) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":325
* cdef _LogEntry entry
* filtered = [entry for entry in self if entry.type in types]
* return _ListErrorLog(filtered, None, None)
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_types);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_types);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_types);
__Pyx_GIVEREF(__pyx_v_types);
- __Pyx_DECREF_SET(__pyx_v_types, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_types, __pyx_t_4);
+ __pyx_t_4 = 0;
goto __pyx_L3;
}
__pyx_L3:;
* return _ListErrorLog(filtered, None, None)
*
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
if (PyList_CheckExact(((PyObject *)__pyx_v_self)) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
__pyx_t_5 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
__pyx_t_7 = NULL;
__pyx_t_8 = 0;
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->type); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_v_types, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_v_types, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_4 = (__pyx_t_2 != 0);
- if (__pyx_t_4) {
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_entry))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__pyx_t_1 != 0);
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_filtered = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
+ __pyx_v_filtered = ((PyObject*)__pyx_t_4);
+ __pyx_t_4 = 0;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":327
* types = (types,)
* def filter_levels(self, levels):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_filtered);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filtered);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filtered);
__Pyx_GIVEREF(__pyx_v_filtered);
__Pyx_INCREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__Pyx_INCREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+ PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
__Pyx_GIVEREF(Py_None);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("lxml.etree._ListErrorLog.filter_types", __pyx_clineno, __pyx_lineno, __pyx_filename);
PyObject *__pyx_v_filtered = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
- int __pyx_t_4;
+ PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
Py_ssize_t __pyx_t_6;
PyObject *(*__pyx_t_7)(PyObject *);
* levels = (levels,)
* filtered = [entry for entry in self if entry.level in levels]
*/
- __Pyx_INCREF(__pyx_v_levels);
- __pyx_t_1 = __pyx_v_levels;
- __pyx_t_2 = PyInt_Check(__pyx_t_1);
- if (!__pyx_t_2) {
- __pyx_t_3 = PyLong_Check(__pyx_t_1);
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_1 = PyInt_Check(__pyx_v_levels);
+ if (!__pyx_t_1) {
+ __pyx_t_2 = PyLong_Check(__pyx_v_levels);
+ __pyx_t_3 = __pyx_t_2;
} else {
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_3 = __pyx_t_1;
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = (__pyx_t_4 != 0);
- if (__pyx_t_2) {
+ __pyx_t_1 = (__pyx_t_3 != 0);
+ if (__pyx_t_1) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":337
* cdef _LogEntry entry
* filtered = [entry for entry in self if entry.level in levels]
* return _ListErrorLog(filtered, None, None)
*/
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_levels);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_levels);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_levels);
__Pyx_GIVEREF(__pyx_v_levels);
- __Pyx_DECREF_SET(__pyx_v_levels, __pyx_t_1);
- __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_levels, __pyx_t_4);
+ __pyx_t_4 = 0;
goto __pyx_L3;
}
__pyx_L3:;
* return _ListErrorLog(filtered, None, None)
*
*/
- __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
if (PyList_CheckExact(((PyObject *)__pyx_v_self)) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) {
__pyx_t_5 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
__pyx_t_7 = NULL;
__pyx_t_8 = 0;
__pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->level); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_2 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_v_levels, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_t_8, __pyx_v_levels, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_4 = (__pyx_t_2 != 0);
- if (__pyx_t_4) {
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_entry))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = (__pyx_t_1 != 0);
+ if (__pyx_t_3) {
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
__pyx_L6:;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_v_filtered = ((PyObject*)__pyx_t_1);
- __pyx_t_1 = 0;
+ __pyx_v_filtered = ((PyObject*)__pyx_t_4);
+ __pyx_t_4 = 0;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlerror.pxi":339
* levels = (levels,)
* def filter_from_level(self, level):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_filtered);
- PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filtered);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_filtered);
__Pyx_GIVEREF(__pyx_v_filtered);
__Pyx_INCREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None);
__Pyx_GIVEREF(Py_None);
__Pyx_INCREF(Py_None);
- PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
+ PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None);
__Pyx_GIVEREF(Py_None);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("lxml.etree._ListErrorLog.filter_levels", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
__Pyx_GIVEREF(Py_None);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 3, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_7clear)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 418; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_9copy)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base.__pyx_base.last_error);
__Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.last_error);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__Pyx_INCREF(((PyObject *)__pyx_v_entry));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_entry));
__Pyx_GIVEREF(((PyObject *)__pyx_v_entry));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_domains);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_domains);
__Pyx_GIVEREF(__pyx_v_domains);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accepted_domains, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_entry));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_entry));
__Pyx_GIVEREF(((PyObject *)__pyx_v_entry));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_entry));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_entry));
__Pyx_GIVEREF(((PyObject *)__pyx_v_entry));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
__Pyx_GIVEREF(Py_None);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_logger_name);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_logger_name);
__Pyx_GIVEREF(__pyx_v_logger_name);
- __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF_SET(__pyx_v_logger, __pyx_t_2);
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_3copy)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
__Pyx_GIVEREF(Py_None);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ListErrorLog)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_v_self->_map_level, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->_map_level, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_v_self->_log, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_self->_log, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_log_entry));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_log_entry));
__Pyx_GIVEREF(((PyObject *)__pyx_v_log_entry));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
* return log
*
*/
- __pyx_t_9 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__RotatingErrorLog)), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__RotatingErrorLog)), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(__pyx_t_9);
__pyx_v_log = ((struct __pyx_obj_4lxml_5etree__RotatingErrorLog *)__pyx_t_9);
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_findall); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_constants);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_constants);
__Pyx_GIVEREF(__pyx_v_constants);
- __pyx_t_4 = PyObject_Call(__pyx_v_find_constants, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_find_constants, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
* @cython.final
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __Pyx_PyBool_FromLong(((int)(__pyx_v_self->_c_doc->standalone == 1))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(((__pyx_v_self->_c_doc->standalone == 1) != 0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* u"The behavior of this method will change in future versions. "
* u"Use specific 'len(elem)' or 'elem is not None' test instead.",
*/
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementChildIterator)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementChildIterator)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_reversed, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementChildIterator)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementChildIterator)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_preceding, __pyx_v_preceding) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_SiblingsIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_SiblingsIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_tags);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags);
__Pyx_GIVEREF(__pyx_v_tags);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_AncestorsIterator)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_AncestorsIterator)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inclusive, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reversed, __pyx_v_reversed) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementChildIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementChildIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_tags);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags);
__Pyx_GIVEREF(__pyx_v_tags);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(__pyx_v_tags);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags);
__Pyx_GIVEREF(__pyx_v_tags);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_3;
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_with_tail, __pyx_v_with_tail) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementTextIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ElementTextIterator)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* extensions=extensions,
* smart_strings=smart_strings)
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathElementEvaluator)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathElementEvaluator)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GIVEREF(__pyx_v__path);
__pyx_t_2 = __pyx_v__variables;
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_init_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_1 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_INCREF(__pyx_v_default);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_default);
__Pyx_GIVEREF(__pyx_v_default);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_v_4lxml_5etree__FIND_PI_ATTRIBUTES, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__FIND_PI_ATTRIBUTES, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_INCREF(__pyx_v_text_or_uri_or_element);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_text_or_uri_or_element);
__Pyx_GIVEREF(__pyx_v_text_or_uri_or_element);
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1699; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_text_or_uri_or_element, __pyx_t_4);
__Pyx_INCREF(__pyx_v_one);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_one);
__Pyx_GIVEREF(__pyx_v_one);
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_one, __pyx_t_7);
__Pyx_INCREF(__pyx_v_other);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_other);
__Pyx_GIVEREF(__pyx_v_other);
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6);
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_context_node), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_self->_context_node->_doc));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->_context_node->_doc));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_context_node->_doc));
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_DocInfo)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_DocInfo)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1828; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
* if xml_declaration:
* raise ValueError("Cannot enable XML declaration in C14N")
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*
* _tofilelikeC14N(file, self._context_node, exclusive, with_comments,
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
* # suppress decl. in default case (purely for ElementTree compatibility)
* if xml_declaration is not None:
*/
- __pyx_t_6 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_Raise(__pyx_t_6, 0, 0, 0);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
*/
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_2 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_2);
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_6 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_6);
*/
__Pyx_INCREF(__pyx_v_encoding);
__pyx_t_6 = __pyx_v_encoding;
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_kp_u_US_ASCII, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (((int)__pyx_t_5)) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_n_u_ASCII, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_4 = ((int)__pyx_t_3);
+ __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_US_ASCII, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_5) {
+ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ASCII, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_t_3;
} else {
- __pyx_t_4 = ((int)__pyx_t_5);
+ __pyx_t_4 = __pyx_t_5;
}
if (__pyx_t_4) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_n_u_UTF8, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_3 = ((int)__pyx_t_5);
+ __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_UTF8, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_t_5;
} else {
__pyx_t_3 = __pyx_t_4;
}
if (__pyx_t_3) {
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_kp_u_UTF_8, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = ((int)__pyx_t_4);
+ __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_UTF_8, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __pyx_t_4;
} else {
__pyx_t_5 = __pyx_t_3;
}
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_root = __pyx_t_2;
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PySequence_Tuple(__pyx_v_tags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_root = __pyx_t_2;
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_2 = PySequence_Tuple(__pyx_v_tags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_root = __pyx_t_3;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_root = __pyx_t_3;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_root = __pyx_t_3;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2057; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_root = __pyx_t_3;
__Pyx_INCREF(__pyx_v_namespaces);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_namespaces);
__Pyx_GIVEREF(__pyx_v_namespaces);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
* extensions=extensions,
* smart_strings=smart_strings)
*/
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator)), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator)), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_v__path);
__pyx_t_3 = __pyx_v__variables;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* access_control=access_control)
* return style(self, **_kw)
*/
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XSLT)), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XSLT)), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__pyx_t_3 = __pyx_v__kw;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_style), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_style), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_relaxng);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_relaxng);
__Pyx_GIVEREF(__pyx_v_relaxng);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_RelaxNG)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_RelaxNG)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_schema = ((struct __pyx_obj_4lxml_5etree_RelaxNG *)__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_xmlschema);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xmlschema);
__Pyx_GIVEREF(__pyx_v_xmlschema);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLSchema)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLSchema)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*
* def write_c14n(self, file, *, exclusive=False, with_comments=True,
*/
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XInclude)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XInclude)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self->_context_node));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->_context_node));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_context_node));
- __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* if context_node is None and doc is not None:
* context_node = doc.getroot()
*/
- __pyx_t_1 = PyObject_Call(__pyx_v_baseclass, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_baseclass, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__ElementTree))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_result = ((struct LxmlElementTree *)__pyx_t_1);
* sequence_or_dict = sequence_or_dict.items()
* for key, value in sequence_or_dict:
*/
- __Pyx_INCREF(__pyx_v_sequence_or_dict);
- __pyx_t_1 = __pyx_v_sequence_or_dict;
- __pyx_t_3 = PyDict_Check(__pyx_t_1);
+ __pyx_t_3 = PyDict_Check(__pyx_v_sequence_or_dict);
if (!__pyx_t_3) {
- __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_1, ((PyObject*)__pyx_ptype_4lxml_5etree__Attrib));
+ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_sequence_or_dict, ((PyObject*)__pyx_ptype_4lxml_5etree__Attrib));
__pyx_t_5 = __pyx_t_4;
} else {
__pyx_t_5 = __pyx_t_3;
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (__pyx_t_5 != 0);
if (__pyx_t_3) {
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sequence_or_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF_SET(__pyx_v_sequence_or_dict, __pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_1;
__Pyx_INCREF(__pyx_v_one);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_one);
__Pyx_GIVEREF(__pyx_v_one);
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2334; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF_SET(__pyx_v_one, __pyx_t_7);
__Pyx_INCREF(__pyx_v_other);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_other);
__Pyx_GIVEREF(__pyx_v_other);
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2336; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6);
* attribs._node = element
* attribs._c_attr = element._c_node.properties
*/
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__AttribIterator)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__AttribIterator)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_attribs = ((struct __pyx_obj_4lxml_5etree__AttribIterator *)__pyx_t_2);
__pyx_t_2 = 0;
int __pyx_t_2;
int __pyx_t_3;
int __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
- int __pyx_t_6;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
Py_ssize_t __pyx_t_8;
PyObject *(*__pyx_t_9)(PyObject *);
*/
__Pyx_INCREF(__pyx_v_tag);
__pyx_t_1 = __pyx_v_tag;
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s__34, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (!((int)__pyx_t_3)) {
- __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_kp_s__35, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_6 = ((int)__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__34, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!__pyx_t_3) {
+ __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__35, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __pyx_t_2;
} else {
- __pyx_t_6 = ((int)__pyx_t_3);
+ __pyx_t_5 = __pyx_t_3;
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_3 = (__pyx_t_6 != 0);
+ __pyx_t_3 = (__pyx_t_5 != 0);
if (__pyx_t_3) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2525
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
__pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
- __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
__Pyx_INCREF(__pyx_t_7);
#else
- __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
#endif
} else {
__Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_v_href = __pyx_t_5;
- __pyx_t_5 = 0;
+ __pyx_v_href = __pyx_t_6;
+ __pyx_t_6 = 0;
__pyx_v_name = __pyx_t_7;
__pyx_t_7 = 0;
* elif href == b'*':
*/
__pyx_t_3 = (__pyx_v_href == Py_None);
- __pyx_t_6 = (__pyx_t_3 != 0);
- if (__pyx_t_6) {
+ __pyx_t_5 = (__pyx_t_3 != 0);
+ if (__pyx_t_5) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2531
* name = None
* href = None # wildcard: any namespace, including none
* self._py_tags.append((href, name))
*/
- __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_href, __pyx_kp_b__34, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__pyx_t_6) {
+ __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_v_href, __pyx_kp_b__34, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_5) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2533
* href = b'' # no namespace
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("lxml.etree._MultiTagMatcher._storeTags", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__Pyx_INCREF(__pyx_v_tags);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tags);
__Pyx_GIVEREF(__pyx_v_tags);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2601; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_tag);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tag);
__Pyx_GIVEREF(__pyx_v_tag);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2697; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_4);
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_events, __pyx_v_events) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tag, __pyx_v_tag) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_iterwalk)), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_iterwalk)), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* if event == u"start":
* result = element.text
*/
- __pyx_t_3 = PyObject_Call(__pyx_v_self->_nextEvent, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->_nextEvent, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
PyObject* sequence = __pyx_t_3;
PyObject *__pyx_v_data = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
- PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
- int __pyx_t_4;
+ PyObject *__pyx_t_4 = NULL;
Py_ssize_t __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
PyObject *__pyx_t_7 = NULL;
* raise ValueError("passing a single string into fromstringlist() is not"
* " efficient, use fromstring() instead")
*/
- __Pyx_INCREF(__pyx_v_strings);
- __pyx_t_1 = __pyx_v_strings;
- __pyx_t_2 = PyBytes_Check(__pyx_t_1);
- if (!__pyx_t_2) {
- __pyx_t_3 = PyUnicode_Check(__pyx_t_1);
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_1 = PyBytes_Check(__pyx_v_strings);
+ if (!__pyx_t_1) {
+ __pyx_t_2 = PyUnicode_Check(__pyx_v_strings);
+ __pyx_t_3 = __pyx_t_2;
} else {
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_3 = __pyx_t_1;
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_2 = (__pyx_t_4 != 0);
- if (__pyx_t_2) {
+ __pyx_t_1 = (__pyx_t_3 != 0);
+ if (__pyx_t_1) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3019
* cdef _Document doc
* " efficient, use fromstring() instead")
* if parser is None:
*/
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_Raise(__pyx_t_1, 0, 0, 0);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 3019; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser()
* feed = parser.feed
*/
- __pyx_t_2 = (((PyObject *)__pyx_v_parser) == Py_None);
- __pyx_t_4 = (__pyx_t_2 != 0);
- if (__pyx_t_4) {
+ __pyx_t_1 = (((PyObject *)__pyx_v_parser) == Py_None);
+ __pyx_t_3 = (__pyx_t_1 != 0);
+ if (__pyx_t_3) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3022
* " efficient, use fromstring() instead")
* feed = parser.feed
* for data in strings:
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1));
- __pyx_t_1 = 0;
+ __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3022; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_4));
+ __pyx_t_4 = 0;
goto __pyx_L4;
}
__pyx_L4:;
* for data in strings:
* feed(data)
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_feed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_v_feed = __pyx_t_1;
- __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_feed); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_v_feed = __pyx_t_4;
+ __pyx_t_4 = 0;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3024
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser()
* return parser.close()
*/
if (PyList_CheckExact(__pyx_v_strings) || PyTuple_CheckExact(__pyx_v_strings)) {
- __pyx_t_1 = __pyx_v_strings; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
+ __pyx_t_4 = __pyx_v_strings; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
__pyx_t_6 = NULL;
} else {
- __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_strings); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_strings); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
}
for (;;) {
- if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_1)) {
- if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_4)) {
+ if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_7 = __pyx_t_6(__pyx_t_1);
+ __pyx_t_7 = __pyx_t_6(__pyx_t_4);
if (unlikely(!__pyx_t_7)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_8 = PyObject_Call(__pyx_v_feed, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_feed, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3025; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3026
* for data in strings:
* def iselement(element):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_8 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_close); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L0;
/* function exit code */
__pyx_L1_error:;
- __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("lxml.etree.fromstringlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
* encoding=u'unicode' if python.IS_PYTHON3 else None)
* if not pretty_print:
*/
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_xml);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_xml);
__Pyx_GIVEREF(__pyx_v_xml);
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* if xml_declaration:
* raise ValueError("Cannot enable XML declaration in C14N")
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes)
* if not with_comments:
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* if encoding is _unicode or (encoding is not None and encoding.upper() == 'UNICODE'):
* if xml_declaration:
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_1) {
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_UNICODE, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_n_u_ASCII, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (((int)__pyx_t_1)) {
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_u_UTF_8, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_5 = ((int)__pyx_t_6);
+ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_ASCII, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_1) {
+ __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_UTF_8, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __pyx_t_6;
} else {
- __pyx_t_5 = ((int)__pyx_t_1);
+ __pyx_t_5 = __pyx_t_1;
}
if (__pyx_t_5) {
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_n_u_UTF8, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_6 = ((int)__pyx_t_1);
+ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_UTF8, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __pyx_t_1;
} else {
__pyx_t_6 = __pyx_t_5;
}
if (__pyx_t_6) {
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_kp_u_US_ASCII, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_1 = ((int)__pyx_t_5);
+ __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_US_ASCII, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_t_5;
} else {
__pyx_t_1 = __pyx_t_6;
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = __pyx_v_kwargs;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* return 0
*
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ReferenceError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ReferenceError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_4 = PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_13__copy__)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_14_ReadOnlyProxy_19getchildren)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_INCREF(__pyx_n_s_NAMESPACE);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_NAMESPACE);
__Pyx_GIVEREF(__pyx_n_s_NAMESPACE);
- __pyx_t_5 = PyObject_Call(__pyx_v__getattr, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v__getattr, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_INCREF(__pyx_n_s_TAG);
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_TAG);
__Pyx_GIVEREF(__pyx_n_s_TAG);
- __pyx_t_5 = PyObject_Call(__pyx_v__getattr, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v__getattr, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_7 = __pyx_f_4lxml_5etree__getNsTag(__pyx_t_5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
__Pyx_INCREF(__pyx_n_s_class);
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_class);
__Pyx_GIVEREF(__pyx_n_s_class);
- __pyx_t_11 = PyObject_Call(__pyx_v__getattr, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v__getattr, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_n_s_name);
__Pyx_GIVEREF(__pyx_n_s_name);
__pyx_t_11 = 0;
- __pyx_t_11 = PyObject_Call(__pyx_v__getattr, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v__getattr, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = __pyx_f_4lxml_5etree__utf8(__pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
*/
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_tag, __pyx_n_s_split); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_11 = PyObject_Call(__pyx_t_10, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;};
__Pyx_INCREF(__pyx_n_s_PARSER);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_PARSER);
__Pyx_GIVEREF(__pyx_n_s_PARSER);
- __pyx_t_1 = PyObject_Call(__pyx_v__getattr, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v__getattr, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__BaseParser))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L25_error;}
__Pyx_INCREF(__pyx_n_s_HTML);
PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_HTML);
__Pyx_GIVEREF(__pyx_n_s_HTML);
- __pyx_t_5 = PyObject_Call(__pyx_v__getattr, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L40_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v__getattr, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L40_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L40_error;}
* _appendChild(self, last_child)
* else:
*/
- __pyx_t_7 = PyObject_Call(__pyx_v_child, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_v_child, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_4lxml_5etree__Element))))) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF_SET(__pyx_v_last_child, ((struct LxmlElement *)__pyx_t_7));
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
* return 0
*
*/
+ if (unlikely(!__pyx_v_expected)) { __Pyx_RaiseUnboundLocalError("expected"); {__pyx_filename = __pyx_f[9]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_expected))));
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_INCREF(__pyx_v_class_mapping);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_class_mapping);
__Pyx_GIVEREF(__pyx_v_class_mapping);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_fallback));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_fallback));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fallback));
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_INCREF(__pyx_v_name);
PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_name);
__Pyx_GIVEREF(__pyx_v_name);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_proxy));
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_proxy));
__Pyx_GIVEREF(((PyObject *)__pyx_v_proxy));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_class_dict_iterable, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_class_dict_iterable, __pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__Pyx_INCREF(((PyObject *)__pyx_v_fallback));
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_fallback));
__Pyx_GIVEREF(((PyObject *)__pyx_v_fallback));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_ns_uri);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_ns_uri);
__Pyx_GIVEREF(__pyx_v_ns_uri);
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ClassNamespaceRegistry)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ClassNamespaceRegistry)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_INCREF(__pyx_t_10);
__Pyx_INCREF(__pyx_v_ns_uri);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_ns_uri);
__Pyx_GIVEREF(__pyx_v_ns_uri);
- __pyx_t_10 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_INCREF(__pyx_t_10);
* doc_ref._type = PARSER_DATA_EMPTY
* return doc_ref
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_1);
__pyx_t_1 = 0;
* doc_ref._type = PARSER_DATA_STRING
* doc_ref._data_bytes = string
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_3);
__pyx_t_3 = 0;
* doc_ref._type = PARSER_DATA_FILENAME
* doc_ref._filename = _encodeFilename(filename)
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_1);
__pyx_t_1 = 0;
* doc_ref._type = PARSER_DATA_FILE
* if base_url is not None:
*/
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__InputDocument)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_7);
__pyx_t_7 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_resolver));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_resolver));
__Pyx_GIVEREF(((PyObject *)__pyx_v_resolver));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_resolver);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_resolver);
__Pyx_GIVEREF(__pyx_v_resolver);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self->_default_resolver));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_default_resolver));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_default_resolver));
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ResolverRegistry)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ResolverRegistry)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_registry = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_2);
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_resolvers, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_context);
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_context);
__Pyx_GIVEREF(__pyx_v_context);
- __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_INCREF(__pyx_v_context);
PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_context);
__Pyx_GIVEREF(__pyx_v_context);
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
* else:
* context._resolvers = resolvers
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ResolverRegistry)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ResolverRegistry)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_v_context->_resolvers);
* context._resolvers = resolvers
* context._storage = _TempStore() # <<<<<<<<<<<<<<
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__TempStore)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__TempStore)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_v_context->_storage);
__Pyx_INCREF(__pyx_v_self);
PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
__Pyx_GIVEREF(__pyx_v_self);
- __pyx_t_3 = PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
- __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
- __pyx_t_2 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* d[u"_ParserDictionaryContext"] = context
* return context
*/
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParserDictionaryContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParserDictionaryContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_2);
__pyx_t_2 = 0;
* cdef void initParserDict(self, xmlparser.xmlParserCtxt* pctxt):
* u"Assure we always use the same string dictionary."
* self.initThreadDictRef(&pctxt.dict) # <<<<<<<<<<<<<<
+ * pctxt.dictNames = 1
*
- * cdef void initXPathParserDict(self, xpath.xmlXPathContext* pctxt):
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(__pyx_v_self, (&__pyx_v_pctxt->dict));
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":137
+ * u"Assure we always use the same string dictionary."
+ * self.initThreadDictRef(&pctxt.dict)
+ * pctxt.dictNames = 1 # <<<<<<<<<<<<<<
+ *
+ * cdef void initXPathParserDict(self, xpath.xmlXPathContext* pctxt):
+ */
+ __pyx_v_pctxt->dictNames = 1;
+
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":134
* xmlparser.xmlDictReference(c_thread_dict)
*
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":138
- * self.initThreadDictRef(&pctxt.dict)
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":139
+ * pctxt.dictNames = 1
*
* cdef void initXPathParserDict(self, xpath.xmlXPathContext* pctxt): # <<<<<<<<<<<<<<
* u"Assure we always use the same string dictionary."
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("initXPathParserDict", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":140
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":141
* cdef void initXPathParserDict(self, xpath.xmlXPathContext* pctxt):
* u"Assure we always use the same string dictionary."
* self.initThreadDictRef(&pctxt.dict) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(__pyx_v_self, (&__pyx_v_pctxt->dict));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":138
- * self.initThreadDictRef(&pctxt.dict)
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":139
+ * pctxt.dictNames = 1
*
* cdef void initXPathParserDict(self, xpath.xmlXPathContext* pctxt): # <<<<<<<<<<<<<<
* u"Assure we always use the same string dictionary."
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":142
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":143
* self.initThreadDictRef(&pctxt.dict)
*
* cdef void initDocDict(self, xmlDoc* result): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("initDocDict", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":147
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":148
* # This case should only occur for new documents with empty dicts,
* # otherwise we'd free data that's in use => segfault
* self.initThreadDictRef(&result.dict) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef(__pyx_v_self, (&__pyx_v_result->dict));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":142
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":143
* self.initThreadDictRef(&pctxt.dict)
*
* cdef void initDocDict(self, xmlDoc* result): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":149
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":150
* self.initThreadDictRef(&result.dict)
*
* cdef _ParserContext findImpliedContext(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("findImpliedContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":159
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":160
*
* # see if we have a current implied parser
* context = self._findThreadParserContext() # <<<<<<<<<<<<<<
* if context._implied_parser_contexts:
* implied_context = context._implied_parser_contexts[-1]
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":160
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":161
* # see if we have a current implied parser
* context = self._findThreadParserContext()
* if context._implied_parser_contexts: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_context->_implied_parser_contexts != Py_None) && (PyList_GET_SIZE(__pyx_v_context->_implied_parser_contexts) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":161
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":162
* context = self._findThreadParserContext()
* if context._implied_parser_contexts:
* implied_context = context._implied_parser_contexts[-1] # <<<<<<<<<<<<<<
*/
if (unlikely(__pyx_v_context->_implied_parser_contexts == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_context->_implied_parser_contexts, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_context->_implied_parser_contexts, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__ParserContext))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__ParserContext))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_implied_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":162
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":163
* if context._implied_parser_contexts:
* implied_context = context._implied_parser_contexts[-1]
* return implied_context # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":163
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":164
* implied_context = context._implied_parser_contexts[-1]
* return implied_context
* return None # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None);
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":149
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":150
* self.initThreadDictRef(&result.dict)
*
* cdef _ParserContext findImpliedContext(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":165
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":166
* return None
*
* cdef void pushImpliedContextFromParser(self, _BaseParser parser): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("pushImpliedContextFromParser", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":167
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":168
* cdef void pushImpliedContextFromParser(self, _BaseParser parser):
* u"Push a new implied context object taken from the parser."
* if parser is not None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":168
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":169
* u"Push a new implied context object taken from the parser."
* if parser is not None:
* self.pushImpliedContext(parser._getParserContext()) # <<<<<<<<<<<<<<
* else:
* self.pushImpliedContext(None)
*/
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_parser->__pyx_vtab)->_getParserContext(__pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_parser->__pyx_vtab)->_getParserContext(__pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext(__pyx_v_self, ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_3));
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":170
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":171
* self.pushImpliedContext(parser._getParserContext())
* else:
* self.pushImpliedContext(None) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":165
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":166
* return None
*
* cdef void pushImpliedContextFromParser(self, _BaseParser parser): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":172
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":173
* self.pushImpliedContext(None)
*
* cdef void pushImpliedContext(self, _ParserContext parser_context): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("pushImpliedContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":175
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":176
* u"Push a new implied context object."
* cdef _ParserDictionaryContext context
* context = self._findThreadParserContext() # <<<<<<<<<<<<<<
* context._implied_parser_contexts.append(parser_context)
*
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":176
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":177
* cdef _ParserDictionaryContext context
* context = self._findThreadParserContext()
* context._implied_parser_contexts.append(parser_context) # <<<<<<<<<<<<<<
*/
if (unlikely(__pyx_v_context->_implied_parser_contexts == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append");
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_context->_implied_parser_contexts, ((PyObject *)__pyx_v_parser_context)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_context->_implied_parser_contexts, ((PyObject *)__pyx_v_parser_context)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":172
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":173
* self.pushImpliedContext(None)
*
* cdef void pushImpliedContext(self, _ParserContext parser_context): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":178
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":179
* context._implied_parser_contexts.append(parser_context)
*
* cdef void popImpliedContext(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("popImpliedContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":181
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":182
* u"Pop the current implied context object."
* cdef _ParserDictionaryContext context
* context = self._findThreadParserContext() # <<<<<<<<<<<<<<
* context._implied_parser_contexts.pop()
*
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":182
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":183
* cdef _ParserDictionaryContext context
* context = self._findThreadParserContext()
* context._implied_parser_contexts.pop() # <<<<<<<<<<<<<<
*/
if (unlikely(__pyx_v_context->_implied_parser_contexts == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "pop");
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_context->_implied_parser_contexts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_context->_implied_parser_contexts); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":178
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":179
* context._implied_parser_contexts.append(parser_context)
*
* cdef void popImpliedContext(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":195
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":196
* cdef const_char* _UNICODE_ENCODING = NULL
*
* cdef int _setupPythonUnicode() except -1: # <<<<<<<<<<<<<<
int __pyx_t_6;
__Pyx_RefNannySetupContext("_setupPythonUnicode", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":204
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":205
* cdef Py_ssize_t l
* cdef const_char* enc
* cdef Py_UNICODE *uchars = [c'<', c't', c'e', c's', c't', c'/', c'>'] # <<<<<<<<<<<<<<
__pyx_t_1[6] = '>';
__pyx_v_uchars = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":205
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":206
* cdef const_char* enc
* cdef Py_UNICODE *uchars = [c'<', c't', c'e', c's', c't', c'/', c'>']
* cdef const_xmlChar* buffer = <const_xmlChar*>uchars # <<<<<<<<<<<<<<
*/
__pyx_v_buffer = ((const xmlChar *)__pyx_v_uchars);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":207
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":208
* cdef const_xmlChar* buffer = <const_xmlChar*>uchars
* # apparently, libxml2 can't detect UTF-16 on some systems
* if (buffer[0] == c'<' and buffer[1] == c'\0' and # <<<<<<<<<<<<<<
__pyx_t_3 = (((__pyx_v_buffer[1]) == '\x00') != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":208
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":209
* # apparently, libxml2 can't detect UTF-16 on some systems
* if (buffer[0] == c'<' and buffer[1] == c'\0' and
* buffer[2] == c't' and buffer[3] == c'\0'): # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":209
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":210
* if (buffer[0] == c'<' and buffer[1] == c'\0' and
* buffer[2] == c't' and buffer[3] == c'\0'):
* enc = "UTF-16LE" # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":210
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":211
* buffer[2] == c't' and buffer[3] == c'\0'):
* enc = "UTF-16LE"
* elif (buffer[0] == c'\0' and buffer[1] == c'<' and # <<<<<<<<<<<<<<
__pyx_t_2 = (((__pyx_v_buffer[1]) == '<') != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":211
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":212
* enc = "UTF-16LE"
* elif (buffer[0] == c'\0' and buffer[1] == c'<' and
* buffer[2] == c'\0' and buffer[3] == c't'): # <<<<<<<<<<<<<<
}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":212
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":213
* elif (buffer[0] == c'\0' and buffer[1] == c'<' and
* buffer[2] == c'\0' and buffer[3] == c't'):
* enc = "UTF-16BE" # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":215
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":216
* else:
* # let libxml2 give it a try
* enc = _findEncodingName(buffer, sizeof(Py_UNICODE) * 7) # <<<<<<<<<<<<<<
*/
__pyx_v_enc = __pyx_f_4lxml_5etree__findEncodingName(__pyx_v_buffer, ((sizeof(Py_UNICODE)) * 7));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":216
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":217
* # let libxml2 give it a try
* enc = _findEncodingName(buffer, sizeof(Py_UNICODE) * 7)
* if enc is NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_enc == NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":218
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":219
* if enc is NULL:
* # not my fault, it's YOUR broken system :)
* return 0 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":219
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":220
* # not my fault, it's YOUR broken system :)
* return 0
* enchandler = tree.xmlFindCharEncodingHandler(enc) # <<<<<<<<<<<<<<
*/
__pyx_v_enchandler = xmlFindCharEncodingHandler(__pyx_v_enc);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":220
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":221
* return 0
* enchandler = tree.xmlFindCharEncodingHandler(enc)
* if enchandler is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_enchandler != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":222
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":223
* if enchandler is not NULL:
* global _UNICODE_ENCODING
* tree.xmlCharEncCloseFunc(enchandler) # <<<<<<<<<<<<<<
*/
xmlCharEncCloseFunc(__pyx_v_enchandler);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":223
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":224
* global _UNICODE_ENCODING
* tree.xmlCharEncCloseFunc(enchandler)
* _UNICODE_ENCODING = enc # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":224
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":225
* tree.xmlCharEncCloseFunc(enchandler)
* _UNICODE_ENCODING = enc
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":195
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":196
* cdef const_char* _UNICODE_ENCODING = NULL
*
* cdef int _setupPythonUnicode() except -1: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":226
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":227
* return 0
*
* cdef const_char* _findEncodingName(const_xmlChar* buffer, int size): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_findEncodingName", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":229
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":230
* u"Work around bug in libxml2: find iconv name of encoding on our own."
* cdef tree.xmlCharEncoding enc
* enc = tree.xmlDetectCharEncoding(buffer, size) # <<<<<<<<<<<<<<
*/
__pyx_v_enc = xmlDetectCharEncoding(__pyx_v_buffer, __pyx_v_size);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":238
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":239
* elif enc == tree.XML_CHAR_ENCODING_UCS4BE:
* return "UCS-4BE"
* elif enc == tree.XML_CHAR_ENCODING_NONE: # <<<<<<<<<<<<<<
*/
switch (__pyx_v_enc) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":230
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":231
* cdef tree.xmlCharEncoding enc
* enc = tree.xmlDetectCharEncoding(buffer, size)
* if enc == tree.XML_CHAR_ENCODING_UTF16LE: # <<<<<<<<<<<<<<
*/
case XML_CHAR_ENCODING_UTF16LE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":231
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":232
* enc = tree.xmlDetectCharEncoding(buffer, size)
* if enc == tree.XML_CHAR_ENCODING_UTF16LE:
* return "UTF-16LE" # <<<<<<<<<<<<<<
goto __pyx_L0;
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":232
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":233
* if enc == tree.XML_CHAR_ENCODING_UTF16LE:
* return "UTF-16LE"
* elif enc == tree.XML_CHAR_ENCODING_UTF16BE: # <<<<<<<<<<<<<<
*/
case XML_CHAR_ENCODING_UTF16BE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":233
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":234
* return "UTF-16LE"
* elif enc == tree.XML_CHAR_ENCODING_UTF16BE:
* return "UTF-16BE" # <<<<<<<<<<<<<<
goto __pyx_L0;
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":234
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":235
* elif enc == tree.XML_CHAR_ENCODING_UTF16BE:
* return "UTF-16BE"
* elif enc == tree.XML_CHAR_ENCODING_UCS4LE: # <<<<<<<<<<<<<<
*/
case XML_CHAR_ENCODING_UCS4LE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":235
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":236
* return "UTF-16BE"
* elif enc == tree.XML_CHAR_ENCODING_UCS4LE:
* return "UCS-4LE" # <<<<<<<<<<<<<<
goto __pyx_L0;
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":236
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":237
* elif enc == tree.XML_CHAR_ENCODING_UCS4LE:
* return "UCS-4LE"
* elif enc == tree.XML_CHAR_ENCODING_UCS4BE: # <<<<<<<<<<<<<<
*/
case XML_CHAR_ENCODING_UCS4BE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":237
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":238
* return "UCS-4LE"
* elif enc == tree.XML_CHAR_ENCODING_UCS4BE:
* return "UCS-4BE" # <<<<<<<<<<<<<<
goto __pyx_L0;
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":238
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":239
* elif enc == tree.XML_CHAR_ENCODING_UCS4BE:
* return "UCS-4BE"
* elif enc == tree.XML_CHAR_ENCODING_NONE: # <<<<<<<<<<<<<<
*/
case XML_CHAR_ENCODING_NONE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":239
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":240
* return "UCS-4BE"
* elif enc == tree.XML_CHAR_ENCODING_NONE:
* return NULL # <<<<<<<<<<<<<<
break;
default:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":242
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":243
* else:
* # returns a constant char*, no need to free it
* return tree.xmlGetCharEncodingName(enc) # <<<<<<<<<<<<<<
break;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":226
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":227
* return 0
*
* cdef const_char* _findEncodingName(const_xmlChar* buffer, int size): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":262
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":263
* cdef bint _close_file_after_read
*
* def __cinit__(self, filelike, exc_context not None, url, encoding=None, bint close_file=False): # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exc_context)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_url)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (kw_args > 0) {
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
__pyx_v_url = values[2];
__pyx_v_encoding = values[3];
if (values[4]) {
- __pyx_v_close_file = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_close_file == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_close_file = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_close_file == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_close_file = ((int)0);
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree._FileReaderContext.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
if (unlikely(((PyObject *)__pyx_v_exc_context) == Py_None)) {
- PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "exc_context"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "exc_context"); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_r = __pyx_pf_4lxml_5etree_18_FileReaderContext___cinit__(((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_v_self), __pyx_v_filelike, __pyx_v_exc_context, __pyx_v_url, __pyx_v_encoding, __pyx_v_close_file);
__Pyx_RefNannySetupContext("__cinit__", 0);
__Pyx_INCREF(__pyx_v_url);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":263
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":264
*
* def __cinit__(self, filelike, exc_context not None, url, encoding=None, bint close_file=False):
* self._exc_context = exc_context # <<<<<<<<<<<<<<
* self._filelike = filelike
* self._close_file_after_read = close_file
*/
- if (!(likely(__Pyx_TypeTest(__pyx_v_exc_context, __pyx_ptype_4lxml_5etree__ExceptionContext)))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(__Pyx_TypeTest(__pyx_v_exc_context, __pyx_ptype_4lxml_5etree__ExceptionContext)))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = __pyx_v_exc_context;
__Pyx_INCREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_v_self->_exc_context = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":264
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":265
* def __cinit__(self, filelike, exc_context not None, url, encoding=None, bint close_file=False):
* self._exc_context = exc_context
* self._filelike = filelike # <<<<<<<<<<<<<<
__Pyx_DECREF(__pyx_v_self->_filelike);
__pyx_v_self->_filelike = __pyx_v_filelike;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":265
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":266
* self._exc_context = exc_context
* self._filelike = filelike
* self._close_file_after_read = close_file # <<<<<<<<<<<<<<
*/
__pyx_v_self->_close_file_after_read = __pyx_v_close_file;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":266
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":267
* self._filelike = filelike
* self._close_file_after_read = close_file
* self._encoding = encoding # <<<<<<<<<<<<<<
__Pyx_DECREF(__pyx_v_self->_encoding);
__pyx_v_self->_encoding = __pyx_v_encoding;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":267
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":268
* self._close_file_after_read = close_file
* self._encoding = encoding
* if url is None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":268
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":269
* self._encoding = encoding
* if url is None:
* self._c_url = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":270
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":271
* self._c_url = NULL
* else:
* url = _encodeFilename(url) # <<<<<<<<<<<<<<
* self._c_url = _cstr(url)
* self._url = url
*/
- __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF_SET(__pyx_v_url, __pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":271
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":272
* else:
* url = _encodeFilename(url)
* self._c_url = _cstr(url) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":272
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":273
* url = _encodeFilename(url)
* self._c_url = _cstr(url)
* self._url = url # <<<<<<<<<<<<<<
__Pyx_DECREF(__pyx_v_self->_url);
__pyx_v_self->_url = __pyx_v_url;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":273
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":274
* self._c_url = _cstr(url)
* self._url = url
* self._bytes = b'' # <<<<<<<<<<<<<<
__Pyx_DECREF(__pyx_v_self->_bytes);
__pyx_v_self->_bytes = __pyx_kp_b__15;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":274
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":275
* self._url = url
* self._bytes = b''
* self._bytes_read = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_self->_bytes_read = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":262
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":263
* cdef bint _close_file_after_read
*
* def __cinit__(self, filelike, exc_context not None, url, encoding=None, bint close_file=False): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":276
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":277
* self._bytes_read = 0
*
* cdef _close_file(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_close_file", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":277
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":278
*
* cdef _close_file(self):
* if self._filelike is None or not self._close_file_after_read: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":278
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":279
* cdef _close_file(self):
* if self._filelike is None or not self._close_file_after_read:
* return # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":279
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":280
* if self._filelike is None or not self._close_file_after_read:
* return
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_6);
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":280
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":281
* return
* try:
* close = self._filelike.close # <<<<<<<<<<<<<<
* except AttributeError:
* close = None
*/
- __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_filelike, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_filelike, __pyx_n_s_close); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_7);
__pyx_v_close = __pyx_t_7;
__pyx_t_7 = 0;
__pyx_L7_error:;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":281
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":282
* try:
* close = self._filelike.close
* except AttributeError: # <<<<<<<<<<<<<<
__pyx_t_8 = PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
if (__pyx_t_8) {
__Pyx_AddTraceback("lxml.etree._FileReaderContext._close_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_9, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_9);
__Pyx_GOTREF(__pyx_t_10);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":282
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":283
* close = self._filelike.close
* except AttributeError:
* close = None # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":284
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":285
* close = None
* finally:
* self._filelike = None # <<<<<<<<<<<<<<
__pyx_L6:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":285
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":286
* finally:
* self._filelike = None
* if close is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_3 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":286
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":287
* self._filelike = None
* if close is not None:
* close() # <<<<<<<<<<<<<<
*
* cdef xmlparser.xmlParserInputBuffer* _createParserInputBuffer(self):
*/
- __pyx_t_10 = PyObject_Call(__pyx_v_close, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_v_close, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
goto __pyx_L19;
}
__pyx_L19:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":276
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":277
* self._bytes_read = 0
*
* cdef _close_file(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":288
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":289
* close()
*
* cdef xmlparser.xmlParserInputBuffer* _createParserInputBuffer(self): # <<<<<<<<<<<<<<
int __pyx_t_2;
__Pyx_RefNannySetupContext("_createParserInputBuffer", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":291
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":292
* cdef stdio.FILE* c_stream
* cdef xmlparser.xmlParserInputBuffer* c_buffer
* c_buffer = xmlparser.xmlAllocParserInputBuffer(0) # <<<<<<<<<<<<<<
*/
__pyx_v_c_buffer = xmlAllocParserInputBuffer(0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":292
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":293
* cdef xmlparser.xmlParserInputBuffer* c_buffer
* c_buffer = xmlparser.xmlAllocParserInputBuffer(0)
* c_stream = python.PyFile_AsFile(self._filelike) # <<<<<<<<<<<<<<
__pyx_v_c_stream = PyFile_AsFile(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":293
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":294
* c_buffer = xmlparser.xmlAllocParserInputBuffer(0)
* c_stream = python.PyFile_AsFile(self._filelike)
* if c_stream is NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_stream == NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":294
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":295
* c_stream = python.PyFile_AsFile(self._filelike)
* if c_stream is NULL:
* c_buffer.readcallback = _readFilelikeParser # <<<<<<<<<<<<<<
*/
__pyx_v_c_buffer->readcallback = __pyx_f_4lxml_5etree__readFilelikeParser;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":295
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":296
* if c_stream is NULL:
* c_buffer.readcallback = _readFilelikeParser
* c_buffer.context = <python.PyObject*>self # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":297
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":298
* c_buffer.context = <python.PyObject*>self
* else:
* c_buffer.readcallback = _readFileParser # <<<<<<<<<<<<<<
*/
__pyx_v_c_buffer->readcallback = __pyx_f_4lxml_5etree__readFileParser;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":298
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":299
* else:
* c_buffer.readcallback = _readFileParser
* c_buffer.context = c_stream # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":299
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":300
* c_buffer.readcallback = _readFileParser
* c_buffer.context = c_stream
* return c_buffer # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_c_buffer;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":288
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":289
* close()
*
* cdef xmlparser.xmlParserInputBuffer* _createParserInputBuffer(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":301
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":302
* return c_buffer
*
* cdef xmlparser.xmlParserInput* _createParserInput( # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_createParserInput", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":304
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":305
* self, xmlparser.xmlParserCtxt* ctxt):
* cdef xmlparser.xmlParserInputBuffer* c_buffer
* c_buffer = self._createParserInputBuffer() # <<<<<<<<<<<<<<
*/
__pyx_v_c_buffer = __pyx_f_4lxml_5etree_18_FileReaderContext__createParserInputBuffer(__pyx_v_self);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":305
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":306
* cdef xmlparser.xmlParserInputBuffer* c_buffer
* c_buffer = self._createParserInputBuffer()
* return xmlparser.xmlNewIOInputStream(ctxt, c_buffer, 0) # <<<<<<<<<<<<<<
__pyx_r = xmlNewIOInputStream(__pyx_v_ctxt, __pyx_v_c_buffer, 0);
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":301
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":302
* return c_buffer
*
* cdef xmlparser.xmlParserInput* _createParserInput( # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":307
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":308
* return xmlparser.xmlNewIOInputStream(ctxt, c_buffer, 0)
*
* cdef tree.xmlDtd* _readDtd(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_readDtd", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":309
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":310
* cdef tree.xmlDtd* _readDtd(self):
* cdef xmlparser.xmlParserInputBuffer* c_buffer
* c_buffer = self._createParserInputBuffer() # <<<<<<<<<<<<<<
*/
__pyx_v_c_buffer = __pyx_f_4lxml_5etree_18_FileReaderContext__createParserInputBuffer(__pyx_v_self);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":310
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":311
* cdef xmlparser.xmlParserInputBuffer* c_buffer
* c_buffer = self._createParserInputBuffer()
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":311
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":312
* c_buffer = self._createParserInputBuffer()
* with nogil:
* return xmlparser.xmlIOParseDTD(NULL, c_buffer, 0) # <<<<<<<<<<<<<<
goto __pyx_L3_return;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":310
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":311
* cdef xmlparser.xmlParserInputBuffer* c_buffer
* c_buffer = self._createParserInputBuffer()
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":307
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":308
* return xmlparser.xmlNewIOInputStream(ctxt, c_buffer, 0)
*
* cdef tree.xmlDtd* _readDtd(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":313
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":314
* return xmlparser.xmlIOParseDTD(NULL, c_buffer, 0)
*
* cdef xmlDoc* _readDoc(self, xmlparser.xmlParserCtxt* ctxt, int options): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_readDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":321
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":322
* cdef void* c_callback_context
*
* if self._encoding is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":322
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":323
*
* if self._encoding is None:
* c_encoding = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":324
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":325
* c_encoding = NULL
* else:
* c_encoding = _cstr(self._encoding) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":326
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":327
* c_encoding = _cstr(self._encoding)
*
* c_stream = python.PyFile_AsFile(self._filelike) # <<<<<<<<<<<<<<
__pyx_v_c_stream = PyFile_AsFile(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":327
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":328
*
* c_stream = python.PyFile_AsFile(self._filelike)
* if c_stream is NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_stream == NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":328
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":329
* c_stream = python.PyFile_AsFile(self._filelike)
* if c_stream is NULL:
* c_read_callback = _readFilelikeParser # <<<<<<<<<<<<<<
*/
__pyx_v_c_read_callback = __pyx_f_4lxml_5etree__readFilelikeParser;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":329
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":330
* if c_stream is NULL:
* c_read_callback = _readFilelikeParser
* c_callback_context = <python.PyObject*>self # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":331
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":332
* c_callback_context = <python.PyObject*>self
* else:
* c_read_callback = _readFileParser # <<<<<<<<<<<<<<
*/
__pyx_v_c_read_callback = __pyx_f_4lxml_5etree__readFileParser;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":332
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":333
* else:
* c_read_callback = _readFileParser
* c_callback_context = c_stream # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":334
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":335
* c_callback_context = c_stream
*
* orig_options = ctxt.options # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_ctxt->options;
__pyx_v_orig_options = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":335
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":336
*
* orig_options = ctxt.options
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":336
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":337
* orig_options = ctxt.options
* with nogil:
* if ctxt.html: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_ctxt->html != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":337
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":338
* with nogil:
* if ctxt.html:
* result = htmlparser.htmlCtxtReadIO( # <<<<<<<<<<<<<<
*/
__pyx_v_result = htmlCtxtReadIO(__pyx_v_ctxt, __pyx_v_c_read_callback, NULL, __pyx_v_c_callback_context, __pyx_v_self->_c_url, __pyx_v_c_encoding, __pyx_v_options);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":340
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":341
* ctxt, c_read_callback, NULL, c_callback_context,
* self._c_url, c_encoding, options)
* if result is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_result != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":341
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":342
* self._c_url, c_encoding, options)
* if result is not NULL:
* if _fixHtmlDictNames(ctxt.dict, result) < 0: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_ctxt->dict, __pyx_v_result) < 0) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":342
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":343
* if result is not NULL:
* if _fixHtmlDictNames(ctxt.dict, result) < 0:
* tree.xmlFreeDoc(result) # <<<<<<<<<<<<<<
*/
xmlFreeDoc(__pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":343
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":344
* if _fixHtmlDictNames(ctxt.dict, result) < 0:
* tree.xmlFreeDoc(result)
* result = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":345
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":346
* result = NULL
* else:
* result = xmlparser.xmlCtxtReadIO( # <<<<<<<<<<<<<<
__pyx_L8:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":335
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":336
*
* orig_options = ctxt.options
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":348
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":349
* ctxt, c_read_callback, NULL, c_callback_context,
* self._c_url, c_encoding, options)
* ctxt.options = orig_options # work around libxml2 problem # <<<<<<<<<<<<<<
*/
__pyx_v_ctxt->options = __pyx_v_orig_options;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":349
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":350
* self._c_url, c_encoding, options)
* ctxt.options = orig_options # work around libxml2 problem
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_7);
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":350
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":351
* ctxt.options = orig_options # work around libxml2 problem
* try:
* self._close_file() # <<<<<<<<<<<<<<
* except:
* self._exc_context._store_raised()
*/
- __pyx_t_3 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
+ __pyx_t_3 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
__pyx_L14_error:;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":351
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":352
* try:
* self._close_file()
* except: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("lxml.etree._FileReaderContext._readDoc", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L16_except_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_9);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":352
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":353
* self._close_file()
* except:
* self._exc_context._store_raised() # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":354
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":355
* self._exc_context._store_raised()
* finally:
* return result # swallow any exceptions # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":313
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":314
* return xmlparser.xmlIOParseDTD(NULL, c_buffer, 0)
*
* cdef xmlDoc* _readDoc(self, xmlparser.xmlParserCtxt* ctxt, int options): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":356
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":357
* return result # swallow any exceptions
*
* cdef int copyToBuffer(self, char* c_buffer, int c_requested): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("copyToBuffer", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":357
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":358
*
* cdef int copyToBuffer(self, char* c_buffer, int c_requested):
* cdef int c_byte_count = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_c_byte_count = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":360
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":361
* cdef char* c_start
* cdef Py_ssize_t byte_count, remaining
* if self._bytes_read < 0: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_self->_bytes_read < 0) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":361
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":362
* cdef Py_ssize_t byte_count, remaining
* if self._bytes_read < 0:
* return 0 # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":362
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":363
* if self._bytes_read < 0:
* return 0
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_4);
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":363
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":364
* return 0
* try:
* byte_count = python.PyBytes_GET_SIZE(self._bytes) # <<<<<<<<<<<<<<
__pyx_v_byte_count = PyBytes_GET_SIZE(__pyx_t_5);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":364
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":365
* try:
* byte_count = python.PyBytes_GET_SIZE(self._bytes)
* remaining = byte_count - self._bytes_read # <<<<<<<<<<<<<<
*/
__pyx_v_remaining = (__pyx_v_byte_count - __pyx_v_self->_bytes_read);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":365
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":366
* byte_count = python.PyBytes_GET_SIZE(self._bytes)
* remaining = byte_count - self._bytes_read
* while c_requested > remaining: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_requested > __pyx_v_remaining) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":366
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":367
* remaining = byte_count - self._bytes_read
* while c_requested > remaining:
* c_start = _cstr(self._bytes) + self._bytes_read # <<<<<<<<<<<<<<
__pyx_v_c_start = (PyBytes_AS_STRING(__pyx_t_5) + __pyx_v_self->_bytes_read);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":367
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":368
* while c_requested > remaining:
* c_start = _cstr(self._bytes) + self._bytes_read
* cstring_h.memcpy(c_buffer, c_start, remaining) # <<<<<<<<<<<<<<
*/
memcpy(__pyx_v_c_buffer, __pyx_v_c_start, __pyx_v_remaining);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":368
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":369
* c_start = _cstr(self._bytes) + self._bytes_read
* cstring_h.memcpy(c_buffer, c_start, remaining)
* c_byte_count += remaining # <<<<<<<<<<<<<<
*/
__pyx_v_c_byte_count = (__pyx_v_c_byte_count + __pyx_v_remaining);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":369
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":370
* cstring_h.memcpy(c_buffer, c_start, remaining)
* c_byte_count += remaining
* c_buffer += remaining # <<<<<<<<<<<<<<
*/
__pyx_v_c_buffer = (__pyx_v_c_buffer + __pyx_v_remaining);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":370
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":371
* c_byte_count += remaining
* c_buffer += remaining
* c_requested -= remaining # <<<<<<<<<<<<<<
*/
__pyx_v_c_requested = (__pyx_v_c_requested - __pyx_v_remaining);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":372
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":373
* c_requested -= remaining
*
* self._bytes = self._filelike.read(c_requested) # <<<<<<<<<<<<<<
* if not isinstance(self._bytes, bytes):
* if isinstance(self._bytes, unicode):
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_filelike, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_filelike, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_c_requested); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_c_requested); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_7);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_self->_bytes = __pyx_t_6;
__pyx_t_6 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":373
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":374
*
* self._bytes = self._filelike.read(c_requested)
* if not isinstance(self._bytes, bytes): # <<<<<<<<<<<<<<
__pyx_t_8 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_8) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":374
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":375
* self._bytes = self._filelike.read(c_requested)
* if not isinstance(self._bytes, bytes):
* if isinstance(self._bytes, unicode): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_8 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":375
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":376
* if not isinstance(self._bytes, bytes):
* if isinstance(self._bytes, unicode):
* if self._encoding is None: # <<<<<<<<<<<<<<
__pyx_t_8 = (__pyx_t_1 != 0);
if (__pyx_t_8) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":376
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":377
* if isinstance(self._bytes, unicode):
* if self._encoding is None:
* self._bytes = (<unicode>self._bytes).encode('utf8') # <<<<<<<<<<<<<<
*/
if (unlikely(__pyx_v_self->_bytes == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
- __pyx_t_6 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_self->_bytes)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_6 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_self->_bytes)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->_bytes);
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":379
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":380
* else:
* self._bytes = python.PyUnicode_AsEncodedString(
* self._bytes, _cstr(self._encoding), NULL) # <<<<<<<<<<<<<<
__pyx_t_7 = __pyx_v_self->_encoding;
__Pyx_INCREF(__pyx_t_7);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":378
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":379
* self._bytes = (<unicode>self._bytes).encode('utf8')
* else:
* self._bytes = python.PyUnicode_AsEncodedString( # <<<<<<<<<<<<<<
* self._bytes, _cstr(self._encoding), NULL)
* else:
*/
- __pyx_t_5 = PyUnicode_AsEncodedString(__pyx_t_6, PyBytes_AS_STRING(__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_5 = PyUnicode_AsEncodedString(__pyx_t_6, PyBytes_AS_STRING(__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":381
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":382
* self._bytes, _cstr(self._encoding), NULL)
* else:
* self._close_file() # <<<<<<<<<<<<<<
* raise TypeError, \
* u"reading from file-like objects must return byte strings or unicode strings"
*/
- __pyx_t_5 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_5 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":382
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":383
* else:
* self._close_file()
* raise TypeError, \ # <<<<<<<<<<<<<<
*
*/
__Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_reading_from_file_like_objects_m, 0, 0);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
}
__pyx_L18:;
goto __pyx_L17;
}
__pyx_L17:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":385
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":386
* u"reading from file-like objects must return byte strings or unicode strings"
*
* remaining = python.PyBytes_GET_SIZE(self._bytes) # <<<<<<<<<<<<<<
__pyx_v_remaining = PyBytes_GET_SIZE(__pyx_t_5);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":386
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":387
*
* remaining = python.PyBytes_GET_SIZE(self._bytes)
* if remaining == 0: # <<<<<<<<<<<<<<
__pyx_t_8 = ((__pyx_v_remaining == 0) != 0);
if (__pyx_t_8) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":387
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":388
* remaining = python.PyBytes_GET_SIZE(self._bytes)
* if remaining == 0:
* self._bytes_read = -1 # <<<<<<<<<<<<<<
*/
__pyx_v_self->_bytes_read = -1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":388
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":389
* if remaining == 0:
* self._bytes_read = -1
* self._close_file() # <<<<<<<<<<<<<<
* return c_byte_count
* self._bytes_read = 0
*/
- __pyx_t_5 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_5 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":389
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":390
* self._bytes_read = -1
* self._close_file()
* return c_byte_count # <<<<<<<<<<<<<<
goto __pyx_L11_try_return;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":390
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":391
* self._close_file()
* return c_byte_count
* self._bytes_read = 0 # <<<<<<<<<<<<<<
__pyx_v_self->_bytes_read = 0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":392
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":393
* self._bytes_read = 0
*
* if c_requested > 0: # <<<<<<<<<<<<<<
__pyx_t_8 = ((__pyx_v_c_requested > 0) != 0);
if (__pyx_t_8) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":393
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":394
*
* if c_requested > 0:
* c_start = _cstr(self._bytes) + self._bytes_read # <<<<<<<<<<<<<<
__pyx_v_c_start = (PyBytes_AS_STRING(__pyx_t_5) + __pyx_v_self->_bytes_read);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":394
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":395
* if c_requested > 0:
* c_start = _cstr(self._bytes) + self._bytes_read
* cstring_h.memcpy(c_buffer, c_start, c_requested) # <<<<<<<<<<<<<<
*/
memcpy(__pyx_v_c_buffer, __pyx_v_c_start, __pyx_v_c_requested);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":395
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":396
* c_start = _cstr(self._bytes) + self._bytes_read
* cstring_h.memcpy(c_buffer, c_start, c_requested)
* c_byte_count += c_requested # <<<<<<<<<<<<<<
*/
__pyx_v_c_byte_count = (__pyx_v_c_byte_count + __pyx_v_c_requested);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":396
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":397
* cstring_h.memcpy(c_buffer, c_start, c_requested)
* c_byte_count += c_requested
* self._bytes_read += c_requested # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":397
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":398
* c_byte_count += c_requested
* self._bytes_read += c_requested
* except: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("lxml.etree._FileReaderContext.copyToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_6);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":398
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":399
* self._bytes_read += c_requested
* except:
* c_byte_count = -1 # <<<<<<<<<<<<<<
*/
__pyx_v_c_byte_count = -1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":399
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":400
* except:
* c_byte_count = -1
* self._exc_context._store_raised() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext *)__pyx_v_self->_exc_context->__pyx_vtab)->_store_raised(__pyx_v_self->_exc_context);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":400
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":401
* c_byte_count = -1
* self._exc_context._store_raised()
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_11);
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":401
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":402
* self._exc_context._store_raised()
* try:
* self._close_file() # <<<<<<<<<<<<<<
* except:
* self._exc_context._store_raised()
*/
- __pyx_t_12 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
+ __pyx_t_12 = __pyx_f_4lxml_5etree_18_FileReaderContext__close_file(__pyx_v_self); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
}
__pyx_L24_error:;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":402
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":403
* try:
* self._close_file()
* except: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("lxml.etree._FileReaderContext.copyToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
+ if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L26_except_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_t_13);
__Pyx_GOTREF(__pyx_t_14);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":403
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":404
* self._close_file()
* except:
* self._exc_context._store_raised() # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":405
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":406
* self._exc_context._store_raised()
* finally:
* return c_byte_count # swallow any exceptions # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":356
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":357
* return result # swallow any exceptions
*
* cdef int copyToBuffer(self, char* c_buffer, int c_requested): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":407
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":408
* return c_byte_count # swallow any exceptions
*
* cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) with gil: # <<<<<<<<<<<<<<
#endif
__Pyx_RefNannySetupContext("_readFilelikeParser", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":408
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":409
*
* cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) with gil:
* return (<_FileReaderContext>ctxt).copyToBuffer(c_buffer, c_size) # <<<<<<<<<<<<<<
__pyx_r = __pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer(((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_v_ctxt), __pyx_v_c_buffer, __pyx_v_c_size);
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":407
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":408
* return c_byte_count # swallow any exceptions
*
* cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) with gil: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":410
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":411
* return (<_FileReaderContext>ctxt).copyToBuffer(c_buffer, c_size)
*
* cdef int _readFileParser(void* ctxt, char* c_buffer, int c_size) nogil: # <<<<<<<<<<<<<<
static int __pyx_f_4lxml_5etree__readFileParser(void *__pyx_v_ctxt, char *__pyx_v_c_buffer, int __pyx_v_c_size) {
int __pyx_r;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":411
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":412
*
* cdef int _readFileParser(void* ctxt, char* c_buffer, int c_size) nogil:
* return stdio.fread(c_buffer, 1, c_size, <stdio.FILE*>ctxt) # <<<<<<<<<<<<<<
__pyx_r = fread(__pyx_v_c_buffer, 1, __pyx_v_c_size, ((FILE *)__pyx_v_ctxt));
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":410
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":411
* return (<_FileReaderContext>ctxt).copyToBuffer(c_buffer, c_size)
*
* cdef int _readFileParser(void* ctxt, char* c_buffer, int c_size) nogil: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":417
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":418
* ############################################################
*
* cdef xmlparser.xmlParserInput* _local_resolver(const_char* c_url, const_char* c_pubid, # <<<<<<<<<<<<<<
#endif
__Pyx_RefNannySetupContext("_local_resolver", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":426
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":427
* # passed, check to see if the thread state object has an implied
* # context.
* if c_context._private is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_context->_private != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":427
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":428
* # context.
* if c_context._private is not NULL:
* context = <_ResolverContext>c_context._private # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":429
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":430
* context = <_ResolverContext>c_context._private
* else:
* context = __GLOBAL_PARSER_CONTEXT.findImpliedContext() # <<<<<<<<<<<<<<
*
* if context is None:
*/
- __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_findImpliedContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_findImpliedContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ResolverContext *)__pyx_t_2);
__pyx_t_2 = 0;
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":431
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":432
* context = __GLOBAL_PARSER_CONTEXT.findImpliedContext()
*
* if context is None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_1 != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":432
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":433
*
* if context is None:
* if __DEFAULT_ENTITY_LOADER is NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER == NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":433
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":434
* if context is None:
* if __DEFAULT_ENTITY_LOADER is NULL:
* return NULL # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":434
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":435
* if __DEFAULT_ENTITY_LOADER is NULL:
* return NULL
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":436
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":437
* with nogil:
* # free the GIL as we might do serious I/O here (e.g. HTTP)
* c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context) # <<<<<<<<<<<<<<
__pyx_v_c_input = __pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER(__pyx_v_c_url, __pyx_v_c_pubid, __pyx_v_c_context);
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":434
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":435
* if __DEFAULT_ENTITY_LOADER is NULL:
* return NULL
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":437
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":438
* # free the GIL as we might do serious I/O here (e.g. HTTP)
* c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context)
* return c_input # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":439
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":440
* return c_input
*
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_6);
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":440
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":441
*
* try:
* if c_url is NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_c_url == NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":441
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":442
* try:
* if c_url is NULL:
* url = None # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":444
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":445
* else:
* # parsing a related document (DTD etc.) => UTF-8 encoded URL?
* url = _decodeFilename(<const_xmlChar*>c_url) # <<<<<<<<<<<<<<
* if c_pubid is NULL:
* pubid = None
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__decodeFilename(((const xmlChar *)__pyx_v_c_url)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__decodeFilename(((const xmlChar *)__pyx_v_c_url)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_url = __pyx_t_2;
__pyx_t_2 = 0;
}
__pyx_L17:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":445
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":446
* # parsing a related document (DTD etc.) => UTF-8 encoded URL?
* url = _decodeFilename(<const_xmlChar*>c_url)
* if c_pubid is NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_c_pubid == NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":446
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":447
* url = _decodeFilename(<const_xmlChar*>c_url)
* if c_pubid is NULL:
* pubid = None # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":448
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":449
* pubid = None
* else:
* pubid = funicode(<const_xmlChar*>c_pubid) # always UTF-8 # <<<<<<<<<<<<<<
*
* doc_ref = context._resolvers.resolve(url, pubid, context)
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(((const xmlChar *)__pyx_v_c_pubid)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(((const xmlChar *)__pyx_v_c_pubid)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_pubid = __pyx_t_2;
__pyx_t_2 = 0;
}
__pyx_L18:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":450
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":451
* pubid = funicode(<const_xmlChar*>c_pubid) # always UTF-8
*
* doc_ref = context._resolvers.resolve(url, pubid, context) # <<<<<<<<<<<<<<
* except:
* context._store_raised()
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_resolvers), __pyx_n_s_resolve); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_resolvers), __pyx_n_s_resolve); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
+ __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_url);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_url);
__Pyx_INCREF(((PyObject *)__pyx_v_context));
PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)__pyx_v_context));
__Pyx_GIVEREF(((PyObject *)__pyx_v_context));
- __pyx_t_8 = PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__InputDocument))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
+ if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__InputDocument))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__pyx_v_doc_ref = ((struct __pyx_obj_4lxml_5etree__InputDocument *)__pyx_t_8);
__pyx_t_8 = 0;
}
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":451
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":452
*
* doc_ref = context._resolvers.resolve(url, pubid, context)
* except: # <<<<<<<<<<<<<<
*/
/*except:*/ {
__Pyx_AddTraceback("lxml.etree._local_resolver", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
+ if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L11_except_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_7);
__Pyx_GOTREF(__pyx_t_2);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":452
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":453
* doc_ref = context._resolvers.resolve(url, pubid, context)
* except:
* context._store_raised() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_4lxml_5etree__ResolverContext *)__pyx_v_context->__pyx_base.__pyx_vtab)->__pyx_base._store_raised(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":453
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":454
* except:
* context._store_raised()
* return NULL # <<<<<<<<<<<<<<
__pyx_L16_try_end:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":455
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":456
* return NULL
*
* if doc_ref is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_3 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":471
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":472
* c_input = xmlparser.xmlNewInputFromFile(
* c_context, c_filename)
* elif doc_ref._type == PARSER_DATA_FILE: # <<<<<<<<<<<<<<
*/
switch (__pyx_v_doc_ref->_type) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":456
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":457
*
* if doc_ref is not None:
* if doc_ref._type == PARSER_DATA_STRING: # <<<<<<<<<<<<<<
*/
case __pyx_e_4lxml_5etree_PARSER_DATA_STRING:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":457
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":458
* if doc_ref is not None:
* if doc_ref._type == PARSER_DATA_STRING:
* data = doc_ref._data_bytes # <<<<<<<<<<<<<<
__pyx_v_data = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":458
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":459
* if doc_ref._type == PARSER_DATA_STRING:
* data = doc_ref._data_bytes
* c_input = xmlparser.xmlNewInputStream(c_context) # <<<<<<<<<<<<<<
*/
__pyx_v_c_input = xmlNewInputStream(__pyx_v_c_context);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":459
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":460
* data = doc_ref._data_bytes
* c_input = xmlparser.xmlNewInputStream(c_context)
* if c_input is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_input != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":460
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":461
* c_input = xmlparser.xmlNewInputStream(c_context)
* if c_input is not NULL:
* c_input.base = _xcstr(data) # <<<<<<<<<<<<<<
*/
__pyx_v_c_input->base = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_data);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":461
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":462
* if c_input is not NULL:
* c_input.base = _xcstr(data)
* c_input.length = python.PyBytes_GET_SIZE(data) # <<<<<<<<<<<<<<
*/
__pyx_v_c_input->length = PyBytes_GET_SIZE(__pyx_v_data);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":462
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":463
* c_input.base = _xcstr(data)
* c_input.length = python.PyBytes_GET_SIZE(data)
* c_input.cur = c_input.base # <<<<<<<<<<<<<<
__pyx_t_9 = __pyx_v_c_input->base;
__pyx_v_c_input->cur = __pyx_t_9;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":463
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":464
* c_input.length = python.PyBytes_GET_SIZE(data)
* c_input.cur = c_input.base
* c_input.end = c_input.base + c_input.length # <<<<<<<<<<<<<<
__pyx_L22:;
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":464
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":465
* c_input.cur = c_input.base
* c_input.end = c_input.base + c_input.length
* elif doc_ref._type == PARSER_DATA_FILENAME: # <<<<<<<<<<<<<<
*/
case __pyx_e_4lxml_5etree_PARSER_DATA_FILENAME:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":465
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":466
* c_input.end = c_input.base + c_input.length
* elif doc_ref._type == PARSER_DATA_FILENAME:
* data = None # <<<<<<<<<<<<<<
__Pyx_INCREF(Py_None);
__pyx_v_data = Py_None;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":466
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":467
* elif doc_ref._type == PARSER_DATA_FILENAME:
* data = None
* c_filename = _cstr(doc_ref._filename) # <<<<<<<<<<<<<<
__pyx_v_c_filename = PyBytes_AS_STRING(__pyx_t_2);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":467
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":468
* data = None
* c_filename = _cstr(doc_ref._filename)
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":469
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":470
* with nogil:
* # free the GIL as we might do serious I/O here
* c_input = xmlparser.xmlNewInputFromFile( # <<<<<<<<<<<<<<
__pyx_v_c_input = xmlNewInputFromFile(__pyx_v_c_context, __pyx_v_c_filename);
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":467
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":468
* data = None
* c_filename = _cstr(doc_ref._filename)
* with nogil: # <<<<<<<<<<<<<<
}
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":471
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":472
* c_input = xmlparser.xmlNewInputFromFile(
* c_context, c_filename)
* elif doc_ref._type == PARSER_DATA_FILE: # <<<<<<<<<<<<<<
*/
case __pyx_e_4lxml_5etree_PARSER_DATA_FILE:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":473
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":474
* elif doc_ref._type == PARSER_DATA_FILE:
* file_context = _FileReaderContext(doc_ref._file, context, url,
* None, doc_ref._close_file) # <<<<<<<<<<<<<<
* c_input = file_context._createParserInput(c_context)
* data = file_context
*/
- __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_doc_ref->_close_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_doc_ref->_close_file); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":472
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":473
* c_context, c_filename)
* elif doc_ref._type == PARSER_DATA_FILE:
* file_context = _FileReaderContext(doc_ref._file, context, url, # <<<<<<<<<<<<<<
* None, doc_ref._close_file)
* c_input = file_context._createParserInput(c_context)
*/
- __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_doc_ref->_file);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_doc_ref->_file);
PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileReaderContext)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileReaderContext)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_v_file_context = ((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":474
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":475
* file_context = _FileReaderContext(doc_ref._file, context, url,
* None, doc_ref._close_file)
* c_input = file_context._createParserInput(c_context) # <<<<<<<<<<<<<<
*/
__pyx_v_c_input = __pyx_f_4lxml_5etree_18_FileReaderContext__createParserInput(__pyx_v_file_context, __pyx_v_c_context);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":475
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":476
* None, doc_ref._close_file)
* c_input = file_context._createParserInput(c_context)
* data = file_context # <<<<<<<<<<<<<<
break;
default:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":477
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":478
* data = file_context
* else:
* data = None # <<<<<<<<<<<<<<
__Pyx_INCREF(Py_None);
__pyx_v_data = Py_None;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":478
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":479
* else:
* data = None
* c_input = NULL # <<<<<<<<<<<<<<
break;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":480
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":481
* c_input = NULL
*
* if data is not None: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_t_1 != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":481
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":482
*
* if data is not None:
* context._storage.add(data) # <<<<<<<<<<<<<<
* if c_input is not NULL:
* return c_input
*/
- __pyx_t_10 = __pyx_f_4lxml_5etree_10_TempStore_add(__pyx_v_context->_storage, __pyx_v_data); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __pyx_f_4lxml_5etree_10_TempStore_add(__pyx_v_context->_storage, __pyx_v_data); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L26;
}
__pyx_L26:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":482
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":483
* if data is not None:
* context._storage.add(data)
* if c_input is not NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_c_input != NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":483
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":484
* context._storage.add(data)
* if c_input is not NULL:
* return c_input # <<<<<<<<<<<<<<
}
__pyx_L21:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":485
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":486
* return c_input
*
* if __DEFAULT_ENTITY_LOADER is NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER == NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":486
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":487
*
* if __DEFAULT_ENTITY_LOADER is NULL:
* return NULL # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":488
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":489
* return NULL
*
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":490
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":491
* with nogil:
* # free the GIL as we might do serious I/O here (e.g. HTTP)
* c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context) # <<<<<<<<<<<<<<
__pyx_v_c_input = __pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER(__pyx_v_c_url, __pyx_v_c_pubid, __pyx_v_c_context);
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":488
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":489
* return NULL
*
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":491
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":492
* # free the GIL as we might do serious I/O here (e.g. HTTP)
* c_input = __DEFAULT_ENTITY_LOADER(c_url, c_pubid, c_context)
* return c_input # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_c_input;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":417
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":418
* ############################################################
*
* cdef xmlparser.xmlParserInput* _local_resolver(const_char* c_url, const_char* c_pubid, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":510
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":511
* cdef _Document _doc
*
* def __cinit__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__cinit__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":511
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":512
*
* def __cinit__(self):
* self._c_ctxt = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->_c_ctxt = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":512
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":513
* def __cinit__(self):
* self._c_ctxt = NULL
* if not config.ENABLE_THREADING: # <<<<<<<<<<<<<<
__pyx_t_1 = ((!(ENABLE_THREADING != 0)) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":513
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":514
* self._c_ctxt = NULL
* if not config.ENABLE_THREADING:
* self._lock = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":515
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":516
* self._lock = NULL
* else:
* self._lock = python.PyThread_allocate_lock() # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":516
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":517
* else:
* self._lock = python.PyThread_allocate_lock()
* self._error_log = _ErrorLog() # <<<<<<<<<<<<<<
*
* def __dealloc__(self):
*/
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->_error_log);
__pyx_v_self->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":510
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":511
* cdef _Document _doc
*
* def __cinit__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":518
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":519
* self._error_log = _ErrorLog()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
int __pyx_t_2;
__Pyx_RefNannySetupContext("__dealloc__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":519
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":520
*
* def __dealloc__(self):
* if config.ENABLE_THREADING and self._lock is not NULL: # <<<<<<<<<<<<<<
}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":520
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":521
* def __dealloc__(self):
* if config.ENABLE_THREADING and self._lock is not NULL:
* python.PyThread_free_lock(self._lock) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":521
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":522
* if config.ENABLE_THREADING and self._lock is not NULL:
* python.PyThread_free_lock(self._lock)
* if self._c_ctxt is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_self->_c_ctxt != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":522
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":523
* python.PyThread_free_lock(self._lock)
* if self._c_ctxt is not NULL:
* xmlparser.xmlFreeParserCtxt(self._c_ctxt) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":518
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":519
* self._error_log = _ErrorLog()
*
* def __dealloc__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":524
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":525
* xmlparser.xmlFreeParserCtxt(self._c_ctxt)
*
* cdef _ParserContext _copy(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_copy", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":526
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":527
* cdef _ParserContext _copy(self):
* cdef _ParserContext context
* context = self.__class__() # <<<<<<<<<<<<<<
* context._validator = self._validator.copy()
* _initParserContext(context, self._resolvers._copy(), NULL)
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__ParserContext))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__ParserContext))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":527
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":528
* cdef _ParserContext context
* context = self.__class__()
* context._validator = self._validator.copy() # <<<<<<<<<<<<<<
* _initParserContext(context, self._resolvers._copy(), NULL)
* return context
*/
- __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy(__pyx_v_self->_validator)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy(__pyx_v_self->_validator)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_context->_validator);
__pyx_v_context->_validator = ((struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":528
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":529
* context = self.__class__()
* context._validator = self._validator.copy()
* _initParserContext(context, self._resolvers._copy(), NULL) # <<<<<<<<<<<<<<
* return context
*
*/
- __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(__pyx_v_self->__pyx_base._resolvers)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_17_ResolverRegistry__copy(__pyx_v_self->__pyx_base._resolvers)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_1 = __pyx_f_4lxml_5etree__initParserContext(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4lxml_5etree__initParserContext(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":529
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":530
* context._validator = self._validator.copy()
* _initParserContext(context, self._resolvers._copy(), NULL)
* return context # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_context;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":524
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":525
* xmlparser.xmlFreeParserCtxt(self._c_ctxt)
*
* cdef _ParserContext _copy(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":531
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":532
* return context
*
* cdef void _initParserContext(self, xmlparser.xmlParserCtxt* c_ctxt): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_initParserContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":532
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":533
*
* cdef void _initParserContext(self, xmlparser.xmlParserCtxt* c_ctxt):
* self._c_ctxt = c_ctxt # <<<<<<<<<<<<<<
*/
__pyx_v_self->_c_ctxt = __pyx_v_c_ctxt;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":533
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":534
* cdef void _initParserContext(self, xmlparser.xmlParserCtxt* c_ctxt):
* self._c_ctxt = c_ctxt
* c_ctxt._private = <void*>self # <<<<<<<<<<<<<<
*/
__pyx_v_c_ctxt->_private = ((void *)__pyx_v_self);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":531
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":532
* return context
*
* cdef void _initParserContext(self, xmlparser.xmlParserCtxt* c_ctxt): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":535
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":536
* c_ctxt._private = <void*>self
*
* cdef void _resetParserContext(self): # <<<<<<<<<<<<<<
int __pyx_t_3;
__Pyx_RefNannySetupContext("_resetParserContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":536
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":537
*
* cdef void _resetParserContext(self):
* if self._c_ctxt is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_self->_c_ctxt != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":537
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":538
* cdef void _resetParserContext(self):
* if self._c_ctxt is not NULL:
* if self._c_ctxt.html: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_c_ctxt->html != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":538
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":539
* if self._c_ctxt is not NULL:
* if self._c_ctxt.html:
* htmlparser.htmlCtxtReset(self._c_ctxt) # <<<<<<<<<<<<<<
*/
htmlCtxtReset(__pyx_v_self->_c_ctxt);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":539
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":540
* if self._c_ctxt.html:
* htmlparser.htmlCtxtReset(self._c_ctxt)
* self._c_ctxt.disableSAX = 0 # work around bug in libxml2 # <<<<<<<<<<<<<<
goto __pyx_L4;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":540
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":541
* htmlparser.htmlCtxtReset(self._c_ctxt)
* self._c_ctxt.disableSAX = 0 # work around bug in libxml2
* elif self._c_ctxt.spaceTab is not NULL or \ # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_self->_c_ctxt->spaceTab != NULL) != 0);
if (!__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":541
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":542
* self._c_ctxt.disableSAX = 0 # work around bug in libxml2
* elif self._c_ctxt.spaceTab is not NULL or \
* _LIBXML_VERSION_INT >= 20629: # work around bug in libxml2 # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":542
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":543
* elif self._c_ctxt.spaceTab is not NULL or \
* _LIBXML_VERSION_INT >= 20629: # work around bug in libxml2
* xmlparser.xmlClearParserCtxt(self._c_ctxt) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":535
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":536
* c_ctxt._private = <void*>self
*
* cdef void _resetParserContext(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyFinishContext();
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":544
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":545
* xmlparser.xmlClearParserCtxt(self._c_ctxt)
*
* cdef int prepare(self) except -1: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("prepare", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":546
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":547
* cdef int prepare(self) except -1:
* cdef int result
* if config.ENABLE_THREADING and self._lock is not NULL: # <<<<<<<<<<<<<<
}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":547
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":548
* cdef int result
* if config.ENABLE_THREADING and self._lock is not NULL:
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":548
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":549
* if config.ENABLE_THREADING and self._lock is not NULL:
* with nogil:
* result = python.PyThread_acquire_lock( # <<<<<<<<<<<<<<
__pyx_v_result = PyThread_acquire_lock(__pyx_v_self->_lock, WAIT_LOCK);
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":547
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":548
* cdef int result
* if config.ENABLE_THREADING and self._lock is not NULL:
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":550
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":551
* result = python.PyThread_acquire_lock(
* self._lock, python.WAIT_LOCK)
* if result == 0: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_result == 0) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":551
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":552
* self._lock, python.WAIT_LOCK)
* if result == 0:
* raise ParserError, u"parser locking failed" # <<<<<<<<<<<<<<
* self._error_log.clear()
* self._doc = None
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParserError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParserError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, __pyx_kp_u_parser_locking_failed, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 551; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
goto __pyx_L3;
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":552
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":553
* if result == 0:
* raise ParserError, u"parser locking failed"
* self._error_log.clear() # <<<<<<<<<<<<<<
* self._doc = None
* self._c_ctxt.sax.serror = _receiveParserError
*/
- __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->clear(__pyx_v_self->_error_log, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->clear(__pyx_v_self->_error_log, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":553
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":554
* raise ParserError, u"parser locking failed"
* self._error_log.clear()
* self._doc = None # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->_doc));
__pyx_v_self->_doc = ((struct LxmlDocument *)Py_None);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":554
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":555
* self._error_log.clear()
* self._doc = None
* self._c_ctxt.sax.serror = _receiveParserError # <<<<<<<<<<<<<<
*/
__pyx_v_self->_c_ctxt->sax->serror = __pyx_f_4lxml_5etree__receiveParserError;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":555
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":556
* self._doc = None
* self._c_ctxt.sax.serror = _receiveParserError
* if self._validator is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":556
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":557
* self._c_ctxt.sax.serror = _receiveParserError
* if self._validator is not None:
* self._validator.connect(self._c_ctxt, self._error_log) # <<<<<<<<<<<<<<
*/
__pyx_t_3 = ((PyObject *)__pyx_v_self->_error_log);
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_4 = __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(__pyx_v_self->_validator, __pyx_v_self->_c_ctxt, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_3)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect(__pyx_v_self->_validator, __pyx_v_self->_c_ctxt, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_3)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 557; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
goto __pyx_L8;
}
__pyx_L8:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":557
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":558
* if self._validator is not None:
* self._validator.connect(self._c_ctxt, self._error_log)
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":544
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":545
* xmlparser.xmlClearParserCtxt(self._c_ctxt)
*
* cdef int prepare(self) except -1: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":559
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":560
* return 0
*
* cdef int cleanup(self) except -1: # <<<<<<<<<<<<<<
int __pyx_t_2;
__Pyx_RefNannySetupContext("cleanup", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":560
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":561
*
* cdef int cleanup(self) except -1:
* if self._validator is not None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":561
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":562
* cdef int cleanup(self) except -1:
* if self._validator is not None:
* self._validator.disconnect() # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":562
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":563
* if self._validator is not None:
* self._validator.disconnect()
* self._resetParserContext() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_resetParserContext(__pyx_v_self);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":563
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":564
* self._validator.disconnect()
* self._resetParserContext()
* self.clear() # <<<<<<<<<<<<<<
*/
((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.clear(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_self));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":564
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":565
* self._resetParserContext()
* self.clear()
* self._doc = None # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->_doc));
__pyx_v_self->_doc = ((struct LxmlDocument *)Py_None);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":565
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":566
* self.clear()
* self._doc = None
* self._c_ctxt.sax.serror = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_self->_c_ctxt->sax->serror = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":566
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":567
* self._doc = None
* self._c_ctxt.sax.serror = NULL
* if config.ENABLE_THREADING and self._lock is not NULL: # <<<<<<<<<<<<<<
}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":567
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":568
* self._c_ctxt.sax.serror = NULL
* if config.ENABLE_THREADING and self._lock is not NULL:
* python.PyThread_release_lock(self._lock) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":568
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":569
* if config.ENABLE_THREADING and self._lock is not NULL:
* python.PyThread_release_lock(self._lock)
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":559
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":560
* return 0
*
* cdef int cleanup(self) except -1: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":570
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":571
* return 0
*
* cdef object _handleParseResult(self, _BaseParser parser, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_handleParseResult", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":572
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":573
* cdef object _handleParseResult(self, _BaseParser parser,
* xmlDoc* result, filename):
* c_doc = self._handleParseResultDoc(parser, result, filename) # <<<<<<<<<<<<<<
* if self._doc is not None and self._doc._c_doc is c_doc:
* return self._doc
*/
- __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_self, __pyx_v_parser, __pyx_v_result, __pyx_v_filename); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_self, __pyx_v_parser, __pyx_v_result, __pyx_v_filename); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_doc = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":573
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":574
* xmlDoc* result, filename):
* c_doc = self._handleParseResultDoc(parser, result, filename)
* if self._doc is not None and self._doc._c_doc is c_doc: # <<<<<<<<<<<<<<
}
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":574
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":575
* c_doc = self._handleParseResultDoc(parser, result, filename)
* if self._doc is not None and self._doc._c_doc is c_doc:
* return self._doc # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":576
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":577
* return self._doc
* else:
* return _documentFactory(c_doc, parser) # <<<<<<<<<<<<<<
* cdef xmlDoc* _handleParseResultDoc(self, _BaseParser parser,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":570
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":571
* return 0
*
* cdef object _handleParseResult(self, _BaseParser parser, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":578
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":579
* return _documentFactory(c_doc, parser)
*
* cdef xmlDoc* _handleParseResultDoc(self, _BaseParser parser, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_handleParseResultDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":580
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":581
* cdef xmlDoc* _handleParseResultDoc(self, _BaseParser parser,
* xmlDoc* result, filename) except NULL:
* recover = parser._parse_options & xmlparser.XML_PARSE_RECOVER # <<<<<<<<<<<<<<
*/
__pyx_v_recover = (__pyx_v_parser->_parse_options & XML_PARSE_RECOVER);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":583
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":584
* return _handleParseResult(self, self._c_ctxt, result,
* filename, recover,
* free_doc=self._doc is None) # <<<<<<<<<<<<<<
*/
__pyx_t_1 = (((PyObject *)__pyx_v_self->_doc) == Py_None);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":581
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":582
* xmlDoc* result, filename) except NULL:
* recover = parser._parse_options & xmlparser.XML_PARSE_RECOVER
* return _handleParseResult(self, self._c_ctxt, result, # <<<<<<<<<<<<<<
* filename, recover,
* free_doc=self._doc is None)
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__handleParseResult(__pyx_v_self, __pyx_v_self->_c_ctxt, __pyx_v_result, __pyx_v_filename, __pyx_v_recover, __pyx_t_1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__handleParseResult(__pyx_v_self, __pyx_v_self->_c_ctxt, __pyx_v_result, __pyx_v_filename, __pyx_v_recover, __pyx_t_1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_2;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":578
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":579
* return _documentFactory(c_doc, parser)
*
* cdef xmlDoc* _handleParseResultDoc(self, _BaseParser parser, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":585
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":586
* free_doc=self._doc is None)
*
* cdef _initParserContext(_ParserContext context, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_initParserContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":588
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":589
* _ResolverRegistry resolvers,
* xmlparser.xmlParserCtxt* c_ctxt):
* _initResolverContext(context, resolvers) # <<<<<<<<<<<<<<
* if c_ctxt is not NULL:
* context._initParserContext(c_ctxt)
*/
- __pyx_t_1 = __pyx_f_4lxml_5etree__initResolverContext(((struct __pyx_obj_4lxml_5etree__ResolverContext *)__pyx_v_context), __pyx_v_resolvers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4lxml_5etree__initResolverContext(((struct __pyx_obj_4lxml_5etree__ResolverContext *)__pyx_v_context), __pyx_v_resolvers); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":589
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":590
* xmlparser.xmlParserCtxt* c_ctxt):
* _initResolverContext(context, resolvers)
* if c_ctxt is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_ctxt != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":590
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":591
* _initResolverContext(context, resolvers)
* if c_ctxt is not NULL:
* context._initParserContext(c_ctxt) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":585
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":586
* free_doc=self._doc is None)
*
* cdef _initParserContext(_ParserContext context, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":592
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":593
* context._initParserContext(c_ctxt)
*
* cdef void _forwardParserError(xmlparser.xmlParserCtxt* _parser_context, xmlerror.xmlError* error) with gil: # <<<<<<<<<<<<<<
#endif
__Pyx_RefNannySetupContext("_forwardParserError", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":593
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":594
*
* cdef void _forwardParserError(xmlparser.xmlParserCtxt* _parser_context, xmlerror.xmlError* error) with gil:
* (<_ParserContext>_parser_context._private)._error_log._receive(error) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_13_BaseErrorLog__receive(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v__parser_context->_private)->_error_log), __pyx_v_error);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":592
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":593
* context._initParserContext(c_ctxt)
*
* cdef void _forwardParserError(xmlparser.xmlParserCtxt* _parser_context, xmlerror.xmlError* error) with gil: # <<<<<<<<<<<<<<
#endif
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":595
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":596
* (<_ParserContext>_parser_context._private)._error_log._receive(error)
*
* cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) nogil: # <<<<<<<<<<<<<<
int __pyx_t_2;
int __pyx_t_3;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":597
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":598
* cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) nogil:
* if __DEBUG:
* if c_context is NULL or (<xmlparser.xmlParserCtxt*>c_context)._private is NULL: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":598
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":599
* if __DEBUG:
* if c_context is NULL or (<xmlparser.xmlParserCtxt*>c_context)._private is NULL:
* _forwardError(NULL, error) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":600
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":601
* _forwardError(NULL, error)
* else:
* _forwardParserError(<xmlparser.xmlParserCtxt*>c_context, error) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":595
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":596
* (<_ParserContext>_parser_context._private)._error_log._receive(error)
*
* cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) nogil: # <<<<<<<<<<<<<<
/* function exit code */
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":602
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":603
* _forwardParserError(<xmlparser.xmlParserCtxt*>c_context, error)
*
* cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, # <<<<<<<<<<<<<<
__Pyx_RefNannySetupContext("_raiseParseError", 0);
__Pyx_INCREF(__pyx_v_filename);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":604
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":605
* cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename,
* _ErrorLog error_log) except 0:
* if filename is not None and \ # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_filename != Py_None);
if ((__pyx_t_1 != 0)) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":605
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":606
* _ErrorLog error_log) except 0:
* if filename is not None and \
* ctxt.lastError.domain == xmlerror.XML_FROM_IO: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":606
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":607
* if filename is not None and \
* ctxt.lastError.domain == xmlerror.XML_FROM_IO:
* if isinstance(filename, bytes): # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_3 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":608
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":609
* if isinstance(filename, bytes):
* filename = _decodeFilenameWithLength(
* <bytes>filename, len(<bytes>filename)) # <<<<<<<<<<<<<<
* if ctxt.lastError.message is not NULL:
* try:
*/
- __pyx_t_4 = __Pyx_PyObject_AsUString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_AsUString(__pyx_v_filename); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (unlikely(__pyx_v_filename == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_5 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":607
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":608
* ctxt.lastError.domain == xmlerror.XML_FROM_IO:
* if isinstance(filename, bytes):
* filename = _decodeFilenameWithLength( # <<<<<<<<<<<<<<
* <bytes>filename, len(<bytes>filename))
* if ctxt.lastError.message is not NULL:
*/
- __pyx_t_6 = __pyx_f_4lxml_5etree__decodeFilenameWithLength(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __pyx_f_4lxml_5etree__decodeFilenameWithLength(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_6);
__pyx_t_6 = 0;
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":609
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":610
* filename = _decodeFilenameWithLength(
* <bytes>filename, len(<bytes>filename))
* if ctxt.lastError.message is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_ctxt->lastError.message != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":610
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":611
* <bytes>filename, len(<bytes>filename))
* if ctxt.lastError.message is not NULL:
* try: # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_9);
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":611
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":612
* if ctxt.lastError.message is not NULL:
* try:
* message = (ctxt.lastError.message).decode('utf-8') # <<<<<<<<<<<<<<
* # the filename may be in there => play safe
*/
__pyx_t_10 = __pyx_v_ctxt->lastError.message;
- __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+ __pyx_t_6 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_t_6);
__pyx_v_message = __pyx_t_6;
__pyx_L6_error:;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":612
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":613
* try:
* message = (ctxt.lastError.message).decode('utf-8')
* except UnicodeDecodeError: # <<<<<<<<<<<<<<
__pyx_t_11 = PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError);
if (__pyx_t_11) {
__Pyx_AddTraceback("lxml.etree._raiseParseError", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_12, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_12, &__pyx_t_13) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 613; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_12);
__Pyx_GOTREF(__pyx_t_13);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":614
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":615
* except UnicodeDecodeError:
* # the filename may be in there => play safe
* message = (ctxt.lastError.message).decode('iso8859-1') # <<<<<<<<<<<<<<
* filename, message.strip())
*/
__pyx_t_10 = __pyx_v_ctxt->lastError.message;
- __pyx_t_14 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
+ __pyx_t_14 = __Pyx_decode_c_string(__pyx_t_10, 0, strlen(__pyx_t_10), NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_INCREF(__pyx_t_14);
__Pyx_XDECREF_SET(__pyx_v_message, __pyx_t_14);
__pyx_L13_try_end:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":616
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":617
* message = (ctxt.lastError.message).decode('iso8859-1')
* message = u"Error reading file '%s': %s" % (
* filename, message.strip()) # <<<<<<<<<<<<<<
* else:
* message = u"Error reading '%s'" % filename
*/
- __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_strip); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_message, __pyx_n_s_strip); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
- __pyx_t_12 = PyObject_Call(__pyx_t_13, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_INCREF(__pyx_v_filename);
PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_filename);
__Pyx_GIVEREF(__pyx_t_12);
__pyx_t_12 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":615
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":616
* # the filename may be in there => play safe
* message = (ctxt.lastError.message).decode('iso8859-1')
* message = u"Error reading file '%s': %s" % ( # <<<<<<<<<<<<<<
* filename, message.strip())
* else:
*/
- __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Error_reading_file_s_s, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Error_reading_file_s_s, __pyx_t_13); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_DECREF_SET(__pyx_v_message, __pyx_t_12);
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":618
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":619
* filename, message.strip())
* else:
* message = u"Error reading '%s'" % filename # <<<<<<<<<<<<<<
* raise IOError, message
* elif error_log:
*/
- __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Error_reading_s, __pyx_v_filename); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyUnicode_Format(__pyx_kp_u_Error_reading_s, __pyx_v_filename); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__pyx_v_message = __pyx_t_12;
__pyx_t_12 = 0;
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":619
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":620
* else:
* message = u"Error reading '%s'" % filename
* raise IOError, message # <<<<<<<<<<<<<<
* raise error_log._buildParseException(
*/
__Pyx_Raise(__pyx_builtin_IOError, __pyx_v_message, 0, 0);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":620
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":621
* message = u"Error reading '%s'" % filename
* raise IOError, message
* elif error_log: # <<<<<<<<<<<<<<
* raise error_log._buildParseException(
* XMLSyntaxError, u"Document is not well formed")
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_error_log)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_error_log)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":622
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":623
* elif error_log:
* raise error_log._buildParseException(
* XMLSyntaxError, u"Document is not well formed") # <<<<<<<<<<<<<<
* elif ctxt.lastError.message is not NULL:
* message = (ctxt.lastError.message).strip()
*/
- __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":621
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":622
* raise IOError, message
* elif error_log:
* raise error_log._buildParseException( # <<<<<<<<<<<<<<
* XMLSyntaxError, u"Document is not well formed")
* elif ctxt.lastError.message is not NULL:
*/
- __pyx_t_13 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_error_log), __pyx_t_12, __pyx_kp_u_Document_is_not_well_formed); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_error_log), __pyx_t_12, __pyx_kp_u_Document_is_not_well_formed); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_Raise(__pyx_t_13, 0, 0, 0);
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":623
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":624
* raise error_log._buildParseException(
* XMLSyntaxError, u"Document is not well formed")
* elif ctxt.lastError.message is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_ctxt->lastError.message != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":624
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":625
* XMLSyntaxError, u"Document is not well formed")
* elif ctxt.lastError.message is not NULL:
* message = (ctxt.lastError.message).strip() # <<<<<<<<<<<<<<
* code = ctxt.lastError.code
* line = ctxt.lastError.line
*/
- __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_ctxt->lastError.message); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyBytes_FromString(__pyx_v_ctxt->lastError.message); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
- __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_strip); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_strip); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_13 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_v_message = __pyx_t_13;
__pyx_t_13 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":625
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":626
* elif ctxt.lastError.message is not NULL:
* message = (ctxt.lastError.message).strip()
* code = ctxt.lastError.code # <<<<<<<<<<<<<<
__pyx_t_11 = __pyx_v_ctxt->lastError.code;
__pyx_v_code = __pyx_t_11;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":626
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":627
* message = (ctxt.lastError.message).strip()
* code = ctxt.lastError.code
* line = ctxt.lastError.line # <<<<<<<<<<<<<<
__pyx_t_11 = __pyx_v_ctxt->lastError.line;
__pyx_v_line = __pyx_t_11;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":627
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":628
* code = ctxt.lastError.code
* line = ctxt.lastError.line
* column = ctxt.lastError.int2 # <<<<<<<<<<<<<<
__pyx_t_11 = __pyx_v_ctxt->lastError.int2;
__pyx_v_column = __pyx_t_11;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":628
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":629
* line = ctxt.lastError.line
* column = ctxt.lastError.int2
* if ctxt.lastError.line > 0: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_ctxt->lastError.line > 0) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":629
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":630
* column = ctxt.lastError.int2
* if ctxt.lastError.line > 0:
* message = u"line %d: %s" % (line, message) # <<<<<<<<<<<<<<
* raise XMLSyntaxError(message, code, line, column)
* else:
*/
- __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
- __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13);
__Pyx_GIVEREF(__pyx_t_13);
PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
__pyx_t_13 = 0;
- __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_line_d_s, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_line_d_s, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF_SET(__pyx_v_message, __pyx_t_13);
}
__pyx_L16:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":630
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":631
* if ctxt.lastError.line > 0:
* message = u"line %d: %s" % (line, message)
* raise XMLSyntaxError(message, code, line, column) # <<<<<<<<<<<<<<
* else:
* raise XMLSyntaxError(None, xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0)
*/
- __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
- __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_column); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_column); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_message);
__pyx_t_12 = 0;
__pyx_t_6 = 0;
__pyx_t_14 = 0;
- __pyx_t_14 = PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_Raise(__pyx_t_14, 0, 0, 0);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 630; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":632
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":633
* raise XMLSyntaxError(message, code, line, column)
* else:
* raise XMLSyntaxError(None, xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0) # <<<<<<<<<<<<<<
*
* cdef xmlDoc* _handleParseResult(_ParserContext context,
*/
- __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_15 = PyInt_FromLong(XML_ERR_INTERNAL_ERROR); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = PyInt_FromLong(XML_ERR_INTERNAL_ERROR); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_13, 0, Py_None);
PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
__pyx_t_15 = 0;
- __pyx_t_15 = PyObject_Call(__pyx_t_14, __pyx_t_13, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_13, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__Pyx_Raise(__pyx_t_15, 0, 0, 0);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":602
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":603
* _forwardParserError(<xmlparser.xmlParserCtxt*>c_context, error)
*
* cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":634
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":635
* raise XMLSyntaxError(None, xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0)
*
* cdef xmlDoc* _handleParseResult(_ParserContext context, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_handleParseResult", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":639
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":640
* bint recover, bint free_doc) except NULL:
* cdef bint well_formed
* if result is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_result != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":640
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":641
* cdef bint well_formed
* if result is not NULL:
* __GLOBAL_PARSER_CONTEXT.initDocDict(result) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":642
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":643
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
*
* if c_ctxt.myDoc is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ctxt->myDoc != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":643
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":644
*
* if c_ctxt.myDoc is not NULL:
* if c_ctxt.myDoc is not result: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ctxt->myDoc != __pyx_v_result) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":644
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":645
* if c_ctxt.myDoc is not NULL:
* if c_ctxt.myDoc is not result:
* __GLOBAL_PARSER_CONTEXT.initDocDict(c_ctxt.myDoc) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_c_ctxt->myDoc);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":645
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":646
* if c_ctxt.myDoc is not result:
* __GLOBAL_PARSER_CONTEXT.initDocDict(c_ctxt.myDoc)
* tree.xmlFreeDoc(c_ctxt.myDoc) # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":646
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":647
* __GLOBAL_PARSER_CONTEXT.initDocDict(c_ctxt.myDoc)
* tree.xmlFreeDoc(c_ctxt.myDoc)
* c_ctxt.myDoc = NULL # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":648
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":649
* c_ctxt.myDoc = NULL
*
* if result is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_result != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":649
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":650
*
* if result is not NULL:
* if context._validator is not None and \ # <<<<<<<<<<<<<<
__pyx_t_1 = (((PyObject *)__pyx_v_context->_validator) != Py_None);
if ((__pyx_t_1 != 0)) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":650
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":651
* if result is not NULL:
* if context._validator is not None and \
* not context._validator.isvalid(): # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":651
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":652
* if context._validator is not None and \
* not context._validator.isvalid():
* well_formed = 0 # actually not 'valid', but anyway ... # <<<<<<<<<<<<<<
goto __pyx_L7;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":652
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":653
* not context._validator.isvalid():
* well_formed = 0 # actually not 'valid', but anyway ...
* elif recover or (c_ctxt.wellFormed and # <<<<<<<<<<<<<<
if (!(__pyx_v_recover != 0)) {
if ((__pyx_v_c_ctxt->wellFormed != 0)) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":653
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":654
* well_formed = 0 # actually not 'valid', but anyway ...
* elif recover or (c_ctxt.wellFormed and
* c_ctxt.lastError.level < xmlerror.XML_ERR_ERROR): # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":654
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":655
* elif recover or (c_ctxt.wellFormed and
* c_ctxt.lastError.level < xmlerror.XML_ERR_ERROR):
* well_formed = 1 # <<<<<<<<<<<<<<
goto __pyx_L7;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":655
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":656
* c_ctxt.lastError.level < xmlerror.XML_ERR_ERROR):
* well_formed = 1
* elif not c_ctxt.replaceEntities and not c_ctxt.validate \ # <<<<<<<<<<<<<<
__pyx_t_3 = ((!(__pyx_v_c_ctxt->replaceEntities != 0)) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":656
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":657
* well_formed = 1
* elif not c_ctxt.replaceEntities and not c_ctxt.validate \
* and context is not None: # <<<<<<<<<<<<<<
}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":658
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":659
* and context is not None:
* # in this mode, we ignore errors about undefined entities
* for error in context._error_log.filter_from_errors(): # <<<<<<<<<<<<<<
* if error.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \
* error.type != ErrorTypes.ERR_UNDECLARED_ENTITY:
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_error_log), __pyx_n_s_filter_from_errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_error_log), __pyx_n_s_filter_from_errors); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
__pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
__pyx_t_8 = NULL;
} else {
- __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_8 = Py_TYPE(__pyx_t_5)->tp_iternext;
}
if (!__pyx_t_8 && PyList_CheckExact(__pyx_t_5)) {
if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else if (!__pyx_t_8 && PyTuple_CheckExact(__pyx_t_5)) {
if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
__pyx_t_6 = __pyx_t_8(__pyx_t_5);
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[6]; __pyx_lineno = 658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
__Pyx_XDECREF_SET(__pyx_v_error, __pyx_t_6);
__pyx_t_6 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":659
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":660
* # in this mode, we ignore errors about undefined entities
* for error in context._error_log.filter_from_errors():
* if error.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ # <<<<<<<<<<<<<<
* error.type != ErrorTypes.ERR_UNDECLARED_ENTITY:
* well_formed = 0
*/
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_type); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_WAR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_WAR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":660
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":661
* for error in context._error_log.filter_from_errors():
* if error.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \
* error.type != ErrorTypes.ERR_UNDECLARED_ENTITY: # <<<<<<<<<<<<<<
* well_formed = 0
* break
*/
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_error, __pyx_n_s_type); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_ERR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_ERR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
- __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_t_4 = __pyx_t_3;
} else {
}
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":661
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":662
* if error.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \
* error.type != ErrorTypes.ERR_UNDECLARED_ENTITY:
* well_formed = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_well_formed = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":662
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":663
* error.type != ErrorTypes.ERR_UNDECLARED_ENTITY:
* well_formed = 0
* break # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":664
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":665
* break
* else:
* well_formed = 1 # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":666
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":667
* well_formed = 1
* else:
* well_formed = 0 # <<<<<<<<<<<<<<
}
__pyx_L7:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":668
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":669
* well_formed = 0
*
* if not well_formed: # <<<<<<<<<<<<<<
__pyx_t_4 = ((!(__pyx_v_well_formed != 0)) != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":669
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":670
*
* if not well_formed:
* if free_doc: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_v_free_doc != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":670
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":671
* if not well_formed:
* if free_doc:
* tree.xmlFreeDoc(result) # <<<<<<<<<<<<<<
}
__pyx_L13:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":671
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":672
* if free_doc:
* tree.xmlFreeDoc(result)
* result = NULL # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":673
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":674
* result = NULL
*
* if context is not None and context._has_raised(): # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":674
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":675
*
* if context is not None and context._has_raised():
* if result is not NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_result != NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":675
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":676
* if context is not None and context._has_raised():
* if result is not NULL:
* if free_doc: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_free_doc != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":676
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":677
* if result is not NULL:
* if free_doc:
* tree.xmlFreeDoc(result) # <<<<<<<<<<<<<<
}
__pyx_L16:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":677
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":678
* if free_doc:
* tree.xmlFreeDoc(result)
* result = NULL # <<<<<<<<<<<<<<
}
__pyx_L15:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":678
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":679
* tree.xmlFreeDoc(result)
* result = NULL
* context._raise_if_stored() # <<<<<<<<<<<<<<
*
* if result is NULL:
*/
- __pyx_t_11 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base._raise_if_stored(((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_v_context)); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L14;
}
__pyx_L14:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":680
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":681
* context._raise_if_stored()
*
* if result is NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_result == NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":681
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":682
*
* if result is NULL:
* if context is not None: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_t_3 != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":682
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":683
* if result is NULL:
* if context is not None:
* _raiseParseError(c_ctxt, filename, context._error_log) # <<<<<<<<<<<<<<
*/
__pyx_t_5 = ((PyObject *)__pyx_v_context->_error_log);
__Pyx_INCREF(__pyx_t_5);
- __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_5)); if (unlikely(__pyx_t_11 == 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_5)); if (unlikely(__pyx_t_11 == 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
goto __pyx_L18;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":684
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":685
* _raiseParseError(c_ctxt, filename, context._error_log)
* else:
* _raiseParseError(c_ctxt, filename, None) # <<<<<<<<<<<<<<
* else:
* if result.URL is NULL and filename is not None:
*/
- __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None)); if (unlikely(__pyx_t_11 == 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None)); if (unlikely(__pyx_t_11 == 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L18:;
goto __pyx_L17;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":686
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":687
* _raiseParseError(c_ctxt, filename, None)
* else:
* if result.URL is NULL and filename is not None: # <<<<<<<<<<<<<<
}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":687
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":688
* else:
* if result.URL is NULL and filename is not None:
* result.URL = tree.xmlStrdup(_xcstr(filename)) # <<<<<<<<<<<<<<
}
__pyx_L19:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":688
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":689
* if result.URL is NULL and filename is not None:
* result.URL = tree.xmlStrdup(_xcstr(filename))
* if result.encoding is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_result->encoding == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":689
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":690
* result.URL = tree.xmlStrdup(_xcstr(filename))
* if result.encoding is NULL:
* result.encoding = tree.xmlStrdup(<unsigned char*>"UTF-8") # <<<<<<<<<<<<<<
}
__pyx_L17:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":691
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":692
* result.encoding = tree.xmlStrdup(<unsigned char*>"UTF-8")
*
* if context._validator is not None and \ # <<<<<<<<<<<<<<
__pyx_t_1 = (((PyObject *)__pyx_v_context->_validator) != Py_None);
if ((__pyx_t_1 != 0)) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":692
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":693
*
* if context._validator is not None and \
* context._validator._add_default_attributes: # <<<<<<<<<<<<<<
}
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":696
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":697
* # support inserting default attributes during parse-time
* # validation
* context._validator.inject_default_attributes(result) # <<<<<<<<<<<<<<
}
__pyx_L21:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":698
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":699
* context._validator.inject_default_attributes(result)
*
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":634
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":635
* raise XMLSyntaxError(None, xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0)
*
* cdef xmlDoc* _handleParseResult(_ParserContext context, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":700
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":701
* return result
*
* cdef int _fixHtmlDictNames(tree.xmlDict* c_dict, xmlDoc* c_doc) nogil: # <<<<<<<<<<<<<<
int __pyx_t_1;
xmlNode *__pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":702
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":703
* cdef int _fixHtmlDictNames(tree.xmlDict* c_dict, xmlDoc* c_doc) nogil:
* cdef xmlNode* c_node
* if c_doc is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_doc == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":703
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":704
* cdef xmlNode* c_node
* if c_doc is NULL:
* return 0 # <<<<<<<<<<<<<<
* c_node = c_doc.children
- * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 0)
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
*/
__pyx_r = 0;
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":704
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":705
* if c_doc is NULL:
* return 0
* c_node = c_doc.children # <<<<<<<<<<<<<<
- * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 0)
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
* if c_node.type == tree.XML_ELEMENT_NODE:
*/
__pyx_t_2 = __pyx_v_c_doc->children;
__pyx_v_c_node = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":705
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":706
* return 0
* c_node = c_doc.children
- * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 0) # <<<<<<<<<<<<<<
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1) # <<<<<<<<<<<<<<
* if c_node.type == tree.XML_ELEMENT_NODE:
* if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
*/
- BEGIN_FOR_EACH_ELEMENT_FROM(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node, 0);
+ BEGIN_FOR_EACH_ELEMENT_FROM(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node, 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":706
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":707
* c_node = c_doc.children
- * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 0)
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
* if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<<
* if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
* return -1
__pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":707
- * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 0)
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":708
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
* if c_node.type == tree.XML_ELEMENT_NODE:
* if _fixHtmlDictNodeNames(c_dict, c_node) < 0: # <<<<<<<<<<<<<<
* return -1
__pyx_t_1 = ((__pyx_f_4lxml_5etree__fixHtmlDictNodeNames(__pyx_v_c_dict, __pyx_v_c_node) < 0) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":708
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":709
* if c_node.type == tree.XML_ELEMENT_NODE:
* if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
* return -1 # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":709
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":710
* if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
* return -1
* tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<<
*/
END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":710
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":711
* return -1
* tree.END_FOR_EACH_ELEMENT_FROM(c_node)
* return 0 # <<<<<<<<<<<<<<
*
- * cdef inline int _fixHtmlDictNodeNames(tree.xmlDict* c_dict,
+ * cdef int _fixHtmlDictSubtreeNames(tree.xmlDict* c_dict, xmlDoc* c_doc,
*/
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":700
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":701
* return result
*
* cdef int _fixHtmlDictNames(tree.xmlDict* c_dict, xmlDoc* c_doc) nogil: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":712
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":713
+ * return 0
+ *
+ * cdef int _fixHtmlDictSubtreeNames(tree.xmlDict* c_dict, xmlDoc* c_doc, # <<<<<<<<<<<<<<
+ * xmlNode* c_start_node) nogil:
+ * """
+ */
+
+static int __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(xmlDict *__pyx_v_c_dict, xmlDoc *__pyx_v_c_doc, xmlNode *__pyx_v_c_start_node) {
+ xmlNode *__pyx_v_c_node;
+ int __pyx_r;
+ int __pyx_t_1;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":720
+ * """
+ * cdef xmlNode* c_node
+ * if not c_doc: # <<<<<<<<<<<<<<
+ * return 0
+ * if not c_start_node:
+ */
+ __pyx_t_1 = ((!(__pyx_v_c_doc != 0)) != 0);
+ if (__pyx_t_1) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":721
+ * cdef xmlNode* c_node
+ * if not c_doc:
+ * return 0 # <<<<<<<<<<<<<<
+ * if not c_start_node:
+ * return _fixHtmlDictNames(c_dict, c_doc)
+ */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ }
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":722
+ * if not c_doc:
+ * return 0
+ * if not c_start_node: # <<<<<<<<<<<<<<
+ * return _fixHtmlDictNames(c_dict, c_doc)
+ * c_node = c_start_node
+ */
+ __pyx_t_1 = ((!(__pyx_v_c_start_node != 0)) != 0);
+ if (__pyx_t_1) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":723
+ * return 0
+ * if not c_start_node:
+ * return _fixHtmlDictNames(c_dict, c_doc) # <<<<<<<<<<<<<<
+ * c_node = c_start_node
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
+ */
+ __pyx_r = __pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_c_dict, __pyx_v_c_doc);
+ goto __pyx_L0;
+ }
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":724
+ * if not c_start_node:
+ * return _fixHtmlDictNames(c_dict, c_doc)
+ * c_node = c_start_node # <<<<<<<<<<<<<<
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
+ * if c_node.type == tree.XML_ELEMENT_NODE:
+ */
+ __pyx_v_c_node = __pyx_v_c_start_node;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":725
+ * return _fixHtmlDictNames(c_dict, c_doc)
+ * c_node = c_start_node
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1) # <<<<<<<<<<<<<<
+ * if c_node.type == tree.XML_ELEMENT_NODE:
+ * if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
+ */
+ BEGIN_FOR_EACH_ELEMENT_FROM(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node, 1);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":726
+ * c_node = c_start_node
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
+ * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<<
+ * if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
+ * return -1
+ */
+ __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0);
+ if (__pyx_t_1) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":727
+ * tree.BEGIN_FOR_EACH_ELEMENT_FROM(<xmlNode*>c_doc, c_node, 1)
+ * if c_node.type == tree.XML_ELEMENT_NODE:
+ * if _fixHtmlDictNodeNames(c_dict, c_node) < 0: # <<<<<<<<<<<<<<
+ * return -1
+ * tree.END_FOR_EACH_ELEMENT_FROM(c_node)
+ */
+ __pyx_t_1 = ((__pyx_f_4lxml_5etree__fixHtmlDictNodeNames(__pyx_v_c_dict, __pyx_v_c_node) < 0) != 0);
+ if (__pyx_t_1) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":728
+ * if c_node.type == tree.XML_ELEMENT_NODE:
+ * if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
+ * return -1 # <<<<<<<<<<<<<<
+ * tree.END_FOR_EACH_ELEMENT_FROM(c_node)
+ * return 0
+ */
+ __pyx_r = -1;
+ goto __pyx_L0;
+ }
+ goto __pyx_L5;
+ }
+ __pyx_L5:;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":729
+ * if _fixHtmlDictNodeNames(c_dict, c_node) < 0:
+ * return -1
+ * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":730
+ * return -1
+ * tree.END_FOR_EACH_ELEMENT_FROM(c_node)
+ * return 0 # <<<<<<<<<<<<<<
+ *
+ * cdef inline int _fixHtmlDictNodeNames(tree.xmlDict* c_dict,
+ */
+ __pyx_r = 0;
+ goto __pyx_L0;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":713
+ * return 0
+ *
+ * cdef int _fixHtmlDictSubtreeNames(tree.xmlDict* c_dict, xmlDoc* c_doc, # <<<<<<<<<<<<<<
+ * xmlNode* c_start_node) nogil:
+ * """
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ return __pyx_r;
+}
+
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":732
* return 0
*
* cdef inline int _fixHtmlDictNodeNames(tree.xmlDict* c_dict, # <<<<<<<<<<<<<<
int __pyx_t_1;
xmlNode *__pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":715
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":735
* xmlNode* c_node) nogil:
* cdef xmlNode* c_attr
* c_name = tree.xmlDictLookup(c_dict, c_node.name, -1) # <<<<<<<<<<<<<<
*/
__pyx_v_c_name = xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_node->name, -1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":716
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":736
* cdef xmlNode* c_attr
* c_name = tree.xmlDictLookup(c_dict, c_node.name, -1)
* if c_name is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_name == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":717
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":737
* c_name = tree.xmlDictLookup(c_dict, c_node.name, -1)
* if c_name is NULL:
* return -1 # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":718
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":738
* if c_name is NULL:
* return -1
* if c_name is not c_node.name: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_name != __pyx_v_c_node->name) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":719
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":739
* return -1
* if c_name is not c_node.name:
* tree.xmlFree(<char*>c_node.name) # <<<<<<<<<<<<<<
*/
xmlFree(((char *)__pyx_v_c_node->name));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":720
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":740
* if c_name is not c_node.name:
* tree.xmlFree(<char*>c_node.name)
* c_node.name = c_name # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":721
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":741
* tree.xmlFree(<char*>c_node.name)
* c_node.name = c_name
* c_attr = <xmlNode*>c_node.properties # <<<<<<<<<<<<<<
*/
__pyx_v_c_attr = ((xmlNode *)__pyx_v_c_node->properties);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":722
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":742
* c_node.name = c_name
* c_attr = <xmlNode*>c_node.properties
* while c_attr is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_attr != NULL) != 0);
if (!__pyx_t_1) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":723
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":743
* c_attr = <xmlNode*>c_node.properties
* while c_attr is not NULL:
* c_name = tree.xmlDictLookup(c_dict, c_attr.name, -1) # <<<<<<<<<<<<<<
*/
__pyx_v_c_name = xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_attr->name, -1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":724
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":744
* while c_attr is not NULL:
* c_name = tree.xmlDictLookup(c_dict, c_attr.name, -1)
* if c_name is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_name == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":725
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":745
* c_name = tree.xmlDictLookup(c_dict, c_attr.name, -1)
* if c_name is NULL:
* return -1 # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":726
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":746
* if c_name is NULL:
* return -1
* if c_name is not c_attr.name: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_name != __pyx_v_c_attr->name) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":727
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":747
* return -1
* if c_name is not c_attr.name:
* tree.xmlFree(<char*>c_attr.name) # <<<<<<<<<<<<<<
*/
xmlFree(((char *)__pyx_v_c_attr->name));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":728
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":748
* if c_name is not c_attr.name:
* tree.xmlFree(<char*>c_attr.name)
* c_attr.name = c_name # <<<<<<<<<<<<<<
}
__pyx_L8:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":729
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":749
* tree.xmlFree(<char*>c_attr.name)
* c_attr.name = c_name
* c_attr = c_attr.next # <<<<<<<<<<<<<<
__pyx_v_c_attr = __pyx_t_2;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":730
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":750
* c_attr.name = c_name
* c_attr = c_attr.next
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":712
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":732
* return 0
*
* cdef inline int _fixHtmlDictNodeNames(tree.xmlDict* c_dict, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":749
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":769
* cdef tuple _events_to_collect # (event_types, tag)
*
* def __init__(self, int parse_options, bint for_html, XMLSchema schema, # <<<<<<<<<<<<<<
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_for_html)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 1); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_schema)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 2); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_remove_comments)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 3); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_remove_pis)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 4); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_strip_cdata)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 5); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 6:
if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 6); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 7:
if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_encoding)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, 7); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
goto __pyx_L5_argtuple_error;
values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
}
- __pyx_v_parse_options = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_parse_options == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
- __pyx_v_for_html = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_for_html == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_parse_options = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_parse_options == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_v_for_html = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_for_html == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_v_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)values[2]);
__pyx_v_remove_comments = values[3];
__pyx_v_remove_pis = values[4];
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree._BaseParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_4lxml_5etree_11_BaseParser___init__(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_parse_options, __pyx_v_for_html, __pyx_v_schema, __pyx_v_remove_comments, __pyx_v_remove_pis, __pyx_v_strip_cdata, __pyx_v_target, __pyx_v_encoding);
/* function exit code */
xmlCharEncodingHandler *__pyx_v_enchandler;
int __pyx_r;
__Pyx_RefNannyDeclarations
- struct __pyx_obj_4lxml_5etree__BaseParser *__pyx_t_1 = NULL;
+ int __pyx_t_1;
int __pyx_t_2;
int __pyx_t_3;
- int __pyx_t_4;
- PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_4 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
__Pyx_INCREF(__pyx_v_encoding);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":753
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":773
* cdef tree.xmlCharEncodingHandler* enchandler
* cdef int c_encoding
* if not isinstance(self, (XMLParser, HTMLParser)): # <<<<<<<<<<<<<<
* raise TypeError, u"This class cannot be instantiated"
*
*/
- __Pyx_INCREF(((PyObject *)__pyx_v_self));
- __pyx_t_1 = __pyx_v_self;
- __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_t_1), ((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser));
- if (!__pyx_t_2) {
- __pyx_t_3 = __Pyx_TypeCheck(((PyObject *)__pyx_t_1), ((PyObject*)__pyx_ptype_4lxml_5etree_HTMLParser));
- __pyx_t_4 = __pyx_t_3;
+ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser));
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), ((PyObject*)__pyx_ptype_4lxml_5etree_HTMLParser));
+ __pyx_t_3 = __pyx_t_2;
} else {
- __pyx_t_4 = __pyx_t_2;
+ __pyx_t_3 = __pyx_t_1;
}
- __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
- __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
- if (__pyx_t_2) {
+ __pyx_t_1 = ((!(__pyx_t_3 != 0)) != 0);
+ if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":754
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":774
* cdef int c_encoding
* if not isinstance(self, (XMLParser, HTMLParser)):
* raise TypeError, u"This class cannot be instantiated" # <<<<<<<<<<<<<<
* self._parse_options = parse_options
*/
__Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_This_class_cannot_be_instantiate, 0, 0);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":756
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":776
* raise TypeError, u"This class cannot be instantiated"
*
* self._parse_options = parse_options # <<<<<<<<<<<<<<
*/
__pyx_v_self->_parse_options = __pyx_v_parse_options;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":757
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":777
*
* self._parse_options = parse_options
* self.target = target # <<<<<<<<<<<<<<
__Pyx_DECREF(__pyx_v_self->target);
__pyx_v_self->target = __pyx_v_target;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":758
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":778
* self._parse_options = parse_options
* self.target = target
* self._for_html = for_html # <<<<<<<<<<<<<<
*/
__pyx_v_self->_for_html = __pyx_v_for_html;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":759
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":779
* self.target = target
* self._for_html = for_html
* self._remove_comments = remove_comments # <<<<<<<<<<<<<<
* self._remove_pis = remove_pis
* self._strip_cdata = strip_cdata
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_remove_comments); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->_remove_comments = __pyx_t_2;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_comments); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_self->_remove_comments = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":760
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":780
* self._for_html = for_html
* self._remove_comments = remove_comments
* self._remove_pis = remove_pis # <<<<<<<<<<<<<<
* self._strip_cdata = strip_cdata
* self._schema = schema
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_remove_pis); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->_remove_pis = __pyx_t_2;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_pis); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_self->_remove_pis = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":761
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":781
* self._remove_comments = remove_comments
* self._remove_pis = remove_pis
* self._strip_cdata = strip_cdata # <<<<<<<<<<<<<<
* self._schema = schema
*
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_strip_cdata); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_self->_strip_cdata = __pyx_t_2;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_strip_cdata); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_self->_strip_cdata = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":762
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":782
* self._remove_pis = remove_pis
* self._strip_cdata = strip_cdata
* self._schema = schema # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->_schema));
__pyx_v_self->_schema = __pyx_v_schema;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":764
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":784
* self._schema = schema
*
* self._resolvers = _ResolverRegistry() # <<<<<<<<<<<<<<
*
* if encoding is None:
*/
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ResolverRegistry)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ResolverRegistry)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_v_self->_resolvers);
__Pyx_DECREF(((PyObject *)__pyx_v_self->_resolvers));
- __pyx_v_self->_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_5);
- __pyx_t_5 = 0;
+ __pyx_v_self->_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_4);
+ __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":766
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":786
* self._resolvers = _ResolverRegistry()
*
* if encoding is None: # <<<<<<<<<<<<<<
* self._default_encoding = None
* else:
*/
- __pyx_t_2 = (__pyx_v_encoding == Py_None);
- __pyx_t_4 = (__pyx_t_2 != 0);
- if (__pyx_t_4) {
+ __pyx_t_1 = (__pyx_v_encoding == Py_None);
+ __pyx_t_3 = (__pyx_t_1 != 0);
+ if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":767
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":787
*
* if encoding is None:
* self._default_encoding = None # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":769
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":789
* self._default_encoding = None
* else:
* encoding = _utf8(encoding) # <<<<<<<<<<<<<<
* enchandler = tree.xmlFindCharEncodingHandler(_cstr(encoding))
* if enchandler is NULL:
*/
- __pyx_t_5 = __pyx_f_4lxml_5etree__utf8(__pyx_v_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_5);
- __pyx_t_5 = 0;
+ __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_4);
+ __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":770
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":790
* else:
* encoding = _utf8(encoding)
* enchandler = tree.xmlFindCharEncodingHandler(_cstr(encoding)) # <<<<<<<<<<<<<<
*/
__pyx_v_enchandler = xmlFindCharEncodingHandler(PyBytes_AS_STRING(__pyx_v_encoding));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":771
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":791
* encoding = _utf8(encoding)
* enchandler = tree.xmlFindCharEncodingHandler(_cstr(encoding))
* if enchandler is NULL: # <<<<<<<<<<<<<<
* raise LookupError, u"unknown encoding: '%s'" % encoding
* tree.xmlCharEncCloseFunc(enchandler)
*/
- __pyx_t_4 = ((__pyx_v_enchandler == NULL) != 0);
- if (__pyx_t_4) {
+ __pyx_t_3 = ((__pyx_v_enchandler == NULL) != 0);
+ if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":772
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":792
* enchandler = tree.xmlFindCharEncodingHandler(_cstr(encoding))
* if enchandler is NULL:
* raise LookupError, u"unknown encoding: '%s'" % encoding # <<<<<<<<<<<<<<
* tree.xmlCharEncCloseFunc(enchandler)
* self._default_encoding = encoding
*/
- __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_unknown_encoding_s, __pyx_v_encoding); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_Raise(__pyx_builtin_LookupError, __pyx_t_5, 0, 0);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_unknown_encoding_s, __pyx_v_encoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_builtin_LookupError, __pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":773
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":793
* if enchandler is NULL:
* raise LookupError, u"unknown encoding: '%s'" % encoding
* tree.xmlCharEncCloseFunc(enchandler) # <<<<<<<<<<<<<<
*/
xmlCharEncCloseFunc(__pyx_v_enchandler);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":774
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":794
* raise LookupError, u"unknown encoding: '%s'" % encoding
* tree.xmlCharEncCloseFunc(enchandler)
* self._default_encoding = encoding # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":749
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":769
* cdef tuple _events_to_collect # (event_types, tag)
*
* def __init__(self, int parse_options, bint for_html, XMLSchema schema, # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- __Pyx_XDECREF(((PyObject *)__pyx_t_1));
- __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("lxml.etree._BaseParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":776
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":796
* self._default_encoding = encoding
*
* cdef _setBaseURL(self, base_url): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_setBaseURL", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":777
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":797
*
* cdef _setBaseURL(self, base_url):
* self._filename = _encodeFilename(base_url) # <<<<<<<<<<<<<<
*
* cdef _collectEvents(self, event_types, tag):
*/
- __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_base_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_base_url); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->_filename);
__Pyx_DECREF(__pyx_v_self->_filename);
__pyx_v_self->_filename = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":776
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":796
* self._default_encoding = encoding
*
* cdef _setBaseURL(self, base_url): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":779
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":799
* self._filename = _encodeFilename(base_url)
*
* cdef _collectEvents(self, event_types, tag): # <<<<<<<<<<<<<<
__Pyx_RefNannySetupContext("_collectEvents", 0);
__Pyx_INCREF(__pyx_v_event_types);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":780
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":800
*
* cdef _collectEvents(self, event_types, tag):
* if event_types is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":781
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":801
* cdef _collectEvents(self, event_types, tag):
* if event_types is None:
* event_types = () # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":783
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":803
* event_types = ()
* else:
* event_types = tuple(set(event_types)) # <<<<<<<<<<<<<<
* _buildParseEventFilter(event_types) # purely for validation
* self._events_to_collect = (event_types, tag)
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_event_types);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_event_types);
__Pyx_GIVEREF(__pyx_v_event_types);
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PySet_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_event_types, __pyx_t_4);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":784
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":804
* else:
* event_types = tuple(set(event_types))
* _buildParseEventFilter(event_types) # purely for validation # <<<<<<<<<<<<<<
* self._events_to_collect = (event_types, tag)
*
*/
- __pyx_t_5 = __pyx_f_4lxml_5etree__buildParseEventFilter(__pyx_v_event_types); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __pyx_f_4lxml_5etree__buildParseEventFilter(__pyx_v_event_types); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":785
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":805
* event_types = tuple(set(event_types))
* _buildParseEventFilter(event_types) # purely for validation
* self._events_to_collect = (event_types, tag) # <<<<<<<<<<<<<<
*
* cdef _ParserContext _getParserContext(self):
*/
- __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_event_types);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_event_types);
__pyx_v_self->_events_to_collect = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":779
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":799
* self._filename = _encodeFilename(base_url)
*
* cdef _collectEvents(self, event_types, tag): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":787
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":807
* self._events_to_collect = (event_types, tag)
*
* cdef _ParserContext _getParserContext(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_getParserContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":789
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":809
* cdef _ParserContext _getParserContext(self):
* cdef xmlparser.xmlParserCtxt* pctxt
* if self._parser_context is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":790
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":810
* cdef xmlparser.xmlParserCtxt* pctxt
* if self._parser_context is None:
* self._parser_context = self._createContext(self.target, None) # <<<<<<<<<<<<<<
*/
__pyx_t_3 = __pyx_v_self->target;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_createContext(__pyx_v_self, __pyx_t_3, Py_None)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_createContext(__pyx_v_self, __pyx_t_3, Py_None)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_4);
__pyx_v_self->_parser_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":791
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":811
* if self._parser_context is None:
* self._parser_context = self._createContext(self.target, None)
* if self._schema is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":793
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":813
* if self._schema is not None:
* self._parser_context._validator = \
* self._schema._newSaxValidator( # <<<<<<<<<<<<<<
* self._parse_options & xmlparser.XML_PARSE_DTDATTR)
* pctxt = self._newParserCtxt()
*/
- __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *)__pyx_v_self->_schema->__pyx_base.__pyx_vtab)->_newSaxValidator(__pyx_v_self->_schema, (__pyx_v_self->_parse_options & XML_PARSE_DTDATTR))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *)__pyx_v_self->_schema->__pyx_base.__pyx_vtab)->_newSaxValidator(__pyx_v_self->_schema, (__pyx_v_self->_parse_options & XML_PARSE_DTDATTR))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":792
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":812
* self._parser_context = self._createContext(self.target, None)
* if self._schema is not None:
* self._parser_context._validator = \ # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":795
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":815
* self._schema._newSaxValidator(
* self._parse_options & xmlparser.XML_PARSE_DTDATTR)
* pctxt = self._newParserCtxt() # <<<<<<<<<<<<<<
* _initParserContext(self._parser_context, self._resolvers, pctxt)
* if self._remove_comments:
*/
- __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_newParserCtxt(__pyx_v_self); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_newParserCtxt(__pyx_v_self); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_pctxt = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":796
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":816
* self._parse_options & xmlparser.XML_PARSE_DTDATTR)
* pctxt = self._newParserCtxt()
* _initParserContext(self._parser_context, self._resolvers, pctxt) # <<<<<<<<<<<<<<
__Pyx_INCREF(__pyx_t_4);
__pyx_t_3 = ((PyObject *)__pyx_v_self->_resolvers);
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_6 = __pyx_f_4lxml_5etree__initParserContext(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_4), ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_3), __pyx_v_pctxt); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __pyx_f_4lxml_5etree__initParserContext(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_4), ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_3), __pyx_v_pctxt); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":797
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":817
* pctxt = self._newParserCtxt()
* _initParserContext(self._parser_context, self._resolvers, pctxt)
* if self._remove_comments: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_remove_comments != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":798
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":818
* _initParserContext(self._parser_context, self._resolvers, pctxt)
* if self._remove_comments:
* pctxt.sax.comment = NULL # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":799
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":819
* if self._remove_comments:
* pctxt.sax.comment = NULL
* if self._remove_pis: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_remove_pis != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":800
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":820
* pctxt.sax.comment = NULL
* if self._remove_pis:
* pctxt.sax.processingInstruction = NULL # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":801
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":821
* if self._remove_pis:
* pctxt.sax.processingInstruction = NULL
* if self._strip_cdata: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_strip_cdata != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":803
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":823
* if self._strip_cdata:
* # hard switch-off for CDATA nodes => makes them plain text
* pctxt.sax.cdataBlock = NULL # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":804
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":824
* # hard switch-off for CDATA nodes => makes them plain text
* pctxt.sax.cdataBlock = NULL
* return self._parser_context # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_self->_parser_context;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":787
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":807
* self._events_to_collect = (event_types, tag)
*
* cdef _ParserContext _getParserContext(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":806
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":826
* return self._parser_context
*
* cdef _ParserContext _getPushParserContext(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_getPushParserContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":808
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":828
* cdef _ParserContext _getPushParserContext(self):
* cdef xmlparser.xmlParserCtxt* pctxt
* if self._push_parser_context is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":810
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":830
* if self._push_parser_context is None:
* self._push_parser_context = self._createContext(
* self.target, self._events_to_collect) # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_self->_events_to_collect;
__Pyx_INCREF(__pyx_t_4);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":809
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":829
* cdef xmlparser.xmlParserCtxt* pctxt
* if self._push_parser_context is None:
* self._push_parser_context = self._createContext( # <<<<<<<<<<<<<<
* self.target, self._events_to_collect)
* if self._schema is not None:
*/
- __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_createContext(__pyx_v_self, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_createContext(__pyx_v_self, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 829; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_self->_push_parser_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_5);
__pyx_t_5 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":811
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":831
* self._push_parser_context = self._createContext(
* self.target, self._events_to_collect)
* if self._schema is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":813
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":833
* if self._schema is not None:
* self._push_parser_context._validator = \
* self._schema._newSaxValidator( # <<<<<<<<<<<<<<
* self._parse_options & xmlparser.XML_PARSE_DTDATTR)
* pctxt = self._newPushParserCtxt()
*/
- __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *)__pyx_v_self->_schema->__pyx_base.__pyx_vtab)->_newSaxValidator(__pyx_v_self->_schema, (__pyx_v_self->_parse_options & XML_PARSE_DTDATTR))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLSchema *)__pyx_v_self->_schema->__pyx_base.__pyx_vtab)->_newSaxValidator(__pyx_v_self->_schema, (__pyx_v_self->_parse_options & XML_PARSE_DTDATTR))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":812
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":832
* self.target, self._events_to_collect)
* if self._schema is not None:
* self._push_parser_context._validator = \ # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":815
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":835
* self._schema._newSaxValidator(
* self._parse_options & xmlparser.XML_PARSE_DTDATTR)
* pctxt = self._newPushParserCtxt() # <<<<<<<<<<<<<<
* _initParserContext(
* self._push_parser_context, self._resolvers, pctxt)
*/
- __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_newPushParserCtxt(__pyx_v_self); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_newPushParserCtxt(__pyx_v_self); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_pctxt = __pyx_t_6;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":817
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":837
* pctxt = self._newPushParserCtxt()
* _initParserContext(
* self._push_parser_context, self._resolvers, pctxt) # <<<<<<<<<<<<<<
__pyx_t_4 = ((PyObject *)__pyx_v_self->_resolvers);
__Pyx_INCREF(__pyx_t_4);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":816
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":836
* self._parse_options & xmlparser.XML_PARSE_DTDATTR)
* pctxt = self._newPushParserCtxt()
* _initParserContext( # <<<<<<<<<<<<<<
* self._push_parser_context, self._resolvers, pctxt)
* if self._remove_comments:
*/
- __pyx_t_3 = __pyx_f_4lxml_5etree__initParserContext(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_5), ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_4), __pyx_v_pctxt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4lxml_5etree__initParserContext(((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_5), ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_4), __pyx_v_pctxt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":818
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":838
* _initParserContext(
* self._push_parser_context, self._resolvers, pctxt)
* if self._remove_comments: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_remove_comments != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":819
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":839
* self._push_parser_context, self._resolvers, pctxt)
* if self._remove_comments:
* pctxt.sax.comment = NULL # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":820
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":840
* if self._remove_comments:
* pctxt.sax.comment = NULL
* if self._remove_pis: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_remove_pis != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":821
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":841
* pctxt.sax.comment = NULL
* if self._remove_pis:
* pctxt.sax.processingInstruction = NULL # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":822
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":842
* if self._remove_pis:
* pctxt.sax.processingInstruction = NULL
* if self._strip_cdata: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_strip_cdata != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":824
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":844
* if self._strip_cdata:
* # hard switch-off for CDATA nodes => makes them plain text
* pctxt.sax.cdataBlock = NULL # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":825
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":845
* # hard switch-off for CDATA nodes => makes them plain text
* pctxt.sax.cdataBlock = NULL
* return self._push_parser_context # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_self->_push_parser_context;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":806
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":826
* return self._parser_context
*
* cdef _ParserContext _getPushParserContext(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":827
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":847
* return self._push_parser_context
*
* cdef _ParserContext _createContext(self, target, events_to_collect): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_createContext", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":829
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":849
* cdef _ParserContext _createContext(self, target, events_to_collect):
* cdef _SaxParserContext sax_context
* if target is not None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":830
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":850
* cdef _SaxParserContext sax_context
* if target is not None:
* sax_context = _TargetParserContext(self) # <<<<<<<<<<<<<<
* (<_TargetParserContext>sax_context)._setTarget(target)
* elif events_to_collect:
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__TargetParserContext)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__TargetParserContext)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_sax_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":831
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":851
* if target is not None:
* sax_context = _TargetParserContext(self)
* (<_TargetParserContext>sax_context)._setTarget(target) # <<<<<<<<<<<<<<
* elif events_to_collect:
* sax_context = _SaxParserContext(self)
*/
- __pyx_t_5 = __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(((struct __pyx_obj_4lxml_5etree__TargetParserContext *)__pyx_v_sax_context), __pyx_v_target); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __pyx_f_4lxml_5etree_20_TargetParserContext__setTarget(((struct __pyx_obj_4lxml_5etree__TargetParserContext *)__pyx_v_sax_context), __pyx_v_target); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L3;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":832
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":852
* sax_context = _TargetParserContext(self)
* (<_TargetParserContext>sax_context)._setTarget(target)
* elif events_to_collect: # <<<<<<<<<<<<<<
* sax_context = _SaxParserContext(self)
* else:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_events_to_collect); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_events_to_collect); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":833
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":853
* (<_TargetParserContext>sax_context)._setTarget(target)
* elif events_to_collect:
* sax_context = _SaxParserContext(self) # <<<<<<<<<<<<<<
* else:
* # nothing special to configure
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__SaxParserContext)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__SaxParserContext)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_sax_context = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_3);
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":836
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":856
* else:
* # nothing special to configure
* return _ParserContext() # <<<<<<<<<<<<<<
* events, tag = events_to_collect
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParserContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParserContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_3);
__pyx_t_3 = 0;
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":837
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":857
* # nothing special to configure
* return _ParserContext()
* if events_to_collect: # <<<<<<<<<<<<<<
* events, tag = events_to_collect
* sax_context._setEventFilter(events, tag)
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_events_to_collect); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_events_to_collect); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":838
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":858
* return _ParserContext()
* if events_to_collect:
* events, tag = events_to_collect # <<<<<<<<<<<<<<
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
__Pyx_INCREF(__pyx_t_3);
__Pyx_INCREF(__pyx_t_4);
#else
- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
#endif
} else {
Py_ssize_t index = -1;
- __pyx_t_6 = PyObject_GetIter(__pyx_v_events_to_collect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyObject_GetIter(__pyx_v_events_to_collect); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_3);
index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
__Pyx_GOTREF(__pyx_t_4);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_7 = NULL;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L6_unpacking_done;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_7 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L6_unpacking_done:;
}
__pyx_v_events = __pyx_t_3;
__pyx_v_tag = __pyx_t_4;
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":839
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":859
* if events_to_collect:
* events, tag = events_to_collect
* sax_context._setEventFilter(events, tag) # <<<<<<<<<<<<<<
* return sax_context
*
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_sax_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_setEventFilter(__pyx_v_sax_context, __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)__pyx_v_sax_context->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->_setEventFilter(__pyx_v_sax_context, __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
goto __pyx_L4;
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":840
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":860
* events, tag = events_to_collect
* sax_context._setEventFilter(events, tag)
* return sax_context # <<<<<<<<<<<<<<
__pyx_r = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_v_sax_context);
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":827
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":847
* return self._push_parser_context
*
* cdef _ParserContext _createContext(self, target, events_to_collect): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":842
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":862
* return sax_context
*
* cdef int _registerHtmlErrorHandler(self, xmlparser.xmlParserCtxt* c_ctxt) except -1: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_registerHtmlErrorHandler", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":843
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":863
*
* cdef int _registerHtmlErrorHandler(self, xmlparser.xmlParserCtxt* c_ctxt) except -1:
* cdef xmlparser.xmlSAXHandler* sax = c_ctxt.sax # <<<<<<<<<<<<<<
__pyx_t_1 = __pyx_v_c_ctxt->sax;
__pyx_v_sax = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":844
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":864
* cdef int _registerHtmlErrorHandler(self, xmlparser.xmlParserCtxt* c_ctxt) except -1:
* cdef xmlparser.xmlSAXHandler* sax = c_ctxt.sax
* if sax is not NULL and sax.initialized and sax.initialized != xmlparser.XML_SAX2_MAGIC: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":846
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":866
* if sax is not NULL and sax.initialized and sax.initialized != xmlparser.XML_SAX2_MAGIC:
* # need to extend SAX1 context to SAX2 to get proper error reports
* if <xmlparser.xmlSAXHandlerV1*>sax is &htmlparser.htmlDefaultSAXHandler: # <<<<<<<<<<<<<<
__pyx_t_3 = ((((xmlSAXHandlerV1 *)__pyx_v_sax) == (&htmlDefaultSAXHandler)) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":847
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":867
* # need to extend SAX1 context to SAX2 to get proper error reports
* if <xmlparser.xmlSAXHandlerV1*>sax is &htmlparser.htmlDefaultSAXHandler:
* sax = <xmlparser.xmlSAXHandler*> stdlib.malloc(sizeof(xmlparser.xmlSAXHandler)) # <<<<<<<<<<<<<<
*/
__pyx_v_sax = ((xmlSAXHandler *)malloc((sizeof(xmlSAXHandler))));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":848
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":868
* if <xmlparser.xmlSAXHandlerV1*>sax is &htmlparser.htmlDefaultSAXHandler:
* sax = <xmlparser.xmlSAXHandler*> stdlib.malloc(sizeof(xmlparser.xmlSAXHandler))
* if sax is NULL: # <<<<<<<<<<<<<<
__pyx_t_3 = ((__pyx_v_sax == NULL) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":849
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":869
* sax = <xmlparser.xmlSAXHandler*> stdlib.malloc(sizeof(xmlparser.xmlSAXHandler))
* if sax is NULL:
* raise MemoryError() # <<<<<<<<<<<<<<
* cstring_h.memcpy(sax, &htmlparser.htmlDefaultSAXHandler,
* sizeof(htmlparser.htmlDefaultSAXHandler))
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":850
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":870
* if sax is NULL:
* raise MemoryError()
* cstring_h.memcpy(sax, &htmlparser.htmlDefaultSAXHandler, # <<<<<<<<<<<<<<
*/
memcpy(__pyx_v_sax, (&htmlDefaultSAXHandler), (sizeof(htmlDefaultSAXHandler)));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":852
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":872
* cstring_h.memcpy(sax, &htmlparser.htmlDefaultSAXHandler,
* sizeof(htmlparser.htmlDefaultSAXHandler))
* c_ctxt.sax = sax # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":853
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":873
* sizeof(htmlparser.htmlDefaultSAXHandler))
* c_ctxt.sax = sax
* sax.initialized = xmlparser.XML_SAX2_MAGIC # <<<<<<<<<<<<<<
*/
__pyx_v_sax->initialized = XML_SAX2_MAGIC;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":854
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":874
* c_ctxt.sax = sax
* sax.initialized = xmlparser.XML_SAX2_MAGIC
* sax.serror = _receiveParserError # <<<<<<<<<<<<<<
*/
__pyx_v_sax->serror = __pyx_f_4lxml_5etree__receiveParserError;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":855
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":875
* sax.initialized = xmlparser.XML_SAX2_MAGIC
* sax.serror = _receiveParserError
* sax.startElementNs = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_sax->startElementNs = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":856
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":876
* sax.serror = _receiveParserError
* sax.startElementNs = NULL
* sax.endElementNs = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_sax->endElementNs = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":857
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":877
* sax.startElementNs = NULL
* sax.endElementNs = NULL
* sax._private = NULL # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":858
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":878
* sax.endElementNs = NULL
* sax._private = NULL
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":842
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":862
* return sax_context
*
* cdef int _registerHtmlErrorHandler(self, xmlparser.xmlParserCtxt* c_ctxt) except -1: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":860
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":880
* return 0
*
* cdef xmlparser.xmlParserCtxt* _newParserCtxt(self) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_newParserCtxt", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":862
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":882
* cdef xmlparser.xmlParserCtxt* _newParserCtxt(self) except NULL:
* cdef xmlparser.xmlParserCtxt* c_ctxt
* if self._for_html: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_self->_for_html != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":863
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":883
* cdef xmlparser.xmlParserCtxt* c_ctxt
* if self._for_html:
* c_ctxt = htmlparser.htmlCreateMemoryParserCtxt('dummy', 5) # <<<<<<<<<<<<<<
*/
__pyx_v_c_ctxt = htmlCreateMemoryParserCtxt(__pyx_k_dummy, 5);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":864
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":884
* if self._for_html:
* c_ctxt = htmlparser.htmlCreateMemoryParserCtxt('dummy', 5)
* if c_ctxt is not NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ctxt != NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":865
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":885
* c_ctxt = htmlparser.htmlCreateMemoryParserCtxt('dummy', 5)
* if c_ctxt is not NULL:
* self._registerHtmlErrorHandler(c_ctxt) # <<<<<<<<<<<<<<
* else:
* c_ctxt = xmlparser.xmlNewParserCtxt()
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_registerHtmlErrorHandler(__pyx_v_self, __pyx_v_c_ctxt); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 865; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_registerHtmlErrorHandler(__pyx_v_self, __pyx_v_c_ctxt); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L4;
}
__pyx_L4:;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":867
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":887
* self._registerHtmlErrorHandler(c_ctxt)
* else:
* c_ctxt = xmlparser.xmlNewParserCtxt() # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":868
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":888
* else:
* c_ctxt = xmlparser.xmlNewParserCtxt()
* if c_ctxt is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_ctxt == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":869
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":889
* c_ctxt = xmlparser.xmlNewParserCtxt()
* if c_ctxt is NULL:
* raise MemoryError # <<<<<<<<<<<<<<
* return c_ctxt
*
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":870
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":890
* if c_ctxt is NULL:
* raise MemoryError
* return c_ctxt # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_c_ctxt;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":860
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":880
* return 0
*
* cdef xmlparser.xmlParserCtxt* _newParserCtxt(self) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":872
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":892
* return c_ctxt
*
* cdef xmlparser.xmlParserCtxt* _newPushParserCtxt(self) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_newPushParserCtxt", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":874
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":894
* cdef xmlparser.xmlParserCtxt* _newPushParserCtxt(self) except NULL:
* cdef xmlparser.xmlParserCtxt* c_ctxt
* cdef char* c_filename = _cstr(self._filename) if self._filename is not None else NULL # <<<<<<<<<<<<<<
}
__pyx_v_c_filename = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":875
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":895
* cdef xmlparser.xmlParserCtxt* c_ctxt
* cdef char* c_filename = _cstr(self._filename) if self._filename is not None else NULL
* if self._for_html: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_self->_for_html != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":876
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":896
* cdef char* c_filename = _cstr(self._filename) if self._filename is not None else NULL
* if self._for_html:
* c_ctxt = htmlparser.htmlCreatePushParserCtxt( # <<<<<<<<<<<<<<
*/
__pyx_v_c_ctxt = htmlCreatePushParserCtxt(NULL, NULL, NULL, 0, __pyx_v_c_filename, XML_CHAR_ENCODING_NONE);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":878
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":898
* c_ctxt = htmlparser.htmlCreatePushParserCtxt(
* NULL, NULL, NULL, 0, c_filename, tree.XML_CHAR_ENCODING_NONE)
* if c_ctxt is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_ctxt != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":879
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":899
* NULL, NULL, NULL, 0, c_filename, tree.XML_CHAR_ENCODING_NONE)
* if c_ctxt is not NULL:
* self._registerHtmlErrorHandler(c_ctxt) # <<<<<<<<<<<<<<
* htmlparser.htmlCtxtUseOptions(c_ctxt, self._parse_options)
* else:
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_registerHtmlErrorHandler(__pyx_v_self, __pyx_v_c_ctxt); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_registerHtmlErrorHandler(__pyx_v_self, __pyx_v_c_ctxt); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":880
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":900
* if c_ctxt is not NULL:
* self._registerHtmlErrorHandler(c_ctxt)
* htmlparser.htmlCtxtUseOptions(c_ctxt, self._parse_options) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":882
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":902
* htmlparser.htmlCtxtUseOptions(c_ctxt, self._parse_options)
* else:
* c_ctxt = xmlparser.xmlCreatePushParserCtxt( # <<<<<<<<<<<<<<
*/
__pyx_v_c_ctxt = xmlCreatePushParserCtxt(NULL, NULL, NULL, 0, __pyx_v_c_filename);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":884
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":904
* c_ctxt = xmlparser.xmlCreatePushParserCtxt(
* NULL, NULL, NULL, 0, c_filename)
* if c_ctxt is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_ctxt != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":885
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":905
* NULL, NULL, NULL, 0, c_filename)
* if c_ctxt is not NULL:
* xmlparser.xmlCtxtUseOptions(c_ctxt, self._parse_options) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":886
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":906
* if c_ctxt is not NULL:
* xmlparser.xmlCtxtUseOptions(c_ctxt, self._parse_options)
* if c_ctxt is NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_c_ctxt == NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":887
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":907
* xmlparser.xmlCtxtUseOptions(c_ctxt, self._parse_options)
* if c_ctxt is NULL:
* raise MemoryError() # <<<<<<<<<<<<<<
* return c_ctxt
*
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":888
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":908
* if c_ctxt is NULL:
* raise MemoryError()
* return c_ctxt # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_c_ctxt;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":872
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":892
* return c_ctxt
*
* cdef xmlparser.xmlParserCtxt* _newPushParserCtxt(self) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":893
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":913
* u"""The error log of the last parser run.
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":895
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":915
* def __get__(self):
* cdef _ParserContext context
* context = self._getParserContext() # <<<<<<<<<<<<<<
* return context._error_log.copy()
*
*/
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":896
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":916
* cdef _ParserContext context
* context = self._getParserContext()
* return context._error_log.copy() # <<<<<<<<<<<<<<
* property resolvers:
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_context->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_context->_error_log), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_context->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_context->_error_log), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":893
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":913
* u"""The error log of the last parser run.
* """
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":900
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":920
* property resolvers:
* u"The custom resolver registry of this parser."
* def __get__(self): # <<<<<<<<<<<<<<
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":901
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":921
* u"The custom resolver registry of this parser."
* def __get__(self):
* return self._resolvers # <<<<<<<<<<<<<<
__pyx_r = ((PyObject *)__pyx_v_self->_resolvers);
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":900
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":920
* property resolvers:
* u"The custom resolver registry of this parser."
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":905
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":925
* property version:
* u"The version of the underlying XML parser."
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":906
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":926
* u"The version of the underlying XML parser."
* def __get__(self):
* return u"libxml2 %d.%d.%d" % LIBXML_VERSION # <<<<<<<<<<<<<<
* def setElementClassLookup(self, ElementClassLookup lookup = None):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LIBXML_VERSION); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LIBXML_VERSION); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_libxml2_d_d_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_libxml2_d_d_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":905
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":925
* property version:
* u"The version of the underlying XML parser."
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":908
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":928
* return u"libxml2 %d.%d.%d" % LIBXML_VERSION
*
* def setElementClassLookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setElementClassLookup") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setElementClassLookup") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("setElementClassLookup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("setElementClassLookup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree._BaseParser.setElementClassLookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lookup), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "lookup", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lookup), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "lookup", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_4lxml_5etree_11_BaseParser_2setElementClassLookup(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_lookup);
/* function exit code */
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("setElementClassLookup", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":910
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":930
* def setElementClassLookup(self, ElementClassLookup lookup = None):
* u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead."
* self.set_element_class_lookup(lookup) # <<<<<<<<<<<<<<
*
* def set_element_class_lookup(self, ElementClassLookup lookup = None):
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_lookup));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_lookup));
__Pyx_GIVEREF(((PyObject *)__pyx_v_lookup));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":908
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":928
* return u"libxml2 %d.%d.%d" % LIBXML_VERSION
*
* def setElementClassLookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":912
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":932
* self.set_element_class_lookup(lookup)
*
* def set_element_class_lookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_element_class_lookup") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_element_class_lookup") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("set_element_class_lookup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("set_element_class_lookup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree._BaseParser.set_element_class_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lookup), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "lookup", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lookup), __pyx_ptype_4lxml_5etree_ElementClassLookup, 1, "lookup", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_4lxml_5etree_11_BaseParser_4set_element_class_lookup(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_lookup);
/* function exit code */
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("set_element_class_lookup", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":919
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":939
* Reset it by passing None or nothing.
* """
* self._class_lookup = lookup # <<<<<<<<<<<<<<
__Pyx_DECREF(((PyObject *)__pyx_v_self->_class_lookup));
__pyx_v_self->_class_lookup = __pyx_v_lookup;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":912
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":932
* self.set_element_class_lookup(lookup)
*
* def set_element_class_lookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":921
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":941
* self._class_lookup = lookup
*
* cdef _BaseParser _copy(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_copy", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":924
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":944
* u"Create a new parser with the same configuration."
* cdef _BaseParser parser
* parser = self.__class__() # <<<<<<<<<<<<<<
* parser._parse_options = self._parse_options
* parser._for_html = self._for_html
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__BaseParser))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__BaseParser))))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":925
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":945
* cdef _BaseParser parser
* parser = self.__class__()
* parser._parse_options = self._parse_options # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_self->_parse_options;
__pyx_v_parser->_parse_options = __pyx_t_3;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":926
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":946
* parser = self.__class__()
* parser._parse_options = self._parse_options
* parser._for_html = self._for_html # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_self->_for_html;
__pyx_v_parser->_for_html = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":927
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":947
* parser._parse_options = self._parse_options
* parser._for_html = self._for_html
* parser._remove_comments = self._remove_comments # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_self->_remove_comments;
__pyx_v_parser->_remove_comments = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":928
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":948
* parser._for_html = self._for_html
* parser._remove_comments = self._remove_comments
* parser._remove_pis = self._remove_pis # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_self->_remove_pis;
__pyx_v_parser->_remove_pis = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":929
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":949
* parser._remove_comments = self._remove_comments
* parser._remove_pis = self._remove_pis
* parser._strip_cdata = self._strip_cdata # <<<<<<<<<<<<<<
__pyx_t_4 = __pyx_v_self->_strip_cdata;
__pyx_v_parser->_strip_cdata = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":930
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":950
* parser._remove_pis = self._remove_pis
* parser._strip_cdata = self._strip_cdata
* parser._filename = self._filename # <<<<<<<<<<<<<<
__pyx_v_parser->_filename = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":931
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":951
* parser._strip_cdata = self._strip_cdata
* parser._filename = self._filename
* parser._resolvers = self._resolvers # <<<<<<<<<<<<<<
__pyx_v_parser->_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":932
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":952
* parser._filename = self._filename
* parser._resolvers = self._resolvers
* parser.target = self.target # <<<<<<<<<<<<<<
__pyx_v_parser->target = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":933
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":953
* parser._resolvers = self._resolvers
* parser.target = self.target
* parser._class_lookup = self._class_lookup # <<<<<<<<<<<<<<
__pyx_v_parser->_class_lookup = ((struct LxmlElementClassLookup *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":934
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":954
* parser.target = self.target
* parser._class_lookup = self._class_lookup
* parser._default_encoding = self._default_encoding # <<<<<<<<<<<<<<
__pyx_v_parser->_default_encoding = __pyx_t_2;
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":935
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":955
* parser._class_lookup = self._class_lookup
* parser._default_encoding = self._default_encoding
* parser._schema = self._schema # <<<<<<<<<<<<<<
__pyx_v_parser->_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":936
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":956
* parser._default_encoding = self._default_encoding
* parser._schema = self._schema
* parser._events_to_collect = self._events_to_collect # <<<<<<<<<<<<<<
__pyx_v_parser->_events_to_collect = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":937
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":957
* parser._schema = self._schema
* parser._events_to_collect = self._events_to_collect
* return parser # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_parser;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":921
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":941
* self._class_lookup = lookup
*
* cdef _BaseParser _copy(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":939
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":959
* return parser
*
* def copy(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("copy", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":944
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":964
* Create a new parser with the same configuration.
* """
* return self._copy() # <<<<<<<<<<<<<<
* def makeelement(self, _tag, attrib=None, nsmap=None, **_extra):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_copy(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 944; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_copy(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":939
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":959
* return parser
*
* def copy(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":946
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":966
* return self._copy()
*
* def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "makeelement") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "makeelement") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("makeelement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("makeelement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v__extra); __pyx_v__extra = 0;
__Pyx_AddTraceback("lxml.etree._BaseParser.makeelement", __pyx_clineno, __pyx_lineno, __pyx_filename);
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("makeelement", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":951
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":971
* Creates a new element associated with this parser.
* """
* return _makeElement(_tag, NULL, None, self, None, None, # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":952
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":972
* """
* return _makeElement(_tag, NULL, None, self, None, None,
* attrib, nsmap, _extra) # <<<<<<<<<<<<<<
*
* # internal parser methods
*/
- __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v__tag, NULL, ((struct LxmlDocument *)Py_None), __pyx_v_self, Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v__tag, NULL, ((struct LxmlDocument *)Py_None), __pyx_v_self, Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":946
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":966
* return self._copy()
*
* def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":956
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":976
* # internal parser methods
*
* cdef xmlDoc* _parseUnicodeDoc(self, utext, char* c_filename) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parseUnicodeDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":965
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":985
* cdef int buffer_len, c_kind
* cdef const_char* c_text
* cdef const_char* c_encoding = _UNICODE_ENCODING # <<<<<<<<<<<<<<
*/
__pyx_v_c_encoding = __pyx_v_4lxml_5etree__UNICODE_ENCODING;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":967
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":987
* cdef const_char* c_encoding = _UNICODE_ENCODING
* cdef bint is_pep393_string = (
* python.PEP393_ENABLED and python.PyUnicode_IS_READY(utext)) # <<<<<<<<<<<<<<
}
__pyx_v_is_pep393_string = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":968
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":988
* cdef bint is_pep393_string = (
* python.PEP393_ENABLED and python.PyUnicode_IS_READY(utext))
* if is_pep393_string: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_is_pep393_string != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":969
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":989
* python.PEP393_ENABLED and python.PyUnicode_IS_READY(utext))
* if is_pep393_string:
* c_text = <const_char*>python.PyUnicode_DATA(utext) # <<<<<<<<<<<<<<
*/
__pyx_v_c_text = ((const char *)PyUnicode_DATA(__pyx_v_utext));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":970
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":990
* if is_pep393_string:
* c_text = <const_char*>python.PyUnicode_DATA(utext)
* py_buffer_len = python.PyUnicode_GET_LENGTH(utext) # <<<<<<<<<<<<<<
*/
__pyx_v_py_buffer_len = PyUnicode_GET_LENGTH(__pyx_v_utext);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":971
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":991
* c_text = <const_char*>python.PyUnicode_DATA(utext)
* py_buffer_len = python.PyUnicode_GET_LENGTH(utext)
* c_kind = python.PyUnicode_KIND(utext) # <<<<<<<<<<<<<<
*/
__pyx_v_c_kind = PyUnicode_KIND(__pyx_v_utext);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":980
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1000
* else:
* c_encoding = 'UTF-16LE' # actually UCS-2
* elif c_kind == 4: # <<<<<<<<<<<<<<
*/
switch (__pyx_v_c_kind) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":972
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":992
* py_buffer_len = python.PyUnicode_GET_LENGTH(utext)
* c_kind = python.PyUnicode_KIND(utext)
* if c_kind == 1: # <<<<<<<<<<<<<<
*/
case 1:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":973
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":993
* c_kind = python.PyUnicode_KIND(utext)
* if c_kind == 1:
* c_encoding = 'ISO-8859-1' # <<<<<<<<<<<<<<
__pyx_v_c_encoding = __pyx_k_ISO_8859_1;
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":974
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":994
* if c_kind == 1:
* c_encoding = 'ISO-8859-1'
* elif c_kind == 2: # <<<<<<<<<<<<<<
*/
case 2:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":975
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":995
* c_encoding = 'ISO-8859-1'
* elif c_kind == 2:
* py_buffer_len *= 2 # <<<<<<<<<<<<<<
*/
__pyx_v_py_buffer_len = (__pyx_v_py_buffer_len * 2);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":976
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":996
* elif c_kind == 2:
* py_buffer_len *= 2
* if python.PY_BIG_ENDIAN: # <<<<<<<<<<<<<<
__pyx_t_2 = (PY_BIG_ENDIAN != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":977
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":997
* py_buffer_len *= 2
* if python.PY_BIG_ENDIAN:
* c_encoding = 'UTF-16BE' # actually UCS-2 # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":979
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":999
* c_encoding = 'UTF-16BE' # actually UCS-2
* else:
* c_encoding = 'UTF-16LE' # actually UCS-2 # <<<<<<<<<<<<<<
__pyx_L4:;
break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":980
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1000
* else:
* c_encoding = 'UTF-16LE' # actually UCS-2
* elif c_kind == 4: # <<<<<<<<<<<<<<
*/
case 4:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":981
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1001
* c_encoding = 'UTF-16LE' # actually UCS-2
* elif c_kind == 4:
* py_buffer_len *= 4 # <<<<<<<<<<<<<<
*/
__pyx_v_py_buffer_len = (__pyx_v_py_buffer_len * 4);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":982
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1002
* elif c_kind == 4:
* py_buffer_len *= 4
* if python.PY_BIG_ENDIAN: # <<<<<<<<<<<<<<
__pyx_t_2 = (PY_BIG_ENDIAN != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":983
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1003
* py_buffer_len *= 4
* if python.PY_BIG_ENDIAN:
* c_encoding = 'UCS-4BE' # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":985
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1005
* c_encoding = 'UCS-4BE'
* else:
* c_encoding = 'UCS-4LE' # <<<<<<<<<<<<<<
break;
default:
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":987
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1007
* c_encoding = 'UCS-4LE'
* else:
* assert False, "Illegal Unicode kind %d" % c_kind # <<<<<<<<<<<<<<
#ifndef CYTHON_WITHOUT_ASSERTIONS
if (unlikely(!Py_OptimizeFlag)) {
if (unlikely(!0)) {
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_c_kind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_c_kind); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_Unicode_kind_d, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_Unicode_kind_d, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
PyErr_SetObject(PyExc_AssertionError, __pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
}
#endif
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":989
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1009
* assert False, "Illegal Unicode kind %d" % c_kind
* else:
* py_buffer_len = python.PyUnicode_GET_DATA_SIZE(utext) # <<<<<<<<<<<<<<
*/
__pyx_v_py_buffer_len = PyUnicode_GET_DATA_SIZE(__pyx_v_utext);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":990
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1010
* else:
* py_buffer_len = python.PyUnicode_GET_DATA_SIZE(utext)
* c_text = python.PyUnicode_AS_DATA(utext) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":991
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1011
* py_buffer_len = python.PyUnicode_GET_DATA_SIZE(utext)
* c_text = python.PyUnicode_AS_DATA(utext)
* assert py_buffer_len <= limits.INT_MAX # <<<<<<<<<<<<<<
if (unlikely(!Py_OptimizeFlag)) {
if (unlikely(!((__pyx_v_py_buffer_len <= INT_MAX) != 0))) {
PyErr_SetNone(PyExc_AssertionError);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
}
#endif
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":992
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1012
* c_text = python.PyUnicode_AS_DATA(utext)
* assert py_buffer_len <= limits.INT_MAX
* buffer_len = py_buffer_len # <<<<<<<<<<<<<<
*/
__pyx_v_buffer_len = __pyx_v_py_buffer_len;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":994
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1014
* buffer_len = py_buffer_len
*
* context = self._getParserContext() # <<<<<<<<<<<<<<
* context.prepare()
* try:
*/
- __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":995
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1015
*
* context = self._getParserContext()
* context.prepare() # <<<<<<<<<<<<<<
* try:
* pctxt = context._c_ctxt
*/
- __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":996
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1016
* context = self._getParserContext()
* context.prepare()
* try: # <<<<<<<<<<<<<<
*/
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":997
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1017
* context.prepare()
* try:
* pctxt = context._c_ctxt # <<<<<<<<<<<<<<
__pyx_t_6 = __pyx_v_context->_c_ctxt;
__pyx_v_pctxt = __pyx_t_6;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":998
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1018
* try:
* pctxt = context._c_ctxt
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":999
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1019
* pctxt = context._c_ctxt
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
* orig_options = pctxt.options # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_pctxt->options;
__pyx_v_orig_options = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1000
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1020
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
* orig_options = pctxt.options
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1001
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1021
* orig_options = pctxt.options
* with nogil:
* if self._for_html: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_v_self->_for_html != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1002
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1022
* with nogil:
* if self._for_html:
* result = htmlparser.htmlCtxtReadMemory( # <<<<<<<<<<<<<<
*/
__pyx_v_result = htmlCtxtReadMemory(__pyx_v_pctxt, __pyx_v_c_text, __pyx_v_buffer_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1005
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1025
* pctxt, c_text, buffer_len, c_filename, c_encoding,
* self._parse_options)
* if result is not NULL: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_v_result != NULL) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1006
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1026
* self._parse_options)
* if result is not NULL:
* if _fixHtmlDictNames(pctxt.dict, result) < 0: # <<<<<<<<<<<<<<
__pyx_t_2 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_pctxt->dict, __pyx_v_result) < 0) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1007
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1027
* if result is not NULL:
* if _fixHtmlDictNames(pctxt.dict, result) < 0:
* tree.xmlFreeDoc(result) # <<<<<<<<<<<<<<
*/
xmlFreeDoc(__pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1008
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1028
* if _fixHtmlDictNames(pctxt.dict, result) < 0:
* tree.xmlFreeDoc(result)
* result = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1010
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1030
* result = NULL
* else:
* result = xmlparser.xmlCtxtReadMemory( # <<<<<<<<<<<<<<
__pyx_L12:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1000
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1020
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
* orig_options = pctxt.options
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1013
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1033
* pctxt, c_text, buffer_len, c_filename, c_encoding,
* self._parse_options)
* pctxt.options = orig_options # work around libxml2 problem # <<<<<<<<<<<<<<
*/
__pyx_v_pctxt->options = __pyx_v_orig_options;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1015
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1035
* pctxt.options = orig_options # work around libxml2 problem
*
* return context._handleParseResultDoc(self, result, None) # <<<<<<<<<<<<<<
* finally:
* context.cleanup()
*/
- __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, Py_None); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, Py_None); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__pyx_r = __pyx_t_7;
goto __pyx_L6_return;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1017
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1037
* return context._handleParseResultDoc(self, result, None)
* finally:
* context.cleanup() # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_15);
__pyx_t_5 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
{
- __pyx_t_16 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+ __pyx_t_16 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
}
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_13);
}
__pyx_L6_return: {
__pyx_t_7 = __pyx_r;
- __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_7;
goto __pyx_L0;
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":956
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":976
* # internal parser methods
*
* cdef xmlDoc* _parseUnicodeDoc(self, utext, char* c_filename) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1019
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1039
* context.cleanup()
*
* cdef xmlDoc* _parseDoc(self, char* c_text, int c_len, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parseDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1027
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1047
* cdef xmlparser.xmlParserCtxt* pctxt
* cdef char* c_encoding
* context = self._getParserContext() # <<<<<<<<<<<<<<
* context.prepare()
* try:
*/
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1028
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1048
* cdef char* c_encoding
* context = self._getParserContext()
* context.prepare() # <<<<<<<<<<<<<<
* try:
* pctxt = context._c_ctxt
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1029
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1049
* context = self._getParserContext()
* context.prepare()
* try: # <<<<<<<<<<<<<<
*/
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1030
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1050
* context.prepare()
* try:
* pctxt = context._c_ctxt # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_context->_c_ctxt;
__pyx_v_pctxt = __pyx_t_3;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1031
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1051
* try:
* pctxt = context._c_ctxt
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1033
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1053
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
*
* if self._default_encoding is None: # <<<<<<<<<<<<<<
__pyx_t_5 = (__pyx_t_4 != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1034
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1054
*
* if self._default_encoding is None:
* c_encoding = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1036
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1056
* c_encoding = NULL
* else:
* c_encoding = _cstr(self._default_encoding) # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1038
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1058
* c_encoding = _cstr(self._default_encoding)
*
* orig_options = pctxt.options # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_pctxt->options;
__pyx_v_orig_options = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1039
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1059
*
* orig_options = pctxt.options
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1040
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1060
* orig_options = pctxt.options
* with nogil:
* if self._for_html: # <<<<<<<<<<<<<<
__pyx_t_5 = (__pyx_v_self->_for_html != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1041
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1061
* with nogil:
* if self._for_html:
* result = htmlparser.htmlCtxtReadMemory( # <<<<<<<<<<<<<<
*/
__pyx_v_result = htmlCtxtReadMemory(__pyx_v_pctxt, __pyx_v_c_text, __pyx_v_c_len, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1044
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1064
* pctxt, c_text, c_len, c_filename,
* c_encoding, self._parse_options)
* if result is not NULL: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_result != NULL) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1045
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1065
* c_encoding, self._parse_options)
* if result is not NULL:
* if _fixHtmlDictNames(pctxt.dict, result) < 0: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_pctxt->dict, __pyx_v_result) < 0) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1046
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1066
* if result is not NULL:
* if _fixHtmlDictNames(pctxt.dict, result) < 0:
* tree.xmlFreeDoc(result) # <<<<<<<<<<<<<<
*/
xmlFreeDoc(__pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1047
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1067
* if _fixHtmlDictNames(pctxt.dict, result) < 0:
* tree.xmlFreeDoc(result)
* result = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1049
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1069
* result = NULL
* else:
* result = xmlparser.xmlCtxtReadMemory( # <<<<<<<<<<<<<<
__pyx_L10:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1039
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1059
*
* orig_options = pctxt.options
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1052
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1072
* pctxt, c_text, c_len, c_filename,
* c_encoding, self._parse_options)
* pctxt.options = orig_options # work around libxml2 problem # <<<<<<<<<<<<<<
*/
__pyx_v_pctxt->options = __pyx_v_orig_options;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1054
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1074
* pctxt.options = orig_options # work around libxml2 problem
*
* return context._handleParseResultDoc(self, result, None) # <<<<<<<<<<<<<<
* finally:
* context.cleanup()
*/
- __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, Py_None); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, Py_None); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1074; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__pyx_r = __pyx_t_6;
goto __pyx_L3_return;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1056
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1076
* return context._handleParseResultDoc(self, result, None)
* finally:
* context.cleanup() # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_14);
__pyx_t_2 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
{
- __pyx_t_15 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
+ __pyx_t_15 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
}
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_12);
}
__pyx_L3_return: {
__pyx_t_6 = __pyx_r;
- __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_6;
goto __pyx_L0;
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1019
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1039
* context.cleanup()
*
* cdef xmlDoc* _parseDoc(self, char* c_text, int c_len, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1058
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1078
* context.cleanup()
*
* cdef xmlDoc* _parseDocFromFile(self, char* c_filename) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parseDocFromFile", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1063
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1083
* cdef xmlparser.xmlParserCtxt* pctxt
* cdef char* c_encoding
* result = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_result = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1065
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1085
* result = NULL
*
* context = self._getParserContext() # <<<<<<<<<<<<<<
* context.prepare()
* try:
*/
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1066
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1086
*
* context = self._getParserContext()
* context.prepare() # <<<<<<<<<<<<<<
* try:
* pctxt = context._c_ctxt
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1067
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1087
* context = self._getParserContext()
* context.prepare()
* try: # <<<<<<<<<<<<<<
*/
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1068
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1088
* context.prepare()
* try:
* pctxt = context._c_ctxt # <<<<<<<<<<<<<<
__pyx_t_3 = __pyx_v_context->_c_ctxt;
__pyx_v_pctxt = __pyx_t_3;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1069
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1089
* try:
* pctxt = context._c_ctxt
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1071
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1091
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
*
* if self._default_encoding is None: # <<<<<<<<<<<<<<
__pyx_t_5 = (__pyx_t_4 != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1072
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1092
*
* if self._default_encoding is None:
* c_encoding = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1074
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1094
* c_encoding = NULL
* else:
* c_encoding = _cstr(self._default_encoding) # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1076
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1096
* c_encoding = _cstr(self._default_encoding)
*
* orig_options = pctxt.options # <<<<<<<<<<<<<<
__pyx_t_2 = __pyx_v_pctxt->options;
__pyx_v_orig_options = __pyx_t_2;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1077
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1097
*
* orig_options = pctxt.options
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1078
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1098
* orig_options = pctxt.options
* with nogil:
* if self._for_html: # <<<<<<<<<<<<<<
__pyx_t_5 = (__pyx_v_self->_for_html != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1079
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1099
* with nogil:
* if self._for_html:
* result = htmlparser.htmlCtxtReadFile( # <<<<<<<<<<<<<<
*/
__pyx_v_result = htmlCtxtReadFile(__pyx_v_pctxt, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->_parse_options);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1081
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1101
* result = htmlparser.htmlCtxtReadFile(
* pctxt, c_filename, c_encoding, self._parse_options)
* if result is not NULL: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_result != NULL) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1082
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1102
* pctxt, c_filename, c_encoding, self._parse_options)
* if result is not NULL:
* if _fixHtmlDictNames(pctxt.dict, result) < 0: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_f_4lxml_5etree__fixHtmlDictNames(__pyx_v_pctxt->dict, __pyx_v_result) < 0) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1083
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1103
* if result is not NULL:
* if _fixHtmlDictNames(pctxt.dict, result) < 0:
* tree.xmlFreeDoc(result) # <<<<<<<<<<<<<<
*/
xmlFreeDoc(__pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1084
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1104
* if _fixHtmlDictNames(pctxt.dict, result) < 0:
* tree.xmlFreeDoc(result)
* result = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1086
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1106
* result = NULL
* else:
* result = xmlparser.xmlCtxtReadFile( # <<<<<<<<<<<<<<
__pyx_L10:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1077
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1097
*
* orig_options = pctxt.options
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1088
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1108
* result = xmlparser.xmlCtxtReadFile(
* pctxt, c_filename, c_encoding, self._parse_options)
* pctxt.options = orig_options # work around libxml2 problem # <<<<<<<<<<<<<<
*/
__pyx_v_pctxt->options = __pyx_v_orig_options;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1090
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1110
* pctxt.options = orig_options # work around libxml2 problem
*
* return context._handleParseResultDoc(self, result, c_filename) # <<<<<<<<<<<<<<
* finally:
* context.cleanup()
*/
- __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_c_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_c_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1090; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_6 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_6;
goto __pyx_L3_return;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1092
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1112
* return context._handleParseResultDoc(self, result, c_filename)
* finally:
* context.cleanup() # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_14);
__pyx_t_2 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename;
{
- __pyx_t_15 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
+ __pyx_t_15 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L14_error;}
}
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_12);
}
__pyx_L3_return: {
__pyx_t_6 = __pyx_r;
- __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_6;
goto __pyx_L0;
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1058
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1078
* context.cleanup()
*
* cdef xmlDoc* _parseDocFromFile(self, char* c_filename) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1094
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1114
* context.cleanup()
*
* cdef xmlDoc* _parseDocFromFilelike(self, filelike, filename, # <<<<<<<<<<<<<<
__Pyx_RefNannySetupContext("_parseDocFromFilelike", 0);
__Pyx_INCREF(__pyx_v_filename);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1101
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1121
* cdef xmlparser.xmlParserCtxt* pctxt
* cdef char* c_filename
* if not filename: # <<<<<<<<<<<<<<
* filename = None
*
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = ((!__pyx_t_1) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1102
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1122
* cdef char* c_filename
* if not filename:
* filename = None # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1104
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1124
* filename = None
*
* context = self._getParserContext() # <<<<<<<<<<<<<<
* context.prepare()
* try:
*/
- __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1105
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1125
*
* context = self._getParserContext()
* context.prepare() # <<<<<<<<<<<<<<
* try:
* pctxt = context._c_ctxt
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1106
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1126
* context = self._getParserContext()
* context.prepare()
* try: # <<<<<<<<<<<<<<
*/
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1107
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1127
* context.prepare()
* try:
* pctxt = context._c_ctxt # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_context->_c_ctxt;
__pyx_v_pctxt = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1108
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1128
* try:
* pctxt = context._c_ctxt
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1111
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1131
* file_context = _FileReaderContext(
* filelike, context, filename,
* encoding or self._default_encoding) # <<<<<<<<<<<<<<
* result = file_context._readDoc(pctxt, self._parse_options)
*
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_encoding); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_encoding); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1131; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
if (!__pyx_t_2) {
__Pyx_INCREF(__pyx_v_self->_default_encoding);
__pyx_t_3 = __pyx_v_self->_default_encoding;
__pyx_t_3 = __pyx_v_encoding;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1109
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1129
* pctxt = context._c_ctxt
* __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
* file_context = _FileReaderContext( # <<<<<<<<<<<<<<
* filelike, context, filename,
* encoding or self._default_encoding)
*/
- __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_INCREF(__pyx_v_filelike);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_filelike);
PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileReaderContext)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileReaderContext)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_v_file_context = ((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1112
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1132
* filelike, context, filename,
* encoding or self._default_encoding)
* result = file_context._readDoc(pctxt, self._parse_options) # <<<<<<<<<<<<<<
*/
__pyx_v_result = __pyx_f_4lxml_5etree_18_FileReaderContext__readDoc(__pyx_v_file_context, __pyx_v_pctxt, __pyx_v_self->_parse_options);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1114
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1134
* result = file_context._readDoc(pctxt, self._parse_options)
*
* return context._handleParseResultDoc( # <<<<<<<<<<<<<<
* self, result, filename)
* finally:
*/
- __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, __pyx_v_filename); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
+ __pyx_t_7 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResultDoc(__pyx_v_context, __pyx_v_self, __pyx_v_result, __pyx_v_filename); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__pyx_r = __pyx_t_7;
goto __pyx_L4_return;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1117
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1137
* self, result, filename)
* finally:
* context.cleanup() # <<<<<<<<<<<<<<
__Pyx_XGOTREF(__pyx_t_15);
__pyx_t_4 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
{
- __pyx_t_16 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
+ __pyx_t_16 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L8_error;}
}
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_13);
}
__pyx_L4_return: {
__pyx_t_7 = __pyx_r;
- __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_7;
goto __pyx_L0;
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1094
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1114
* context.cleanup()
*
* cdef xmlDoc* _parseDocFromFilelike(self, filelike, filename, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":745
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":765
* cdef XMLSchema _schema
* cdef bytes _filename
* cdef readonly object target # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1132
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1152
* different from what the ``error_log`` property returns.
* """
* def __get__(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__get__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1133
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1153
* """
* def __get__(self):
* return self._getPushParserContext()._error_log.copy() # <<<<<<<<<<<<<<
* cpdef feed(self, data):
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1)->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1)->_error_log), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1)->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1)->_error_log), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1132
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1152
* different from what the ``error_log`` property returns.
* """
* def __get__(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1135
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1155
* return self._getPushParserContext()._error_log.copy()
*
* cpdef feed(self, data): # <<<<<<<<<<<<<<
int __pyx_v_error;
int __pyx_v_recover;
char *__pyx_v_c_filename;
+ long __pyx_v_fixup_error;
+ xmlNode *__pyx_v_c_node;
PyObject *__pyx_v_entry = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_8;
char *__pyx_t_9;
int __pyx_t_10;
- Py_ssize_t __pyx_t_11;
- PyObject *(*__pyx_t_12)(PyObject *);
- PyObject *__pyx_t_13 = NULL;
- int __pyx_t_14;
- char const *__pyx_t_15;
+ int __pyx_t_11;
+ xmlNode *__pyx_t_12;
+ xmlDict *__pyx_t_13;
+ Py_ssize_t __pyx_t_14;
+ PyObject *(*__pyx_t_15)(PyObject *);
PyObject *__pyx_t_16 = NULL;
- PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
+ int __pyx_t_17;
+ char const *__pyx_t_18;
PyObject *__pyx_t_19 = NULL;
PyObject *__pyx_t_20 = NULL;
PyObject *__pyx_t_21 = NULL;
- int __pyx_t_22;
+ PyObject *__pyx_t_22 = NULL;
+ PyObject *__pyx_t_23 = NULL;
+ PyObject *__pyx_t_24 = NULL;
+ int __pyx_t_25;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_feed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_feed); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_1feed)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1160
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1180
* cdef int buffer_len
* cdef int error
* cdef bint recover = self._parse_options & xmlparser.XML_PARSE_RECOVER # <<<<<<<<<<<<<<
*/
__pyx_v_recover = (__pyx_v_self->__pyx_base._parse_options & XML_PARSE_RECOVER);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1161
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1181
* cdef int error
* cdef bint recover = self._parse_options & xmlparser.XML_PARSE_RECOVER
* if isinstance(data, bytes): # <<<<<<<<<<<<<<
__pyx_t_5 = (__pyx_t_4 != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1162
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1182
* cdef bint recover = self._parse_options & xmlparser.XML_PARSE_RECOVER
* if isinstance(data, bytes):
* if self._default_encoding is None: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_t_5 != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1163
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1183
* if isinstance(data, bytes):
* if self._default_encoding is None:
* c_encoding = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1165
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1185
* c_encoding = NULL
* else:
* c_encoding = self._default_encoding # <<<<<<<<<<<<<<
* c_data = _cstr(data)
* py_buffer_len = python.PyBytes_GET_SIZE(data)
*/
- __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->__pyx_base._default_encoding); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_self->__pyx_base._default_encoding); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_encoding = __pyx_t_6;
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1166
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1186
* else:
* c_encoding = self._default_encoding
* c_data = _cstr(data) # <<<<<<<<<<<<<<
*/
__pyx_v_c_data = PyBytes_AS_STRING(__pyx_v_data);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1167
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1187
* c_encoding = self._default_encoding
* c_data = _cstr(data)
* py_buffer_len = python.PyBytes_GET_SIZE(data) # <<<<<<<<<<<<<<
goto __pyx_L3;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1168
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1188
* c_data = _cstr(data)
* py_buffer_len = python.PyBytes_GET_SIZE(data)
* elif isinstance(data, unicode): # <<<<<<<<<<<<<<
__pyx_t_5 = (__pyx_t_4 != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1169
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1189
* py_buffer_len = python.PyBytes_GET_SIZE(data)
* elif isinstance(data, unicode):
* if _UNICODE_ENCODING is NULL: # <<<<<<<<<<<<<<
__pyx_t_5 = ((__pyx_v_4lxml_5etree__UNICODE_ENCODING == NULL) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1170
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1190
* elif isinstance(data, unicode):
* if _UNICODE_ENCODING is NULL:
* raise ParserError, \ # <<<<<<<<<<<<<<
* u"Unicode parsing is not supported on this platform"
* c_encoding = _UNICODE_ENCODING
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParserError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParserError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, __pyx_kp_u_Unicode_parsing_is_not_supported, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1172
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1192
* raise ParserError, \
* u"Unicode parsing is not supported on this platform"
* c_encoding = _UNICODE_ENCODING # <<<<<<<<<<<<<<
*/
__pyx_v_c_encoding = __pyx_v_4lxml_5etree__UNICODE_ENCODING;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1173
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1193
* u"Unicode parsing is not supported on this platform"
* c_encoding = _UNICODE_ENCODING
* c_data = python.PyUnicode_AS_DATA(data) # <<<<<<<<<<<<<<
*/
__pyx_v_c_data = PyUnicode_AS_DATA(__pyx_v_data);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1174
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1194
* c_encoding = _UNICODE_ENCODING
* c_data = python.PyUnicode_AS_DATA(data)
* py_buffer_len = python.PyUnicode_GET_DATA_SIZE(data) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1176
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1196
* py_buffer_len = python.PyUnicode_GET_DATA_SIZE(data)
* else:
* raise TypeError, u"Parsing requires string data" # <<<<<<<<<<<<<<
* context = self._getPushParserContext()
*/
__Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Parsing_requires_string_data, 0, 0);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1178
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1198
* raise TypeError, u"Parsing requires string data"
*
* context = self._getPushParserContext() # <<<<<<<<<<<<<<
* pctxt = context._c_ctxt
* error = 0
*/
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1179
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1199
*
* context = self._getPushParserContext()
* pctxt = context._c_ctxt # <<<<<<<<<<<<<<
__pyx_t_7 = __pyx_v_context->_c_ctxt;
__pyx_v_pctxt = __pyx_t_7;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1180
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1200
* context = self._getPushParserContext()
* pctxt = context._c_ctxt
* error = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_error = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1181
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1201
* pctxt = context._c_ctxt
* error = 0
* if not self._feed_parser_running: # <<<<<<<<<<<<<<
__pyx_t_5 = ((!(__pyx_v_self->_feed_parser_running != 0)) != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1182
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1202
* error = 0
* if not self._feed_parser_running:
* context.prepare() # <<<<<<<<<<<<<<
* self._feed_parser_running = 1
- * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
+ * c_filename = (_cstr(self._filename)
*/
- __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->prepare(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1183
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1203
* if not self._feed_parser_running:
* context.prepare()
* self._feed_parser_running = 1 # <<<<<<<<<<<<<<
- * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
* c_filename = (_cstr(self._filename)
+ * if self._filename is not None else NULL)
*/
__pyx_v_self->_feed_parser_running = 1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1184
- * context.prepare()
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1205
* self._feed_parser_running = 1
- * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) # <<<<<<<<<<<<<<
- * c_filename = (_cstr(self._filename)
- * if self._filename is not None else NULL)
- */
- __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt);
-
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1186
- * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
* c_filename = (_cstr(self._filename)
* if self._filename is not None else NULL) # <<<<<<<<<<<<<<
- * if self._for_html:
- * error = _htmlCtxtResetPush(
+ *
+ * if c_encoding is NULL and py_buffer_len >= 2:
*/
__pyx_t_5 = (__pyx_v_self->__pyx_base._filename != ((PyObject*)Py_None));
if ((__pyx_t_5 != 0)) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1185
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1204
+ * context.prepare()
* self._feed_parser_running = 1
- * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
* c_filename = (_cstr(self._filename) # <<<<<<<<<<<<<<
* if self._filename is not None else NULL)
- * if self._for_html:
+ *
*/
__pyx_t_1 = __pyx_v_self->__pyx_base._filename;
__Pyx_INCREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1186
- * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1205
+ * self._feed_parser_running = 1
* c_filename = (_cstr(self._filename)
* if self._filename is not None else NULL) # <<<<<<<<<<<<<<
- * if self._for_html:
- * error = _htmlCtxtResetPush(
+ *
+ * if c_encoding is NULL and py_buffer_len >= 2:
*/
__pyx_t_9 = NULL;
}
__pyx_v_c_filename = __pyx_t_9;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1187
- * c_filename = (_cstr(self._filename)
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1207
* if self._filename is not None else NULL)
+ *
+ * if c_encoding is NULL and py_buffer_len >= 2: # <<<<<<<<<<<<<<
+ * # libxml2 can't handle BOMs here, so let's try ourselves
+ * if c_data[0] in b'\xfe\xef\xff':
+ */
+ __pyx_t_5 = ((__pyx_v_c_encoding == NULL) != 0);
+ if (__pyx_t_5) {
+ __pyx_t_4 = ((__pyx_v_py_buffer_len >= 2) != 0);
+ __pyx_t_10 = __pyx_t_4;
+ } else {
+ __pyx_t_10 = __pyx_t_5;
+ }
+ if (__pyx_t_10) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1209
+ * if c_encoding is NULL and py_buffer_len >= 2:
+ * # libxml2 can't handle BOMs here, so let's try ourselves
+ * if c_data[0] in b'\xfe\xef\xff': # <<<<<<<<<<<<<<
+ * # likely a BOM, let's take a closer look
+ * c_encoding = _findEncodingName(
+ */
+ switch ((__pyx_v_c_data[0])) {
+ case '\xEF':
+ case '\xFE':
+ case '\xFF':
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1213
+ * c_encoding = _findEncodingName(
+ * <const_xmlChar*>c_data,
+ * 4 if py_buffer_len > 4 else <int>py_buffer_len) # <<<<<<<<<<<<<<
+ * if c_encoding is not NULL:
+ * # found it => skip over BOM (if there is one)
+ */
+ if (((__pyx_v_py_buffer_len > 4) != 0)) {
+ __pyx_t_8 = 4;
+ } else {
+ __pyx_t_8 = ((int)__pyx_v_py_buffer_len);
+ }
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1211
+ * if c_data[0] in b'\xfe\xef\xff':
+ * # likely a BOM, let's take a closer look
+ * c_encoding = _findEncodingName( # <<<<<<<<<<<<<<
+ * <const_xmlChar*>c_data,
+ * 4 if py_buffer_len > 4 else <int>py_buffer_len)
+ */
+ __pyx_v_c_encoding = __pyx_f_4lxml_5etree__findEncodingName(((const xmlChar *)__pyx_v_c_data), __pyx_t_8);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1214
+ * <const_xmlChar*>c_data,
+ * 4 if py_buffer_len > 4 else <int>py_buffer_len)
+ * if c_encoding is not NULL: # <<<<<<<<<<<<<<
+ * # found it => skip over BOM (if there is one)
+ * if (c_data[0] == b'\xef' and
+ */
+ __pyx_t_10 = ((__pyx_v_c_encoding != NULL) != 0);
+ if (__pyx_t_10) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1216
+ * if c_encoding is not NULL:
+ * # found it => skip over BOM (if there is one)
+ * if (c_data[0] == b'\xef' and # <<<<<<<<<<<<<<
+ * c_data[1] == b'\xbb' and
+ * c_data[2] == b'\xbf'):
+ */
+ __pyx_t_10 = (((__pyx_v_c_data[0]) == '\xEF') != 0);
+ if (__pyx_t_10) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1217
+ * # found it => skip over BOM (if there is one)
+ * if (c_data[0] == b'\xef' and
+ * c_data[1] == b'\xbb' and # <<<<<<<<<<<<<<
+ * c_data[2] == b'\xbf'):
+ * c_data += 3 # UTF-8 BOM
+ */
+ __pyx_t_5 = (((__pyx_v_c_data[1]) == '\xBB') != 0);
+ if (__pyx_t_5) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1218
+ * if (c_data[0] == b'\xef' and
+ * c_data[1] == b'\xbb' and
+ * c_data[2] == b'\xbf'): # <<<<<<<<<<<<<<
+ * c_data += 3 # UTF-8 BOM
+ * py_buffer_len -= 3
+ */
+ __pyx_t_4 = (((__pyx_v_c_data[2]) == '\xBF') != 0);
+ __pyx_t_11 = __pyx_t_4;
+ } else {
+ __pyx_t_11 = __pyx_t_5;
+ }
+ __pyx_t_5 = __pyx_t_11;
+ } else {
+ __pyx_t_5 = __pyx_t_10;
+ }
+ if (__pyx_t_5) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1219
+ * c_data[1] == b'\xbb' and
+ * c_data[2] == b'\xbf'):
+ * c_data += 3 # UTF-8 BOM # <<<<<<<<<<<<<<
+ * py_buffer_len -= 3
+ * elif (c_data[0] == b'\xfe' and c_data[1] == b'\xff' or
+ */
+ __pyx_v_c_data = (__pyx_v_c_data + 3);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1220
+ * c_data[2] == b'\xbf'):
+ * c_data += 3 # UTF-8 BOM
+ * py_buffer_len -= 3 # <<<<<<<<<<<<<<
+ * elif (c_data[0] == b'\xfe' and c_data[1] == b'\xff' or
+ * c_data[0] == b'\xff' and c_data[1] == b'\xfe'):
+ */
+ __pyx_v_py_buffer_len = (__pyx_v_py_buffer_len - 3);
+ goto __pyx_L9;
+ }
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1221
+ * c_data += 3 # UTF-8 BOM
+ * py_buffer_len -= 3
+ * elif (c_data[0] == b'\xfe' and c_data[1] == b'\xff' or # <<<<<<<<<<<<<<
+ * c_data[0] == b'\xff' and c_data[1] == b'\xfe'):
+ * # UTF-16 BE/LE
+ */
+ __pyx_t_5 = (((__pyx_v_c_data[0]) == '\xFE') != 0);
+ if (__pyx_t_5) {
+ __pyx_t_10 = (((__pyx_v_c_data[1]) == '\xFF') != 0);
+ __pyx_t_11 = __pyx_t_10;
+ } else {
+ __pyx_t_11 = __pyx_t_5;
+ }
+ if (!__pyx_t_11) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1222
+ * py_buffer_len -= 3
+ * elif (c_data[0] == b'\xfe' and c_data[1] == b'\xff' or
+ * c_data[0] == b'\xff' and c_data[1] == b'\xfe'): # <<<<<<<<<<<<<<
+ * # UTF-16 BE/LE
+ * c_data += 2
+ */
+ __pyx_t_5 = (((__pyx_v_c_data[0]) == '\xFF') != 0);
+ if (__pyx_t_5) {
+ __pyx_t_10 = (((__pyx_v_c_data[1]) == '\xFE') != 0);
+ __pyx_t_4 = __pyx_t_10;
+ } else {
+ __pyx_t_4 = __pyx_t_5;
+ }
+ __pyx_t_5 = __pyx_t_4;
+ } else {
+ __pyx_t_5 = __pyx_t_11;
+ }
+ if (__pyx_t_5) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1224
+ * c_data[0] == b'\xff' and c_data[1] == b'\xfe'):
+ * # UTF-16 BE/LE
+ * c_data += 2 # <<<<<<<<<<<<<<
+ * py_buffer_len -= 2
+ *
+ */
+ __pyx_v_c_data = (__pyx_v_c_data + 2);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1225
+ * # UTF-16 BE/LE
+ * c_data += 2
+ * py_buffer_len -= 2 # <<<<<<<<<<<<<<
+ *
+ * if self._for_html:
+ */
+ __pyx_v_py_buffer_len = (__pyx_v_py_buffer_len - 2);
+ goto __pyx_L9;
+ }
+ __pyx_L9:;
+ goto __pyx_L8;
+ }
+ __pyx_L8:;
+ break;
+ default: break;
+ }
+ goto __pyx_L7;
+ }
+ __pyx_L7:;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1227
+ * py_buffer_len -= 2
+ *
* if self._for_html: # <<<<<<<<<<<<<<
* error = _htmlCtxtResetPush(
* pctxt, NULL, 0, c_filename, c_encoding,
__pyx_t_5 = (__pyx_v_self->__pyx_base._for_html != 0);
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1188
- * if self._filename is not None else NULL)
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1228
+ *
* if self._for_html:
* error = _htmlCtxtResetPush( # <<<<<<<<<<<<<<
* pctxt, NULL, 0, c_filename, c_encoding,
* self._parse_options)
*/
- __pyx_t_8 = __pyx_f_4lxml_5etree__htmlCtxtResetPush(__pyx_v_pctxt, NULL, 0, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->__pyx_base._parse_options); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __pyx_f_4lxml_5etree__htmlCtxtResetPush(__pyx_v_pctxt, NULL, 0, __pyx_v_c_filename, __pyx_v_c_encoding, __pyx_v_self->__pyx_base._parse_options); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_error = __pyx_t_8;
- goto __pyx_L7;
+ goto __pyx_L10;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1192
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1232
* self._parse_options)
* else:
* xmlparser.xmlCtxtUseOptions(pctxt, self._parse_options) # <<<<<<<<<<<<<<
*/
xmlCtxtUseOptions(__pyx_v_pctxt, __pyx_v_self->__pyx_base._parse_options);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1193
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1233
* else:
* xmlparser.xmlCtxtUseOptions(pctxt, self._parse_options)
* error = xmlparser.xmlCtxtResetPush( # <<<<<<<<<<<<<<
* pctxt, NULL, 0, c_filename, c_encoding)
- *
+ * if error:
*/
__pyx_v_error = xmlCtxtResetPush(__pyx_v_pctxt, NULL, 0, __pyx_v_c_filename, __pyx_v_c_encoding);
}
- __pyx_L7:;
+ __pyx_L10:;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1235
+ * error = xmlparser.xmlCtxtResetPush(
+ * pctxt, NULL, 0, c_filename, c_encoding)
+ * if error: # <<<<<<<<<<<<<<
+ * raise MemoryError()
+ * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
+ */
+ __pyx_t_5 = (__pyx_v_error != 0);
+ if (__pyx_t_5) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1236
+ * pctxt, NULL, 0, c_filename, c_encoding)
+ * if error:
+ * raise MemoryError() # <<<<<<<<<<<<<<
+ * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt)
+ *
+ */
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ }
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1237
+ * if error:
+ * raise MemoryError()
+ * __GLOBAL_PARSER_CONTEXT.initParserDict(pctxt) # <<<<<<<<<<<<<<
+ *
+ * #print pctxt.charset, 'NONE' if c_encoding is NULL else c_encoding
+ */
+ __pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_pctxt);
goto __pyx_L6;
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1198
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1241
* #print pctxt.charset, 'NONE' if c_encoding is NULL else c_encoding
*
+ * fixup_error = 0 # <<<<<<<<<<<<<<
+ * while py_buffer_len > 0 and (error == 0 or recover):
+ * with nogil:
+ */
+ __pyx_v_fixup_error = 0;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1242
+ *
+ * fixup_error = 0
* while py_buffer_len > 0 and (error == 0 or recover): # <<<<<<<<<<<<<<
* with nogil:
* if py_buffer_len > limits.INT_MAX:
while (1) {
__pyx_t_5 = ((__pyx_v_py_buffer_len > 0) != 0);
if (__pyx_t_5) {
- __pyx_t_4 = ((__pyx_v_error == 0) != 0);
- if (!__pyx_t_4) {
- __pyx_t_10 = (__pyx_v_recover != 0);
+ __pyx_t_11 = ((__pyx_v_error == 0) != 0);
+ if (!__pyx_t_11) {
+ __pyx_t_4 = (__pyx_v_recover != 0);
} else {
- __pyx_t_10 = __pyx_t_4;
+ __pyx_t_4 = __pyx_t_11;
}
- __pyx_t_4 = __pyx_t_10;
+ __pyx_t_11 = __pyx_t_4;
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_11 = __pyx_t_5;
}
- if (!__pyx_t_4) break;
+ if (!__pyx_t_11) break;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1199
- *
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1243
+ * fixup_error = 0
* while py_buffer_len > 0 and (error == 0 or recover):
* with nogil: # <<<<<<<<<<<<<<
* if py_buffer_len > limits.INT_MAX:
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1200
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1244
* while py_buffer_len > 0 and (error == 0 or recover):
* with nogil:
* if py_buffer_len > limits.INT_MAX: # <<<<<<<<<<<<<<
* buffer_len = limits.INT_MAX
* else:
*/
- __pyx_t_4 = ((__pyx_v_py_buffer_len > INT_MAX) != 0);
- if (__pyx_t_4) {
+ __pyx_t_11 = ((__pyx_v_py_buffer_len > INT_MAX) != 0);
+ if (__pyx_t_11) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1201
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1245
* with nogil:
* if py_buffer_len > limits.INT_MAX:
* buffer_len = limits.INT_MAX # <<<<<<<<<<<<<<
* buffer_len = <int>py_buffer_len
*/
__pyx_v_buffer_len = INT_MAX;
- goto __pyx_L15;
+ goto __pyx_L19;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1203
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1247
* buffer_len = limits.INT_MAX
* else:
* buffer_len = <int>py_buffer_len # <<<<<<<<<<<<<<
* if self._for_html:
- * error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0)
+ * c_node = pctxt.node # last node where the parser stopped
*/
__pyx_v_buffer_len = ((int)__pyx_v_py_buffer_len);
}
- __pyx_L15:;
+ __pyx_L19:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1204
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1248
* else:
* buffer_len = <int>py_buffer_len
* if self._for_html: # <<<<<<<<<<<<<<
+ * c_node = pctxt.node # last node where the parser stopped
* error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0)
- * else:
*/
- __pyx_t_4 = (__pyx_v_self->__pyx_base._for_html != 0);
- if (__pyx_t_4) {
+ __pyx_t_11 = (__pyx_v_self->__pyx_base._for_html != 0);
+ if (__pyx_t_11) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1205
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1249
* buffer_len = <int>py_buffer_len
* if self._for_html:
+ * c_node = pctxt.node # last node where the parser stopped # <<<<<<<<<<<<<<
+ * error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0)
+ * # and now for the fun part: move node names to the dict
+ */
+ __pyx_t_12 = __pyx_v_pctxt->node;
+ __pyx_v_c_node = __pyx_t_12;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1250
+ * if self._for_html:
+ * c_node = pctxt.node # last node where the parser stopped
* error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0) # <<<<<<<<<<<<<<
+ * # and now for the fun part: move node names to the dict
+ * if pctxt.myDoc:
+ */
+ __pyx_v_error = htmlParseChunk(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, 0);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1252
+ * error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0)
+ * # and now for the fun part: move node names to the dict
+ * if pctxt.myDoc: # <<<<<<<<<<<<<<
+ * fixup_error = _fixHtmlDictSubtreeNames(
+ * pctxt.dict, pctxt.myDoc, c_node)
+ */
+ __pyx_t_11 = (__pyx_v_pctxt->myDoc != 0);
+ if (__pyx_t_11) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1253
+ * # and now for the fun part: move node names to the dict
+ * if pctxt.myDoc:
+ * fixup_error = _fixHtmlDictSubtreeNames( # <<<<<<<<<<<<<<
+ * pctxt.dict, pctxt.myDoc, c_node)
+ * if pctxt.myDoc.dict and pctxt.myDoc.dict is not pctxt.dict:
+ */
+ __pyx_v_fixup_error = __pyx_f_4lxml_5etree__fixHtmlDictSubtreeNames(__pyx_v_pctxt->dict, __pyx_v_pctxt->myDoc, __pyx_v_c_node);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1255
+ * fixup_error = _fixHtmlDictSubtreeNames(
+ * pctxt.dict, pctxt.myDoc, c_node)
+ * if pctxt.myDoc.dict and pctxt.myDoc.dict is not pctxt.dict: # <<<<<<<<<<<<<<
+ * xmlparser.xmlDictFree(pctxt.myDoc.dict)
+ * pctxt.myDoc.dict = pctxt.dict
+ */
+ if ((__pyx_v_pctxt->myDoc->dict != 0)) {
+ __pyx_t_11 = ((__pyx_v_pctxt->myDoc->dict != __pyx_v_pctxt->dict) != 0);
+ __pyx_t_5 = __pyx_t_11;
+ } else {
+ __pyx_t_5 = (__pyx_v_pctxt->myDoc->dict != 0);
+ }
+ if (__pyx_t_5) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1256
+ * pctxt.dict, pctxt.myDoc, c_node)
+ * if pctxt.myDoc.dict and pctxt.myDoc.dict is not pctxt.dict:
+ * xmlparser.xmlDictFree(pctxt.myDoc.dict) # <<<<<<<<<<<<<<
+ * pctxt.myDoc.dict = pctxt.dict
+ * xmlparser.xmlDictReference(pctxt.dict)
+ */
+ xmlDictFree(__pyx_v_pctxt->myDoc->dict);
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1257
+ * if pctxt.myDoc.dict and pctxt.myDoc.dict is not pctxt.dict:
+ * xmlparser.xmlDictFree(pctxt.myDoc.dict)
+ * pctxt.myDoc.dict = pctxt.dict # <<<<<<<<<<<<<<
+ * xmlparser.xmlDictReference(pctxt.dict)
+ * else:
+ */
+ __pyx_t_13 = __pyx_v_pctxt->dict;
+ __pyx_v_pctxt->myDoc->dict = __pyx_t_13;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1258
+ * xmlparser.xmlDictFree(pctxt.myDoc.dict)
+ * pctxt.myDoc.dict = pctxt.dict
+ * xmlparser.xmlDictReference(pctxt.dict) # <<<<<<<<<<<<<<
* else:
* error = xmlparser.xmlParseChunk(pctxt, c_data, buffer_len, 0)
*/
- __pyx_v_error = htmlParseChunk(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, 0);
- goto __pyx_L16;
+ xmlDictReference(__pyx_v_pctxt->dict);
+ goto __pyx_L22;
+ }
+ __pyx_L22:;
+ goto __pyx_L21;
+ }
+ __pyx_L21:;
+ goto __pyx_L20;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1207
- * error = htmlparser.htmlParseChunk(pctxt, c_data, buffer_len, 0)
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1260
+ * xmlparser.xmlDictReference(pctxt.dict)
* else:
* error = xmlparser.xmlParseChunk(pctxt, c_data, buffer_len, 0) # <<<<<<<<<<<<<<
* py_buffer_len -= buffer_len
*/
__pyx_v_error = xmlParseChunk(__pyx_v_pctxt, __pyx_v_c_data, __pyx_v_buffer_len, 0);
}
- __pyx_L16:;
+ __pyx_L20:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1208
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1261
* else:
* error = xmlparser.xmlParseChunk(pctxt, c_data, buffer_len, 0)
* py_buffer_len -= buffer_len # <<<<<<<<<<<<<<
*/
__pyx_v_py_buffer_len = (__pyx_v_py_buffer_len - __pyx_v_buffer_len);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1209
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1262
* error = xmlparser.xmlParseChunk(pctxt, c_data, buffer_len, 0)
* py_buffer_len -= buffer_len
* c_data += buffer_len # <<<<<<<<<<<<<<
*
- * if error and not pctxt.replaceEntities and not pctxt.validate:
+ * if fixup_error and not context.has_raised():
*/
__pyx_v_c_data = (__pyx_v_c_data + __pyx_v_buffer_len);
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1199
- *
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1243
+ * fixup_error = 0
* while py_buffer_len > 0 and (error == 0 or recover):
* with nogil: # <<<<<<<<<<<<<<
* if py_buffer_len > limits.INT_MAX:
#ifdef WITH_THREAD
Py_BLOCK_THREADS
#endif
- goto __pyx_L14;
+ goto __pyx_L18;
}
- __pyx_L14:;
+ __pyx_L18:;
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1211
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1264
* c_data += buffer_len
*
+ * if fixup_error and not context.has_raised(): # <<<<<<<<<<<<<<
+ * context.store_exception(MemoryError())
+ *
+ */
+ if ((__pyx_v_fixup_error != 0)) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context), __pyx_n_s_has_raised); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1264; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_11 = (!__pyx_t_5);
+ __pyx_t_5 = __pyx_t_11;
+ } else {
+ __pyx_t_5 = (__pyx_v_fixup_error != 0);
+ }
+ if (__pyx_t_5) {
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1265
+ *
+ * if fixup_error and not context.has_raised():
+ * context.store_exception(MemoryError()) # <<<<<<<<<<<<<<
+ *
+ * if error and not pctxt.replaceEntities and not pctxt.validate:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context), __pyx_n_s_store_exception); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L23;
+ }
+ __pyx_L23:;
+
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1267
+ * context.store_exception(MemoryError())
+ *
* if error and not pctxt.replaceEntities and not pctxt.validate: # <<<<<<<<<<<<<<
* # in this mode, we ignore errors about undefined entities
* for entry in context._error_log.filter_from_errors():
*/
if ((__pyx_v_error != 0)) {
- __pyx_t_4 = (!(__pyx_v_pctxt->replaceEntities != 0));
- if (__pyx_t_4) {
- __pyx_t_5 = (!(__pyx_v_pctxt->validate != 0));
- __pyx_t_10 = __pyx_t_5;
+ __pyx_t_5 = (!(__pyx_v_pctxt->replaceEntities != 0));
+ if (__pyx_t_5) {
+ __pyx_t_11 = (!(__pyx_v_pctxt->validate != 0));
+ __pyx_t_4 = __pyx_t_11;
} else {
- __pyx_t_10 = __pyx_t_4;
+ __pyx_t_4 = __pyx_t_5;
}
- __pyx_t_4 = __pyx_t_10;
+ __pyx_t_5 = __pyx_t_4;
} else {
- __pyx_t_4 = (__pyx_v_error != 0);
+ __pyx_t_5 = (__pyx_v_error != 0);
}
- if (__pyx_t_4) {
+ if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1213
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1269
* if error and not pctxt.replaceEntities and not pctxt.validate:
* # in this mode, we ignore errors about undefined entities
* for entry in context._error_log.filter_from_errors(): # <<<<<<<<<<<<<<
* if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \
* entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY:
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_error_log), __pyx_n_s_filter_from_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_context->_error_log), __pyx_n_s_filter_from_errors); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
- __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0;
- __pyx_t_12 = NULL;
+ if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_14 = 0;
+ __pyx_t_15 = NULL;
} else {
- __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ __pyx_t_15 = Py_TYPE(__pyx_t_1)->tp_iternext;
}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
for (;;) {
- if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_1)) {
- if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ if (!__pyx_t_15 && PyList_CheckExact(__pyx_t_1)) {
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_1)) {
- if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ } else if (!__pyx_t_15 && PyTuple_CheckExact(__pyx_t_1)) {
+ if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- __pyx_t_3 = __pyx_t_12(__pyx_t_1);
- if (unlikely(!__pyx_t_3)) {
+ __pyx_t_2 = __pyx_t_15(__pyx_t_1);
+ if (unlikely(!__pyx_t_2)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_t_2);
}
- __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_3);
- __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_2);
+ __pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1214
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1270
* # in this mode, we ignore errors about undefined entities
* for entry in context._error_log.filter_from_errors():
* if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \ # <<<<<<<<<<<<<<
* entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY:
* break
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WAR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_13);
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_13, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WAR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_16, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- if (__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1270; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1215
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1271
* for entry in context._error_log.filter_from_errors():
* if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \
* entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY: # <<<<<<<<<<<<<<
* break
* else:
*/
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_2);
- __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_13);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_ERR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_16 = __Pyx_GetModuleGlobalName(__pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_ERR_UNDECLARED_ENTITY); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_16 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_16); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1215; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __pyx_t_5 = __pyx_t_10;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_11 = __pyx_t_4;
} else {
- __pyx_t_5 = __pyx_t_4;
+ __pyx_t_11 = __pyx_t_5;
}
- if (__pyx_t_5) {
+ if (__pyx_t_11) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1216
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1272
* if entry.type != ErrorTypes.WAR_UNDECLARED_ENTITY and \
* entry.type != ErrorTypes.ERR_UNDECLARED_ENTITY:
* break # <<<<<<<<<<<<<<
* else:
* error = 0
*/
- goto __pyx_L19_break;
+ goto __pyx_L26_break;
}
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1218
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1274
* break
* else:
* error = 0 # <<<<<<<<<<<<<<
*
- * if not recover and (error or not pctxt.wellFormed):
+ * if fixup_error or not recover and (error or not pctxt.wellFormed):
*/
__pyx_v_error = 0;
}
- __pyx_L19_break:;
+ __pyx_L26_break:;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- goto __pyx_L17;
+ goto __pyx_L24;
}
- __pyx_L17:;
+ __pyx_L24:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1220
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1276
* error = 0
*
- * if not recover and (error or not pctxt.wellFormed): # <<<<<<<<<<<<<<
+ * if fixup_error or not recover and (error or not pctxt.wellFormed): # <<<<<<<<<<<<<<
* self._feed_parser_running = 0
* try:
*/
- __pyx_t_5 = (!(__pyx_v_recover != 0));
- if (__pyx_t_5) {
- if (!(__pyx_v_error != 0)) {
- __pyx_t_4 = (!(__pyx_v_pctxt->wellFormed != 0));
- __pyx_t_10 = __pyx_t_4;
+ if (!(__pyx_v_fixup_error != 0)) {
+ __pyx_t_11 = (!(__pyx_v_recover != 0));
+ if (__pyx_t_11) {
+ if (!(__pyx_v_error != 0)) {
+ __pyx_t_5 = (!(__pyx_v_pctxt->wellFormed != 0));
+ __pyx_t_4 = __pyx_t_5;
+ } else {
+ __pyx_t_4 = (__pyx_v_error != 0);
+ }
+ __pyx_t_5 = __pyx_t_4;
} else {
- __pyx_t_10 = (__pyx_v_error != 0);
+ __pyx_t_5 = __pyx_t_11;
}
- __pyx_t_4 = __pyx_t_10;
+ __pyx_t_11 = __pyx_t_5;
} else {
- __pyx_t_4 = __pyx_t_5;
+ __pyx_t_11 = (__pyx_v_fixup_error != 0);
}
- if (__pyx_t_4) {
+ if (__pyx_t_11) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1221
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1277
*
- * if not recover and (error or not pctxt.wellFormed):
+ * if fixup_error or not recover and (error or not pctxt.wellFormed):
* self._feed_parser_running = 0 # <<<<<<<<<<<<<<
* try:
* context._handleParseResult(self, pctxt.myDoc, None)
*/
__pyx_v_self->_feed_parser_running = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1222
- * if not recover and (error or not pctxt.wellFormed):
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1278
+ * if fixup_error or not recover and (error or not pctxt.wellFormed):
* self._feed_parser_running = 0
* try: # <<<<<<<<<<<<<<
* context._handleParseResult(self, pctxt.myDoc, None)
*/
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1223
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1279
* self._feed_parser_running = 0
* try:
* context._handleParseResult(self, pctxt.myDoc, None) # <<<<<<<<<<<<<<
* finally:
* context.cleanup()
*/
- __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResult(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_pctxt->myDoc, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1223; __pyx_clineno = __LINE__; goto __pyx_L24_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResult(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_pctxt->myDoc, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1279; __pyx_clineno = __LINE__; goto __pyx_L31_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1225
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1281
* context._handleParseResult(self, pctxt.myDoc, None)
* finally:
* context.cleanup() # <<<<<<<<<<<<<<
*/
/*finally:*/ {
/*normal exit:*/{
- __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- goto __pyx_L25;
+ __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L32;
}
/*exception exit:*/{
- __pyx_L24_error:;
- __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L31_error:;
+ __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
- if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18);
- __Pyx_XGOTREF(__pyx_t_16);
- __Pyx_XGOTREF(__pyx_t_17);
- __Pyx_XGOTREF(__pyx_t_18);
+ if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
+ if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
__Pyx_XGOTREF(__pyx_t_19);
__Pyx_XGOTREF(__pyx_t_20);
__Pyx_XGOTREF(__pyx_t_21);
- __pyx_t_8 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename;
+ __Pyx_XGOTREF(__pyx_t_22);
+ __Pyx_XGOTREF(__pyx_t_23);
+ __Pyx_XGOTREF(__pyx_t_24);
+ __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
{
- __pyx_t_22 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_22 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L27_error;}
+ __pyx_t_25 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_25 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L34_error;}
}
if (PY_MAJOR_VERSION >= 3) {
- __Pyx_XGIVEREF(__pyx_t_19);
- __Pyx_XGIVEREF(__pyx_t_20);
- __Pyx_XGIVEREF(__pyx_t_21);
- __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+ __Pyx_XGIVEREF(__pyx_t_22);
+ __Pyx_XGIVEREF(__pyx_t_23);
+ __Pyx_XGIVEREF(__pyx_t_24);
+ __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
}
- __Pyx_XGIVEREF(__pyx_t_16);
- __Pyx_XGIVEREF(__pyx_t_17);
- __Pyx_XGIVEREF(__pyx_t_18);
- __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18);
- __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
- __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15;
+ __Pyx_XGIVEREF(__pyx_t_19);
+ __Pyx_XGIVEREF(__pyx_t_20);
+ __Pyx_XGIVEREF(__pyx_t_21);
+ __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
+ __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
+ __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
goto __pyx_L1_error;
- __pyx_L27_error:;
+ __pyx_L34_error:;
if (PY_MAJOR_VERSION >= 3) {
- __Pyx_XGIVEREF(__pyx_t_19);
- __Pyx_XGIVEREF(__pyx_t_20);
- __Pyx_XGIVEREF(__pyx_t_21);
- __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
- }
- __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0;
+ __Pyx_XGIVEREF(__pyx_t_22);
+ __Pyx_XGIVEREF(__pyx_t_23);
+ __Pyx_XGIVEREF(__pyx_t_24);
+ __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
+ }
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
+ __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
goto __pyx_L1_error;
}
- __pyx_L25:;
+ __pyx_L32:;
}
- goto __pyx_L22;
+ goto __pyx_L29;
}
- __pyx_L22:;
+ __pyx_L29:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1135
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1155
* return self._getPushParserContext()._error_log.copy()
*
* cpdef feed(self, data): # <<<<<<<<<<<<<<
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_3);
- __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_16);
__Pyx_AddTraceback("lxml.etree._FeedParser.feed", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("feed", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->feed(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->feed(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1227
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1283
* context.cleanup()
*
* cpdef close(self): # <<<<<<<<<<<<<<
if (unlikely(__pyx_skip_dispatch)) ;
/* Check if overridden in Python */
else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_3close)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1238
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1294
* parser interface, all other usage is undefined.
* """
* if not self._feed_parser_running: # <<<<<<<<<<<<<<
__pyx_t_3 = ((!(__pyx_v_self->_feed_parser_running != 0)) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1239
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1295
* """
* if not self._feed_parser_running:
* raise XMLSyntaxError(u"no element found", # <<<<<<<<<<<<<<
* xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0)
*
*/
- __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_XMLSyntaxError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1240
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1296
* if not self._feed_parser_running:
* raise XMLSyntaxError(u"no element found",
* xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0) # <<<<<<<<<<<<<<
*
* context = self._getPushParserContext()
*/
- __pyx_t_2 = PyInt_FromLong(XML_ERR_INTERNAL_ERROR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyInt_FromLong(XML_ERR_INTERNAL_ERROR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1239
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1295
* """
* if not self._feed_parser_running:
* raise XMLSyntaxError(u"no element found", # <<<<<<<<<<<<<<
* xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0)
*
*/
- __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_kp_u_no_element_found);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_no_element_found);
PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_int_0);
__Pyx_GIVEREF(__pyx_int_0);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1242
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1298
* xmlerror.XML_ERR_INTERNAL_ERROR, 0, 0)
*
* context = self._getPushParserContext() # <<<<<<<<<<<<<<
* pctxt = context._c_ctxt
*
*/
- __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)__pyx_t_2);
__pyx_t_2 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1243
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1299
*
* context = self._getPushParserContext()
* pctxt = context._c_ctxt # <<<<<<<<<<<<<<
__pyx_t_5 = __pyx_v_context->_c_ctxt;
__pyx_v_pctxt = __pyx_t_5;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1245
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1301
* pctxt = context._c_ctxt
*
* self._feed_parser_running = 0 # <<<<<<<<<<<<<<
*/
__pyx_v_self->_feed_parser_running = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1246
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1302
*
* self._feed_parser_running = 0
* if self._for_html: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_self->__pyx_base._for_html != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1247
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1303
* self._feed_parser_running = 0
* if self._for_html:
* htmlparser.htmlParseChunk(pctxt, NULL, 0, 1) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1249
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1305
* htmlparser.htmlParseChunk(pctxt, NULL, 0, 1)
* else:
* xmlparser.xmlParseChunk(pctxt, NULL, 0, 1) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1251
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1307
* xmlparser.xmlParseChunk(pctxt, NULL, 0, 1)
*
* if (pctxt.recovery and not pctxt.disableSAX and # <<<<<<<<<<<<<<
__pyx_t_3 = ((!(__pyx_v_pctxt->disableSAX != 0)) != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1252
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1308
*
* if (pctxt.recovery and not pctxt.disableSAX and
* isinstance(context, _SaxParserContext)): # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1254
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1310
* isinstance(context, _SaxParserContext)):
* # apply any left-over 'end' events
* (<_SaxParserContext>context).flushEvents() # <<<<<<<<<<<<<<
*
* try:
*/
- __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_context)->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->flushEvents(((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_context)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext *)((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_context)->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->flushEvents(((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_v_context)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L5;
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1256
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1312
* (<_SaxParserContext>context).flushEvents()
*
* try: # <<<<<<<<<<<<<<
*/
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1257
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1313
*
* try:
* result = context._handleParseResult(self, pctxt.myDoc, None) # <<<<<<<<<<<<<<
* finally:
* context.cleanup()
*/
- __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResult(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_pctxt->myDoc, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
+ __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->_handleParseResult(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_pctxt->myDoc, Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1313; __pyx_clineno = __LINE__; goto __pyx_L7_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_result = __pyx_t_2;
__pyx_t_2 = 0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1259
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1315
* result = context._handleParseResult(self, pctxt.myDoc, None)
* finally:
* context.cleanup() # <<<<<<<<<<<<<<
*/
/*finally:*/ {
/*normal exit:*/{
- __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L8;
}
/*exception exit:*/{
__Pyx_XGOTREF(__pyx_t_16);
__pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
{
- __pyx_t_17 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1259; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
+ __pyx_t_17 = ((struct __pyx_vtabstruct_4lxml_5etree__ParserContext *)__pyx_v_context->__pyx_base.__pyx_base.__pyx_vtab)->cleanup(__pyx_v_context); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1315; __pyx_clineno = __LINE__; goto __pyx_L10_error;}
}
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_14);
__pyx_L8:;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1261
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1317
* context.cleanup()
*
* if isinstance(result, _Document): # <<<<<<<<<<<<<<
__pyx_t_7 = (__pyx_t_3 != 0);
if (__pyx_t_7) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1262
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1318
*
* if isinstance(result, _Document):
* return (<_Document>result).getroot() # <<<<<<<<<<<<<<
* return result
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = __pyx_f_4lxml_5etree_9_Document_getroot(((struct LxmlDocument *)__pyx_v_result)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1262; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree_9_Document_getroot(((struct LxmlDocument *)__pyx_v_result)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1264
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1320
* return (<_Document>result).getroot()
* else:
* return result # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1227
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1283
* context.cleanup()
*
* cpdef close(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("close", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__FeedParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->close(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1266
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1322
* return result
*
* cdef int _htmlCtxtResetPush(xmlparser.xmlParserCtxt* c_ctxt, # <<<<<<<<<<<<<<
int __pyx_t_3;
__Pyx_RefNannySetupContext("_htmlCtxtResetPush", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1272
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1328
* cdef xmlparser.xmlParserInput* c_input_stream
* # libxml2 crashes if spaceTab is not initialised
* if _LIBXML_VERSION_INT < 20629 and c_ctxt.spaceTab is NULL: # <<<<<<<<<<<<<<
}
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1273
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1329
* # libxml2 crashes if spaceTab is not initialised
* if _LIBXML_VERSION_INT < 20629 and c_ctxt.spaceTab is NULL:
* c_ctxt.spaceTab = <int*>tree.xmlMalloc(10 * sizeof(int)) # <<<<<<<<<<<<<<
*/
__pyx_v_c_ctxt->spaceTab = ((int *)xmlMalloc((10 * (sizeof(int)))));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1274
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1330
* if _LIBXML_VERSION_INT < 20629 and c_ctxt.spaceTab is NULL:
* c_ctxt.spaceTab = <int*>tree.xmlMalloc(10 * sizeof(int))
* c_ctxt.spaceMax = 10 # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1277
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1333
*
* # libxml2 lacks an HTML push parser setup function
* error = xmlparser.xmlCtxtResetPush( # <<<<<<<<<<<<<<
*/
__pyx_v_error = xmlCtxtResetPush(__pyx_v_c_ctxt, NULL, 0, __pyx_v_c_filename, __pyx_v_c_encoding);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1279
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1335
* error = xmlparser.xmlCtxtResetPush(
* c_ctxt, NULL, 0, c_filename, c_encoding)
* if error: # <<<<<<<<<<<<<<
__pyx_t_3 = (__pyx_v_error != 0);
if (__pyx_t_3) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1280
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1336
* c_ctxt, NULL, 0, c_filename, c_encoding)
* if error:
* return error # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1283
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1339
*
* # fix libxml2 setup for HTML
* c_ctxt.progressive = 1 # <<<<<<<<<<<<<<
*/
__pyx_v_c_ctxt->progressive = 1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1284
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1340
* # fix libxml2 setup for HTML
* c_ctxt.progressive = 1
* c_ctxt.html = 1 # <<<<<<<<<<<<<<
*/
__pyx_v_c_ctxt->html = 1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1285
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1341
* c_ctxt.progressive = 1
* c_ctxt.html = 1
* htmlparser.htmlCtxtUseOptions(c_ctxt, parse_options) # <<<<<<<<<<<<<<
*/
htmlCtxtUseOptions(__pyx_v_c_ctxt, __pyx_v_parse_options);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1287
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1343
* htmlparser.htmlCtxtUseOptions(c_ctxt, parse_options)
*
* if c_data is not NULL and buffer_len > 0: # <<<<<<<<<<<<<<
}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1288
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1344
*
* if c_data is not NULL and buffer_len > 0:
* return htmlparser.htmlParseChunk(c_ctxt, c_data, buffer_len, 0) # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1289
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1345
* if c_data is not NULL and buffer_len > 0:
* return htmlparser.htmlParseChunk(c_ctxt, c_data, buffer_len, 0)
* return 0 # <<<<<<<<<<<<<<
__pyx_r = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1266
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1322
* return result
*
* cdef int _htmlCtxtResetPush(xmlparser.xmlParserCtxt* c_ctxt, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1347
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1403
* apply to the default parser.
* """
* def __init__(self, *, encoding=None, attribute_defaults=False, # <<<<<<<<<<<<<<
values[0] = ((PyObject *)Py_None);
values[1] = ((PyObject *)Py_False);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1348
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1404
* """
* def __init__(self, *, encoding=None, attribute_defaults=False,
* dtd_validation=False, load_dtd=False, no_network=True, # <<<<<<<<<<<<<<
values[3] = ((PyObject *)Py_False);
values[4] = ((PyObject *)Py_True);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1349
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1405
* def __init__(self, *, encoding=None, attribute_defaults=False,
* dtd_validation=False, load_dtd=False, no_network=True,
* ns_clean=False, recover=False, XMLSchema schema=None, # <<<<<<<<<<<<<<
values[6] = ((PyObject *)Py_False);
values[7] = (PyObject *)((struct __pyx_obj_4lxml_5etree_XMLSchema *)Py_None);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1350
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1406
* dtd_validation=False, load_dtd=False, no_network=True,
* ns_clean=False, recover=False, XMLSchema schema=None,
* huge_tree=False, remove_blank_text=False, resolve_entities=True, # <<<<<<<<<<<<<<
values[9] = ((PyObject *)Py_False);
values[10] = ((PyObject *)Py_True);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1351
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1407
* ns_clean=False, recover=False, XMLSchema schema=None,
* huge_tree=False, remove_blank_text=False, resolve_entities=True,
* remove_comments=False, remove_pis=False, strip_cdata=True, # <<<<<<<<<<<<<<
values[12] = ((PyObject *)Py_False);
values[13] = ((PyObject *)Py_True);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1352
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1408
* huge_tree=False, remove_blank_text=False, resolve_entities=True,
* remove_comments=False, remove_pis=False, strip_cdata=True,
* target=None, compact=True): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1347; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1403; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree.XMLParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_4lxml_5etree_9XMLParser___init__(((struct __pyx_obj_4lxml_5etree_XMLParser *)__pyx_v_self), __pyx_v_encoding, __pyx_v_attribute_defaults, __pyx_v_dtd_validation, __pyx_v_load_dtd, __pyx_v_no_network, __pyx_v_ns_clean, __pyx_v_recover, __pyx_v_schema, __pyx_v_huge_tree, __pyx_v_remove_blank_text, __pyx_v_resolve_entities, __pyx_v_remove_comments, __pyx_v_remove_pis, __pyx_v_strip_cdata, __pyx_v_target, __pyx_v_compact);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1347
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1403
* apply to the default parser.
* """
* def __init__(self, *, encoding=None, attribute_defaults=False, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1354
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1410
* target=None, compact=True):
* cdef int parse_options
* parse_options = _XML_DEFAULT_PARSE_OPTIONS # <<<<<<<<<<<<<<
*/
__pyx_v_parse_options = __pyx_v_4lxml_5etree__XML_DEFAULT_PARSE_OPTIONS;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1355
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1411
* cdef int parse_options
* parse_options = _XML_DEFAULT_PARSE_OPTIONS
* if load_dtd: # <<<<<<<<<<<<<<
* parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD
* if dtd_validation:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_load_dtd); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_load_dtd); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1356
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1412
* parse_options = _XML_DEFAULT_PARSE_OPTIONS
* if load_dtd:
* parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1357
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1413
* if load_dtd:
* parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD
* if dtd_validation: # <<<<<<<<<<<<<<
* parse_options = parse_options | xmlparser.XML_PARSE_DTDVALID | \
* xmlparser.XML_PARSE_DTDLOAD
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dtd_validation); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dtd_validation); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1358
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1414
* parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD
* if dtd_validation:
* parse_options = parse_options | xmlparser.XML_PARSE_DTDVALID | \ # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1360
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1416
* parse_options = parse_options | xmlparser.XML_PARSE_DTDVALID | \
* xmlparser.XML_PARSE_DTDLOAD
* if attribute_defaults: # <<<<<<<<<<<<<<
* parse_options = parse_options | xmlparser.XML_PARSE_DTDATTR
* if schema is None:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_attribute_defaults); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1360; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_attribute_defaults); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1361
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1417
* xmlparser.XML_PARSE_DTDLOAD
* if attribute_defaults:
* parse_options = parse_options | xmlparser.XML_PARSE_DTDATTR # <<<<<<<<<<<<<<
*/
__pyx_v_parse_options = (__pyx_v_parse_options | XML_PARSE_DTDATTR);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1362
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1418
* if attribute_defaults:
* parse_options = parse_options | xmlparser.XML_PARSE_DTDATTR
* if schema is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1363
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1419
* parse_options = parse_options | xmlparser.XML_PARSE_DTDATTR
* if schema is None:
* parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1364
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1420
* if schema is None:
* parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD
* if ns_clean: # <<<<<<<<<<<<<<
* parse_options = parse_options | xmlparser.XML_PARSE_NSCLEAN
* if recover:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ns_clean); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1364; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ns_clean); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1420; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1365
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1421
* parse_options = parse_options | xmlparser.XML_PARSE_DTDLOAD
* if ns_clean:
* parse_options = parse_options | xmlparser.XML_PARSE_NSCLEAN # <<<<<<<<<<<<<<
}
__pyx_L7:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1366
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1422
* if ns_clean:
* parse_options = parse_options | xmlparser.XML_PARSE_NSCLEAN
* if recover: # <<<<<<<<<<<<<<
* parse_options = parse_options | xmlparser.XML_PARSE_RECOVER
* if remove_blank_text:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_recover); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_recover); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1367
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1423
* parse_options = parse_options | xmlparser.XML_PARSE_NSCLEAN
* if recover:
* parse_options = parse_options | xmlparser.XML_PARSE_RECOVER # <<<<<<<<<<<<<<
}
__pyx_L8:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1368
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1424
* if recover:
* parse_options = parse_options | xmlparser.XML_PARSE_RECOVER
* if remove_blank_text: # <<<<<<<<<<<<<<
* parse_options = parse_options | xmlparser.XML_PARSE_NOBLANKS
* if huge_tree:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1369
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1425
* parse_options = parse_options | xmlparser.XML_PARSE_RECOVER
* if remove_blank_text:
* parse_options = parse_options | xmlparser.XML_PARSE_NOBLANKS # <<<<<<<<<<<<<<
}
__pyx_L9:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1370
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1426
* if remove_blank_text:
* parse_options = parse_options | xmlparser.XML_PARSE_NOBLANKS
* if huge_tree: # <<<<<<<<<<<<<<
* parse_options = parse_options | xmlparser.XML_PARSE_HUGE
* if not no_network:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_huge_tree); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_huge_tree); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1371
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1427
* parse_options = parse_options | xmlparser.XML_PARSE_NOBLANKS
* if huge_tree:
* parse_options = parse_options | xmlparser.XML_PARSE_HUGE # <<<<<<<<<<<<<<
}
__pyx_L10:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1372
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1428
* if huge_tree:
* parse_options = parse_options | xmlparser.XML_PARSE_HUGE
* if not no_network: # <<<<<<<<<<<<<<
* parse_options = parse_options ^ xmlparser.XML_PARSE_NONET
* if not compact:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_no_network); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_no_network); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = ((!__pyx_t_2) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1373
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1429
* parse_options = parse_options | xmlparser.XML_PARSE_HUGE
* if not no_network:
* parse_options = parse_options ^ xmlparser.XML_PARSE_NONET # <<<<<<<<<<<<<<
}
__pyx_L11:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1374
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1430
* if not no_network:
* parse_options = parse_options ^ xmlparser.XML_PARSE_NONET
* if not compact: # <<<<<<<<<<<<<<
* parse_options = parse_options ^ xmlparser.XML_PARSE_COMPACT
* if not resolve_entities:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compact); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compact); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = ((!__pyx_t_1) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1375
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1431
* parse_options = parse_options ^ xmlparser.XML_PARSE_NONET
* if not compact:
* parse_options = parse_options ^ xmlparser.XML_PARSE_COMPACT # <<<<<<<<<<<<<<
}
__pyx_L12:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1376
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1432
* if not compact:
* parse_options = parse_options ^ xmlparser.XML_PARSE_COMPACT
* if not resolve_entities: # <<<<<<<<<<<<<<
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOENT
* if not strip_cdata:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_resolve_entities); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_resolve_entities); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = ((!__pyx_t_2) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1377
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1433
* parse_options = parse_options ^ xmlparser.XML_PARSE_COMPACT
* if not resolve_entities:
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOENT # <<<<<<<<<<<<<<
}
__pyx_L13:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1378
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1434
* if not resolve_entities:
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOENT
* if not strip_cdata: # <<<<<<<<<<<<<<
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOCDATA
*
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_strip_cdata); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_strip_cdata); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = ((!__pyx_t_1) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1379
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1435
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOENT
* if not strip_cdata:
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOCDATA # <<<<<<<<<<<<<<
}
__pyx_L14:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1381
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1437
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOCDATA
*
* _BaseParser.__init__(self, parse_options, 0, schema, # <<<<<<<<<<<<<<
* remove_comments, remove_pis, strip_cdata,
* target, encoding)
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__BaseParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__BaseParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_parse_options); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_parse_options); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1383
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1439
* _BaseParser.__init__(self, parse_options, 0, schema,
* remove_comments, remove_pis, strip_cdata,
* target, encoding) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(__pyx_v_encoding);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1381
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1437
* parse_options = parse_options ^ xmlparser.XML_PARSE_NOCDATA
*
* _BaseParser.__init__(self, parse_options, 0, schema, # <<<<<<<<<<<<<<
* remove_comments, remove_pis, strip_cdata,
* target, encoding)
*/
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1347
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1403
* apply to the default parser.
* """
* def __init__(self, *, encoding=None, attribute_defaults=False, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1404
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1460
* source, you can pass the ``base_url``.
* """
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1404; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
__Pyx_AddTraceback("lxml.etree.XMLPullParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannySetupContext("__init__", 0);
__Pyx_INCREF(__pyx_v_events);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1405
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1461
* """
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs):
* XMLParser.__init__(self, **kwargs) # <<<<<<<<<<<<<<
* if events is None:
* events = ('end',)
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__pyx_t_3 = __pyx_v_kwargs;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1406
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1462
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs):
* XMLParser.__init__(self, **kwargs)
* if events is None: # <<<<<<<<<<<<<<
__pyx_t_6 = (__pyx_t_5 != 0);
if (__pyx_t_6) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1407
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1463
* XMLParser.__init__(self, **kwargs)
* if events is None:
* events = ('end',) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1408
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1464
* if events is None:
* events = ('end',)
* self._setBaseURL(base_url) # <<<<<<<<<<<<<<
* self._collectEvents(events, tag)
*
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._setBaseURL(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_base_url); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1408; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._setBaseURL(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_base_url); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1409
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1465
* events = ('end',)
* self._setBaseURL(base_url)
* self._collectEvents(events, tag) # <<<<<<<<<<<<<<
*
* def read_events(self):
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._collectEvents(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._collectEvents(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1404
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1460
* source, you can pass the ``base_url``.
* """
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1411
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1467
* self._collectEvents(events, tag)
*
* def read_events(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_events", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1412
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1468
*
* def read_events(self):
* return (<_SaxParserContext?>self._getPushParserContext()).events_iterator # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__SaxParserContext)))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__SaxParserContext)))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_1)->events_iterator));
__pyx_r = ((PyObject *)((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_1)->events_iterator);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1411
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1467
* self._collectEvents(events, tag)
*
* def read_events(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1430
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1486
* and thus ignores comments and processing instructions.
* """
* def __init__(self, *, encoding=None, attribute_defaults=False, # <<<<<<<<<<<<<<
values[0] = ((PyObject *)Py_None);
values[1] = ((PyObject *)Py_False);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1431
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1487
* """
* def __init__(self, *, encoding=None, attribute_defaults=False,
* dtd_validation=False, load_dtd=False, no_network=True, # <<<<<<<<<<<<<<
values[3] = ((PyObject *)Py_False);
values[4] = ((PyObject *)Py_True);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1432
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1488
* def __init__(self, *, encoding=None, attribute_defaults=False,
* dtd_validation=False, load_dtd=False, no_network=True,
* ns_clean=False, recover=False, schema=None, # <<<<<<<<<<<<<<
values[6] = ((PyObject *)Py_False);
values[7] = ((PyObject *)Py_None);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1433
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1489
* dtd_validation=False, load_dtd=False, no_network=True,
* ns_clean=False, recover=False, schema=None,
* huge_tree=False, remove_blank_text=False, resolve_entities=True, # <<<<<<<<<<<<<<
values[9] = ((PyObject *)Py_False);
values[10] = ((PyObject *)Py_True);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1434
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1490
* ns_clean=False, recover=False, schema=None,
* huge_tree=False, remove_blank_text=False, resolve_entities=True,
* remove_comments=True, remove_pis=True, strip_cdata=True, # <<<<<<<<<<<<<<
values[12] = ((PyObject *)Py_True);
values[13] = ((PyObject *)Py_True);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1435
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1491
* huge_tree=False, remove_blank_text=False, resolve_entities=True,
* remove_comments=True, remove_pis=True, strip_cdata=True,
* target=None, compact=True): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1430; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree.ETCompatXMLParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
__pyx_L4_argument_unpacking_done:;
__pyx_r = __pyx_pf_4lxml_5etree_17ETCompatXMLParser___init__(((struct __pyx_obj_4lxml_5etree_ETCompatXMLParser *)__pyx_v_self), __pyx_v_encoding, __pyx_v_attribute_defaults, __pyx_v_dtd_validation, __pyx_v_load_dtd, __pyx_v_no_network, __pyx_v_ns_clean, __pyx_v_recover, __pyx_v_schema, __pyx_v_huge_tree, __pyx_v_remove_blank_text, __pyx_v_resolve_entities, __pyx_v_remove_comments, __pyx_v_remove_pis, __pyx_v_strip_cdata, __pyx_v_target, __pyx_v_compact);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1430
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1486
* and thus ignores comments and processing instructions.
* """
* def __init__(self, *, encoding=None, attribute_defaults=False, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1436
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1492
* remove_comments=True, remove_pis=True, strip_cdata=True,
* target=None, compact=True):
* XMLParser.__init__(self, # <<<<<<<<<<<<<<
* attribute_defaults=attribute_defaults,
* dtd_validation=dtd_validation,
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1437
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1493
* target=None, compact=True):
* XMLParser.__init__(self,
* attribute_defaults=attribute_defaults, # <<<<<<<<<<<<<<
* dtd_validation=dtd_validation,
* load_dtd=load_dtd,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_defaults, __pyx_v_attribute_defaults) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_attribute_defaults, __pyx_v_attribute_defaults) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1438
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1494
* XMLParser.__init__(self,
* attribute_defaults=attribute_defaults,
* dtd_validation=dtd_validation, # <<<<<<<<<<<<<<
* load_dtd=load_dtd,
* no_network=no_network,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtd_validation, __pyx_v_dtd_validation) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtd_validation, __pyx_v_dtd_validation) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1439
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1495
* attribute_defaults=attribute_defaults,
* dtd_validation=dtd_validation,
* load_dtd=load_dtd, # <<<<<<<<<<<<<<
* no_network=no_network,
* ns_clean=ns_clean,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_load_dtd, __pyx_v_load_dtd) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_load_dtd, __pyx_v_load_dtd) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1440
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1496
* dtd_validation=dtd_validation,
* load_dtd=load_dtd,
* no_network=no_network, # <<<<<<<<<<<<<<
* ns_clean=ns_clean,
* recover=recover,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_network, __pyx_v_no_network) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_network, __pyx_v_no_network) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1441
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1497
* load_dtd=load_dtd,
* no_network=no_network,
* ns_clean=ns_clean, # <<<<<<<<<<<<<<
* recover=recover,
* remove_blank_text=remove_blank_text,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ns_clean, __pyx_v_ns_clean) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ns_clean, __pyx_v_ns_clean) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1442
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1498
* no_network=no_network,
* ns_clean=ns_clean,
* recover=recover, # <<<<<<<<<<<<<<
* remove_blank_text=remove_blank_text,
* huge_tree=huge_tree,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recover, __pyx_v_recover) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recover, __pyx_v_recover) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1443
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1499
* ns_clean=ns_clean,
* recover=recover,
* remove_blank_text=remove_blank_text, # <<<<<<<<<<<<<<
* huge_tree=huge_tree,
* compact=compact,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_blank_text, __pyx_v_remove_blank_text) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_blank_text, __pyx_v_remove_blank_text) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1444
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1500
* recover=recover,
* remove_blank_text=remove_blank_text,
* huge_tree=huge_tree, # <<<<<<<<<<<<<<
* compact=compact,
* resolve_entities=resolve_entities,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_huge_tree, __pyx_v_huge_tree) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_huge_tree, __pyx_v_huge_tree) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1445
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1501
* remove_blank_text=remove_blank_text,
* huge_tree=huge_tree,
* compact=compact, # <<<<<<<<<<<<<<
* resolve_entities=resolve_entities,
* remove_comments=remove_comments,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compact, __pyx_v_compact) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compact, __pyx_v_compact) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1446
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1502
* huge_tree=huge_tree,
* compact=compact,
* resolve_entities=resolve_entities, # <<<<<<<<<<<<<<
* remove_comments=remove_comments,
* remove_pis=remove_pis,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_resolve_entities, __pyx_v_resolve_entities) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_resolve_entities, __pyx_v_resolve_entities) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1447
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1503
* compact=compact,
* resolve_entities=resolve_entities,
* remove_comments=remove_comments, # <<<<<<<<<<<<<<
* remove_pis=remove_pis,
* strip_cdata=strip_cdata,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_comments, __pyx_v_remove_comments) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_comments, __pyx_v_remove_comments) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1448
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1504
* resolve_entities=resolve_entities,
* remove_comments=remove_comments,
* remove_pis=remove_pis, # <<<<<<<<<<<<<<
* strip_cdata=strip_cdata,
* target=target,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_pis, __pyx_v_remove_pis) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_remove_pis, __pyx_v_remove_pis) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1449
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1505
* remove_comments=remove_comments,
* remove_pis=remove_pis,
* strip_cdata=strip_cdata, # <<<<<<<<<<<<<<
* target=target,
* encoding=encoding,
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_strip_cdata, __pyx_v_strip_cdata) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_strip_cdata, __pyx_v_strip_cdata) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1450
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1506
* remove_pis=remove_pis,
* strip_cdata=strip_cdata,
* target=target, # <<<<<<<<<<<<<<
* encoding=encoding,
* schema=schema)
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, __pyx_v_target) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, __pyx_v_target) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1451
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1507
* strip_cdata=strip_cdata,
* target=target,
* encoding=encoding, # <<<<<<<<<<<<<<
* schema=schema)
*
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_v_encoding) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1452
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1508
* target=target,
* encoding=encoding,
* schema=schema) # <<<<<<<<<<<<<<
*
* # ET 1.2 compatible name
*/
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, __pyx_v_schema) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_schema, __pyx_v_schema) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1436
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1492
* remove_comments=True, remove_pis=True, strip_cdata=True,
* target=None, compact=True):
* XMLParser.__init__(self, # <<<<<<<<<<<<<<
* attribute_defaults=attribute_defaults,
* dtd_validation=dtd_validation,
*/
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1430
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1486
* and thus ignores comments and processing instructions.
* """
* def __init__(self, *, encoding=None, attribute_defaults=False, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1463
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1519
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER)
*
* def set_default_parser(_BaseParser parser=None): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_default_parser") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_default_parser") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_4lxml_5etree_42set_default_parser(__pyx_self, __pyx_v_parser);
/* function exit code */
__Pyx_RefNannySetupContext("set_default_parser", 0);
__Pyx_INCREF((PyObject *)__pyx_v_parser);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1475
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1531
* parser for each thread explicitly or use a parser pool.
* """
* if parser is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1476
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1532
* """
* if parser is None:
* parser = __DEFAULT_XML_PARSER # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1477
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1533
* if parser is None:
* parser = __DEFAULT_XML_PARSER
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_parser);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1463
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1519
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER)
*
* def set_default_parser(_BaseParser parser=None): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1479
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1535
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser)
*
* def get_default_parser(): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("get_default_parser", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1481
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1537
* def get_default_parser():
* u"get_default_parser()"
* return __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<<
* ############################################################
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1537; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1479
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1535
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser)
*
* def get_default_parser(): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1526
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1582
* reasons.
* """
* def __init__(self, *, encoding=None, remove_blank_text=False, # <<<<<<<<<<<<<<
values[0] = ((PyObject *)Py_None);
values[1] = ((PyObject *)Py_False);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1527
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1583
* """
* def __init__(self, *, encoding=None, remove_blank_text=False,
* remove_comments=False, remove_pis=False, strip_cdata=True, # <<<<<<<<<<<<<<
values[3] = ((PyObject *)Py_False);
values[4] = ((PyObject *)Py_True);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1528
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1584
* def __init__(self, *, encoding=None, remove_blank_text=False,
* remove_comments=False, remove_pis=False, strip_cdata=True,
* no_network=True, target=None, XMLSchema schema=None, # <<<<<<<<<<<<<<
values[6] = ((PyObject *)Py_None);
values[7] = (PyObject *)((struct __pyx_obj_4lxml_5etree_XMLSchema *)Py_None);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1529
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1585
* remove_comments=False, remove_pis=False, strip_cdata=True,
* no_network=True, target=None, XMLSchema schema=None,
* recover=True, compact=True): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 0) {
goto __pyx_L5_argtuple_error;
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1526; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1582; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("lxml.etree.HTMLParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return -1;
__pyx_L4_argument_unpacking_done:;
- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_schema), __pyx_ptype_4lxml_5etree_XMLSchema, 1, "schema", 0))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_pf_4lxml_5etree_10HTMLParser___init__(((struct __pyx_obj_4lxml_5etree_HTMLParser *)__pyx_v_self), __pyx_v_encoding, __pyx_v_remove_blank_text, __pyx_v_remove_comments, __pyx_v_remove_pis, __pyx_v_strip_cdata, __pyx_v_no_network, __pyx_v_target, __pyx_v_schema, __pyx_v_recover, __pyx_v_compact);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1526
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1582
* reasons.
* """
* def __init__(self, *, encoding=None, remove_blank_text=False, # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1531
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1587
* recover=True, compact=True):
* cdef int parse_options
* parse_options = _HTML_DEFAULT_PARSE_OPTIONS # <<<<<<<<<<<<<<
*/
__pyx_v_parse_options = __pyx_v_4lxml_5etree__HTML_DEFAULT_PARSE_OPTIONS;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1532
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1588
* cdef int parse_options
* parse_options = _HTML_DEFAULT_PARSE_OPTIONS
* if remove_blank_text: # <<<<<<<<<<<<<<
* parse_options = parse_options | htmlparser.HTML_PARSE_NOBLANKS
* if not recover:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_blank_text); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1533
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1589
* parse_options = _HTML_DEFAULT_PARSE_OPTIONS
* if remove_blank_text:
* parse_options = parse_options | htmlparser.HTML_PARSE_NOBLANKS # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1534
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1590
* if remove_blank_text:
* parse_options = parse_options | htmlparser.HTML_PARSE_NOBLANKS
* if not recover: # <<<<<<<<<<<<<<
* parse_options = parse_options ^ htmlparser.HTML_PARSE_RECOVER
* if not no_network:
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_recover); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_recover); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = ((!__pyx_t_1) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1535
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1591
* parse_options = parse_options | htmlparser.HTML_PARSE_NOBLANKS
* if not recover:
* parse_options = parse_options ^ htmlparser.HTML_PARSE_RECOVER # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1536
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1592
* if not recover:
* parse_options = parse_options ^ htmlparser.HTML_PARSE_RECOVER
* if not no_network: # <<<<<<<<<<<<<<
* parse_options = parse_options ^ htmlparser.HTML_PARSE_NONET
* if not compact:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_no_network); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_no_network); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = ((!__pyx_t_2) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1537
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1593
* parse_options = parse_options ^ htmlparser.HTML_PARSE_RECOVER
* if not no_network:
* parse_options = parse_options ^ htmlparser.HTML_PARSE_NONET # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1538
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1594
* if not no_network:
* parse_options = parse_options ^ htmlparser.HTML_PARSE_NONET
* if not compact: # <<<<<<<<<<<<<<
* parse_options = parse_options ^ htmlparser.HTML_PARSE_COMPACT
*
*/
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compact); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1538; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compact); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = ((!__pyx_t_1) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1539
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1595
* parse_options = parse_options ^ htmlparser.HTML_PARSE_NONET
* if not compact:
* parse_options = parse_options ^ htmlparser.HTML_PARSE_COMPACT # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1541
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1597
* parse_options = parse_options ^ htmlparser.HTML_PARSE_COMPACT
*
* _BaseParser.__init__(self, parse_options, 1, schema, # <<<<<<<<<<<<<<
* remove_comments, remove_pis, strip_cdata,
* target, encoding)
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__BaseParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__BaseParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_parse_options); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_parse_options); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1543
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1599
* _BaseParser.__init__(self, parse_options, 1, schema,
* remove_comments, remove_pis, strip_cdata,
* target, encoding) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(9); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(__pyx_v_encoding);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1541
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1597
* parse_options = parse_options ^ htmlparser.HTML_PARSE_COMPACT
*
* _BaseParser.__init__(self, parse_options, 1, schema, # <<<<<<<<<<<<<<
* remove_comments, remove_pis, strip_cdata,
* target, encoding)
*/
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1526
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1582
* reasons.
* """
* def __init__(self, *, encoding=None, remove_blank_text=False, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1568
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1624
* source, you can pass the ``base_url``.
* """
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs): # <<<<<<<<<<<<<<
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1624; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
__Pyx_AddTraceback("lxml.etree.HTMLPullParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannySetupContext("__init__", 0);
__Pyx_INCREF(__pyx_v_events);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1569
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1625
* """
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs):
* HTMLParser.__init__(self, **kwargs) # <<<<<<<<<<<<<<
* if events is None:
* events = ('end',)
*/
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_HTMLParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_HTMLParser)), __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
__pyx_t_3 = __pyx_v_kwargs;
__Pyx_INCREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1569; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1570
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1626
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs):
* HTMLParser.__init__(self, **kwargs)
* if events is None: # <<<<<<<<<<<<<<
__pyx_t_6 = (__pyx_t_5 != 0);
if (__pyx_t_6) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1571
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1627
* HTMLParser.__init__(self, **kwargs)
* if events is None:
* events = ('end',) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1572
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1628
* if events is None:
* events = ('end',)
* self._setBaseURL(base_url) # <<<<<<<<<<<<<<
* self._collectEvents(events, tag)
*
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._setBaseURL(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_base_url); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._setBaseURL(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_base_url); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1573
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1629
* events = ('end',)
* self._setBaseURL(base_url)
* self._collectEvents(events, tag) # <<<<<<<<<<<<<<
*
* def read_events(self):
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._collectEvents(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1573; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._collectEvents(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self), __pyx_v_events, __pyx_v_tag); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1568
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1624
* source, you can pass the ``base_url``.
* """
* def __init__(self, events=None, *, tag=None, base_url=None, **kwargs): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1575
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1631
* self._collectEvents(events, tag)
*
* def read_events(self): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("read_events", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1576
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1632
*
* def read_events(self):
* return (<_SaxParserContext?>self._getPushParserContext()).events_iterator # <<<<<<<<<<<<<<
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.__pyx_base._getPushParserContext(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__SaxParserContext)))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__SaxParserContext)))) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1632; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_1)->events_iterator));
__pyx_r = ((PyObject *)((struct __pyx_obj_4lxml_5etree__SaxParserContext *)__pyx_t_1)->events_iterator);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1575
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1631
* self._collectEvents(events, tag)
*
* def read_events(self): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1583
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1639
* ############################################################
*
* cdef xmlDoc* _parseDoc(text, filename, _BaseParser parser) except NULL: # <<<<<<<<<<<<<<
__Pyx_INCREF(__pyx_v_text);
__Pyx_INCREF((PyObject *)__pyx_v_parser);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1588
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1644
* cdef Py_ssize_t c_len
* cdef bint is_pep393_string
* if parser is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1589
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1645
* cdef bint is_pep393_string
* if parser is None:
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<<
* if not filename:
* c_filename = NULL
*/
- __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3));
__pyx_t_3 = 0;
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1590
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1646
* if parser is None:
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser()
* if not filename: # <<<<<<<<<<<<<<
* c_filename = NULL
* else:
*/
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = ((!__pyx_t_2) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1591
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1647
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser()
* if not filename:
* c_filename = NULL # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1593
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1649
* c_filename = NULL
* else:
* filename_utf = _encodeFilenameUTF8(filename) # <<<<<<<<<<<<<<
* c_filename = _cstr(filename_utf)
* if isinstance(text, unicode):
*/
- __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilenameUTF8(__pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilenameUTF8(__pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1649; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_filename_utf = __pyx_t_3;
__pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1594
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1650
* else:
* filename_utf = _encodeFilenameUTF8(filename)
* c_filename = _cstr(filename_utf) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1595
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1651
* filename_utf = _encodeFilenameUTF8(filename)
* c_filename = _cstr(filename_utf)
* if isinstance(text, unicode): # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1597
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1653
* if isinstance(text, unicode):
* is_pep393_string = (
* python.PEP393_ENABLED and python.PyUnicode_IS_READY(text)) # <<<<<<<<<<<<<<
}
__pyx_v_is_pep393_string = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1598
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1654
* is_pep393_string = (
* python.PEP393_ENABLED and python.PyUnicode_IS_READY(text))
* if is_pep393_string: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_is_pep393_string != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1599
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1655
* python.PEP393_ENABLED and python.PyUnicode_IS_READY(text))
* if is_pep393_string:
* c_len = python.PyUnicode_GET_LENGTH(text) # <<<<<<<<<<<<<<
*/
__pyx_v_c_len = PyUnicode_GET_LENGTH(__pyx_v_text);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1600
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1656
* if is_pep393_string:
* c_len = python.PyUnicode_GET_LENGTH(text)
* c_len *= python.PyUnicode_KIND(text) # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1602
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1658
* c_len *= python.PyUnicode_KIND(text)
* else:
* c_len = python.PyUnicode_GET_DATA_SIZE(text) # <<<<<<<<<<<<<<
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1603
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1659
* else:
* c_len = python.PyUnicode_GET_DATA_SIZE(text)
* if c_len > limits.INT_MAX: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_len > INT_MAX) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1605
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1661
* if c_len > limits.INT_MAX:
* return (<_BaseParser>parser)._parseDocFromFilelike(
* StringIO(text), filename, None) # <<<<<<<<<<<<<<
* if _UNICODE_ENCODING is NULL and not is_pep393_string:
* text = (<unicode>text).encode('utf8')
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_text);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_text);
__Pyx_GIVEREF(__pyx_v_text);
- __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_5etree_StringIO, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1605; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_StringIO, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1604
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1660
* c_len = python.PyUnicode_GET_DATA_SIZE(text)
* if c_len > limits.INT_MAX:
* return (<_BaseParser>parser)._parseDocFromFilelike( # <<<<<<<<<<<<<<
* StringIO(text), filename, None)
* if _UNICODE_ENCODING is NULL and not is_pep393_string:
*/
- __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_4, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_4, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1606
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1662
* return (<_BaseParser>parser)._parseDocFromFilelike(
* StringIO(text), filename, None)
* if _UNICODE_ENCODING is NULL and not is_pep393_string: # <<<<<<<<<<<<<<
}
if (__pyx_t_6) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1607
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1663
* StringIO(text), filename, None)
* if _UNICODE_ENCODING is NULL and not is_pep393_string:
* text = (<unicode>text).encode('utf8') # <<<<<<<<<<<<<<
*/
if (unlikely(__pyx_v_text == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "encode");
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_text)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_text)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1663; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF_SET(__pyx_v_text, __pyx_t_4);
__pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1609
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1665
* text = (<unicode>text).encode('utf8')
* return (<_BaseParser>parser)._parseDocFromFilelike(
* BytesIO(text), filename, "UTF-8") # <<<<<<<<<<<<<<
* return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename)
* else:
*/
- __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_INCREF(__pyx_v_text);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_text);
__Pyx_GIVEREF(__pyx_v_text);
- __pyx_t_3 = PyObject_Call(__pyx_v_4lxml_5etree_BytesIO, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1609; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_BytesIO, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1665; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1608
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1664
* if _UNICODE_ENCODING is NULL and not is_pep393_string:
* text = (<unicode>text).encode('utf8')
* return (<_BaseParser>parser)._parseDocFromFilelike( # <<<<<<<<<<<<<<
* BytesIO(text), filename, "UTF-8")
* return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename)
*/
- __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, __pyx_kp_s_UTF_8); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_3, __pyx_v_filename, __pyx_kp_s_UTF_8); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_5;
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1610
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1666
* return (<_BaseParser>parser)._parseDocFromFilelike(
* BytesIO(text), filename, "UTF-8")
* return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename) # <<<<<<<<<<<<<<
* else:
* c_len = python.PyBytes_GET_SIZE(text)
*/
- __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseUnicodeDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_text, __pyx_v_c_filename); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1610; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseUnicodeDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_text, __pyx_v_c_filename); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_5;
goto __pyx_L0;
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1612
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1668
* return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename)
* else:
* c_len = python.PyBytes_GET_SIZE(text) # <<<<<<<<<<<<<<
*/
__pyx_v_c_len = PyBytes_GET_SIZE(__pyx_v_text);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1613
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1669
* else:
* c_len = python.PyBytes_GET_SIZE(text)
* if c_len > limits.INT_MAX: # <<<<<<<<<<<<<<
__pyx_t_6 = ((__pyx_v_c_len > INT_MAX) != 0);
if (__pyx_t_6) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1615
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1671
* if c_len > limits.INT_MAX:
* return (<_BaseParser>parser)._parseDocFromFilelike(
* BytesIO(text), filename, None) # <<<<<<<<<<<<<<
* c_text = _cstr(text)
* return (<_BaseParser>parser)._parseDoc(c_text, c_len, c_filename)
*/
- __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_INCREF(__pyx_v_text);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_text);
__Pyx_GIVEREF(__pyx_v_text);
- __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_5etree_BytesIO, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1615; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_BytesIO, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1614
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1670
* c_len = python.PyBytes_GET_SIZE(text)
* if c_len > limits.INT_MAX:
* return (<_BaseParser>parser)._parseDocFromFilelike( # <<<<<<<<<<<<<<
* BytesIO(text), filename, None)
* c_text = _cstr(text)
*/
- __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_4, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_t_4, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_r = __pyx_t_5;
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1616
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1672
* return (<_BaseParser>parser)._parseDocFromFilelike(
* BytesIO(text), filename, None)
* c_text = _cstr(text) # <<<<<<<<<<<<<<
*/
__pyx_v_c_text = PyBytes_AS_STRING(__pyx_v_text);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1617
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1673
* BytesIO(text), filename, None)
* c_text = _cstr(text)
* return (<_BaseParser>parser)._parseDoc(c_text, c_len, c_filename) # <<<<<<<<<<<<<<
*
* cdef xmlDoc* _parseDocFromFile(filename8, _BaseParser parser) except NULL:
*/
- __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_c_text, __pyx_v_c_len, __pyx_v_c_filename); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDoc(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_c_text, __pyx_v_c_len, __pyx_v_c_filename); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_5;
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1583
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1639
* ############################################################
*
* cdef xmlDoc* _parseDoc(text, filename, _BaseParser parser) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1619
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1675
* return (<_BaseParser>parser)._parseDoc(c_text, c_len, c_filename)
*
* cdef xmlDoc* _parseDocFromFile(filename8, _BaseParser parser) except NULL: # <<<<<<<<<<<<<<
__Pyx_RefNannySetupContext("_parseDocFromFile", 0);
__Pyx_INCREF((PyObject *)__pyx_v_parser);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1620
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1676
*
* cdef xmlDoc* _parseDocFromFile(filename8, _BaseParser parser) except NULL:
* if parser is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1621
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1677
* cdef xmlDoc* _parseDocFromFile(filename8, _BaseParser parser) except NULL:
* if parser is None:
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<<
* return (<_BaseParser>parser)._parseDocFromFile(_cstr(filename8))
*
*/
- __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3));
__pyx_t_3 = 0;
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1622
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1678
* if parser is None:
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser()
* return (<_BaseParser>parser)._parseDocFromFile(_cstr(filename8)) # <<<<<<<<<<<<<<
*
* cdef xmlDoc* _parseDocFromFilelike(source, filename,
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFile(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), PyBytes_AS_STRING(__pyx_v_filename8)); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFile(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), PyBytes_AS_STRING(__pyx_v_filename8)); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_4;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1619
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1675
* return (<_BaseParser>parser)._parseDoc(c_text, c_len, c_filename)
*
* cdef xmlDoc* _parseDocFromFile(filename8, _BaseParser parser) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1624
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1680
* return (<_BaseParser>parser)._parseDocFromFile(_cstr(filename8))
*
* cdef xmlDoc* _parseDocFromFilelike(source, filename, # <<<<<<<<<<<<<<
__Pyx_RefNannySetupContext("_parseDocFromFilelike", 0);
__Pyx_INCREF((PyObject *)__pyx_v_parser);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1626
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1682
* cdef xmlDoc* _parseDocFromFilelike(source, filename,
* _BaseParser parser) except NULL:
* if parser is None: # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1627
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1683
* _BaseParser parser) except NULL:
* if parser is None:
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<<
* return (<_BaseParser>parser)._parseDocFromFilelike(source, filename, None)
*
*/
- __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3));
__pyx_t_3 = 0;
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1628
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1684
* if parser is None:
* parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser()
* return (<_BaseParser>parser)._parseDocFromFilelike(source, filename, None) # <<<<<<<<<<<<<<
*
* cdef xmlDoc* _newXMLDoc() except NULL:
*/
- __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_source, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser)->__pyx_vtab)->_parseDocFromFilelike(((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_parser), __pyx_v_source, __pyx_v_filename, Py_None); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_r = __pyx_t_4;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1624
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1680
* return (<_BaseParser>parser)._parseDocFromFile(_cstr(filename8))
*
* cdef xmlDoc* _parseDocFromFilelike(source, filename, # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1630
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1686
* return (<_BaseParser>parser)._parseDocFromFilelike(source, filename, None)
*
* cdef xmlDoc* _newXMLDoc() except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_newXMLDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1632
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1688
* cdef xmlDoc* _newXMLDoc() except NULL:
* cdef xmlDoc* result
* result = tree.xmlNewDoc(NULL) # <<<<<<<<<<<<<<
*/
__pyx_v_result = xmlNewDoc(NULL);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1633
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1689
* cdef xmlDoc* result
* result = tree.xmlNewDoc(NULL)
* if result is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_result == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1634
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1690
* result = tree.xmlNewDoc(NULL)
* if result is NULL:
* raise MemoryError() # <<<<<<<<<<<<<<
* if result.encoding is NULL:
* result.encoding = tree.xmlStrdup(<unsigned char*>"UTF-8")
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1635
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1691
* if result is NULL:
* raise MemoryError()
* if result.encoding is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_result->encoding == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1636
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1692
* raise MemoryError()
* if result.encoding is NULL:
* result.encoding = tree.xmlStrdup(<unsigned char*>"UTF-8") # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1637
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1693
* if result.encoding is NULL:
* result.encoding = tree.xmlStrdup(<unsigned char*>"UTF-8")
* __GLOBAL_PARSER_CONTEXT.initDocDict(result) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1638
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1694
* result.encoding = tree.xmlStrdup(<unsigned char*>"UTF-8")
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1630
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1686
* return (<_BaseParser>parser)._parseDocFromFilelike(source, filename, None)
*
* cdef xmlDoc* _newXMLDoc() except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1640
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1696
* return result
*
* cdef xmlDoc* _newHTMLDoc() except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_newHTMLDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1642
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1698
* cdef xmlDoc* _newHTMLDoc() except NULL:
* cdef xmlDoc* result
* result = tree.htmlNewDoc(NULL, NULL) # <<<<<<<<<<<<<<
*/
__pyx_v_result = htmlNewDoc(NULL, NULL);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1643
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1699
* cdef xmlDoc* result
* result = tree.htmlNewDoc(NULL, NULL)
* if result is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_result == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1644
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1700
* result = tree.htmlNewDoc(NULL, NULL)
* if result is NULL:
* raise MemoryError() # <<<<<<<<<<<<<<
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* return result
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1645
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1701
* if result is NULL:
* raise MemoryError()
* __GLOBAL_PARSER_CONTEXT.initDocDict(result) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1646
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1702
* raise MemoryError()
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1640
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1696
* return result
*
* cdef xmlDoc* _newHTMLDoc() except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1648
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1704
* return result
*
* cdef xmlDoc* _copyDoc(xmlDoc* c_doc, int recursive) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_copyDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1650
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1706
* cdef xmlDoc* _copyDoc(xmlDoc* c_doc, int recursive) except NULL:
* cdef xmlDoc* result
* if recursive: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_v_recursive != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1651
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1707
* cdef xmlDoc* result
* if recursive:
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1652
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1708
* if recursive:
* with nogil:
* result = tree.xmlCopyDoc(c_doc, recursive) # <<<<<<<<<<<<<<
__pyx_v_result = xmlCopyDoc(__pyx_v_c_doc, __pyx_v_recursive);
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1651
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1707
* cdef xmlDoc* result
* if recursive:
* with nogil: # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1654
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1710
* result = tree.xmlCopyDoc(c_doc, recursive)
* else:
* result = tree.xmlCopyDoc(c_doc, 0) # <<<<<<<<<<<<<<
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1655
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1711
* else:
* result = tree.xmlCopyDoc(c_doc, 0)
* if result is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_result == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1656
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1712
* result = tree.xmlCopyDoc(c_doc, 0)
* if result is NULL:
* raise MemoryError() # <<<<<<<<<<<<<<
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* return result
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1657
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1713
* if result is NULL:
* raise MemoryError()
* __GLOBAL_PARSER_CONTEXT.initDocDict(result) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1658
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1714
* raise MemoryError()
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1648
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1704
* return result
*
* cdef xmlDoc* _copyDoc(xmlDoc* c_doc, int recursive) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1660
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1716
* return result
*
* cdef xmlDoc* _copyDocRoot(xmlDoc* c_doc, xmlNode* c_new_root) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_copyDocRoot", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1664
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1720
* cdef xmlDoc* result
* cdef xmlNode* c_node
* result = tree.xmlCopyDoc(c_doc, 0) # non recursive # <<<<<<<<<<<<<<
*/
__pyx_v_result = xmlCopyDoc(__pyx_v_c_doc, 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1665
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1721
* cdef xmlNode* c_node
* result = tree.xmlCopyDoc(c_doc, 0) # non recursive
* __GLOBAL_PARSER_CONTEXT.initDocDict(result) # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, __pyx_v_result);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1666
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1722
* result = tree.xmlCopyDoc(c_doc, 0) # non recursive
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* with nogil: # <<<<<<<<<<<<<<
#endif
/*try:*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1667
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1723
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* with nogil:
* c_node = tree.xmlDocCopyNode(c_new_root, result, 1) # recursive # <<<<<<<<<<<<<<
__pyx_v_c_node = xmlDocCopyNode(__pyx_v_c_new_root, __pyx_v_result, 1);
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1666
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1722
* result = tree.xmlCopyDoc(c_doc, 0) # non recursive
* __GLOBAL_PARSER_CONTEXT.initDocDict(result)
* with nogil: # <<<<<<<<<<<<<<
}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1668
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1724
* with nogil:
* c_node = tree.xmlDocCopyNode(c_new_root, result, 1) # recursive
* if c_node is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_node == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1669
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1725
* c_node = tree.xmlDocCopyNode(c_new_root, result, 1) # recursive
* if c_node is NULL:
* raise MemoryError() # <<<<<<<<<<<<<<
* tree.xmlDocSetRootElement(result, c_node)
* _copyTail(c_new_root.next, c_node)
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1670
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1726
* if c_node is NULL:
* raise MemoryError()
* tree.xmlDocSetRootElement(result, c_node) # <<<<<<<<<<<<<<
*/
xmlDocSetRootElement(__pyx_v_result, __pyx_v_c_node);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1671
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1727
* raise MemoryError()
* tree.xmlDocSetRootElement(result, c_node)
* _copyTail(c_new_root.next, c_node) # <<<<<<<<<<<<<<
* return result
*
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__copyTail(__pyx_v_c_new_root->next, __pyx_v_c_node); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1671; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__copyTail(__pyx_v_c_new_root->next, __pyx_v_c_node); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1672
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1728
* tree.xmlDocSetRootElement(result, c_node)
* _copyTail(c_new_root.next, c_node)
* return result # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_result;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1660
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1716
* return result
*
* cdef xmlDoc* _copyDocRoot(xmlDoc* c_doc, xmlNode* c_new_root) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1674
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1730
* return result
*
* cdef xmlNode* _copyNodeToDoc(xmlNode* c_node, xmlDoc* c_doc) except NULL: # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_copyNodeToDoc", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1677
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1733
* u"Recursively copy the element into the document. c_doc is not modified."
* cdef xmlNode* c_root
* c_root = tree.xmlDocCopyNode(c_node, c_doc, 1) # recursive # <<<<<<<<<<<<<<
*/
__pyx_v_c_root = xmlDocCopyNode(__pyx_v_c_node, __pyx_v_c_doc, 1);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1678
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1734
* cdef xmlNode* c_root
* c_root = tree.xmlDocCopyNode(c_node, c_doc, 1) # recursive
* if c_root is NULL: # <<<<<<<<<<<<<<
__pyx_t_1 = ((__pyx_v_c_root == NULL) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1679
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1735
* c_root = tree.xmlDocCopyNode(c_node, c_doc, 1) # recursive
* if c_root is NULL:
* raise MemoryError() # <<<<<<<<<<<<<<
* _copyTail(c_node.next, c_root)
* return c_root
*/
- PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1679; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyErr_NoMemory(); {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1680
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1736
* if c_root is NULL:
* raise MemoryError()
* _copyTail(c_node.next, c_root) # <<<<<<<<<<<<<<
* return c_root
*
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__copyTail(__pyx_v_c_node->next, __pyx_v_c_root); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__copyTail(__pyx_v_c_node->next, __pyx_v_c_root); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1681
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1737
* raise MemoryError()
* _copyTail(c_node.next, c_root)
* return c_root # <<<<<<<<<<<<<<
__pyx_r = __pyx_v_c_root;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1674
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1730
* return result
*
* cdef xmlNode* _copyNodeToDoc(xmlNode* c_node, xmlDoc* c_doc) except NULL: # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1688
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1744
* ############################################################
*
* cdef _Document _parseDocument(source, _BaseParser parser, base_url): # <<<<<<<<<<<<<<
__Pyx_RefNannySetupContext("_parseDocument", 0);
__Pyx_INCREF(__pyx_v_base_url);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1690
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1746
* cdef _Document _parseDocument(source, _BaseParser parser, base_url):
* cdef _Document doc
* if _isString(source): # <<<<<<<<<<<<<<
__pyx_t_1 = (_isString(__pyx_v_source) != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1692
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1748
* if _isString(source):
* # parse the file directly from the filesystem
* doc = _parseDocumentFromURL(_encodeFilename(source), parser) # <<<<<<<<<<<<<<
* # fix base URL if requested
* if base_url is not None:
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_source); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__encodeFilename(__pyx_v_source); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocumentFromURL(__pyx_t_2, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocumentFromURL(__pyx_t_2, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1694
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1750
* doc = _parseDocumentFromURL(_encodeFilename(source), parser)
* # fix base URL if requested
* if base_url is not None: # <<<<<<<<<<<<<<
__pyx_t_4 = (__pyx_t_1 != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1695
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1751
* # fix base URL if requested
* if base_url is not None:
* base_url = _encodeFilenameUTF8(base_url) # <<<<<<<<<<<<<<
* if doc._c_doc.URL is not NULL:
* tree.xmlFree(<char*>doc._c_doc.URL)
*/
- __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilenameUTF8(__pyx_v_base_url); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4lxml_5etree__encodeFilenameUTF8(__pyx_v_base_url); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF_SET(__pyx_v_base_url, __pyx_t_3);
__pyx_t_3 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1696
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1752
* if base_url is not None:
* base_url = _encodeFilenameUTF8(base_url)
* if doc._c_doc.URL is not NULL: # <<<<<<<<<<<<<<
__pyx_t_4 = ((__pyx_v_doc->_c_doc->URL != NULL) != 0);
if (__pyx_t_4) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1697
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1753
* base_url = _encodeFilenameUTF8(base_url)
* if doc._c_doc.URL is not NULL:
* tree.xmlFree(<char*>doc._c_doc.URL) # <<<<<<<<<<<<<<
}
__pyx_L5:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1698
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1754
* if doc._c_doc.URL is not NULL:
* tree.xmlFree(<char*>doc._c_doc.URL)
* doc._c_doc.URL = tree.xmlStrdup(_xcstr(base_url)) # <<<<<<<<<<<<<<
}
__pyx_L4:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1699
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1755
* tree.xmlFree(<char*>doc._c_doc.URL)
* doc._c_doc.URL = tree.xmlStrdup(_xcstr(base_url))
* return doc # <<<<<<<<<<<<<<
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1701
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1757
* return doc
*
* if base_url is not None: # <<<<<<<<<<<<<<
__pyx_t_1 = (__pyx_t_4 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1702
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1758
*
* if base_url is not None:
* url = base_url # <<<<<<<<<<<<<<
}
/*else*/ {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1704
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1760
* url = base_url
* else:
* url = _getFilenameForFile(source) # <<<<<<<<<<<<<<
*
* if hasattr(source, u'getvalue') and hasattr(source, u'tell'):
*/
- __pyx_t_3 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __pyx_f_4lxml_5etree__getFilenameForFile(__pyx_v_source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_url = __pyx_t_3;
__pyx_t_3 = 0;
}
__pyx_L6:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1706
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1762
* url = _getFilenameForFile(source)
*
* if hasattr(source, u'getvalue') and hasattr(source, u'tell'): # <<<<<<<<<<<<<<
* # StringIO - reading from start?
* if source.tell() == 0:
*/
- __pyx_t_1 = PyObject_HasAttr(__pyx_v_source, __pyx_n_u_getvalue); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyObject_HasAttr(__pyx_v_source, __pyx_n_u_getvalue); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if ((__pyx_t_1 != 0)) {
- __pyx_t_4 = PyObject_HasAttr(__pyx_v_source, __pyx_n_u_tell); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyObject_HasAttr(__pyx_v_source, __pyx_n_u_tell); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_5 = (__pyx_t_4 != 0);
} else {
__pyx_t_5 = (__pyx_t_1 != 0);
}
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1708
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1764
* if hasattr(source, u'getvalue') and hasattr(source, u'tell'):
* # StringIO - reading from start?
* if source.tell() == 0: # <<<<<<<<<<<<<<
* return _parseMemoryDocument(source.getvalue(), url, parser)
*
*/
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_tell); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_tell); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1764; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (__pyx_t_5) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1709
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1765
* # StringIO - reading from start?
* if source.tell() == 0:
* return _parseMemoryDocument(source.getvalue(), url, parser) # <<<<<<<<<<<<<<
* # Support for file-like objects (urlgrabber.urlopen, ...)
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_t_2, __pyx_v_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_t_2, __pyx_v_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1765; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = ((struct LxmlDocument *)__pyx_t_3);
}
__pyx_L7:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1712
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1768
*
* # Support for file-like objects (urlgrabber.urlopen, ...)
* if hasattr(source, u'read'): # <<<<<<<<<<<<<<
* return _parseFilelikeDocument(source, url, parser)
*
*/
- __pyx_t_5 = PyObject_HasAttr(__pyx_v_source, __pyx_n_u_read); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyObject_HasAttr(__pyx_v_source, __pyx_n_u_read); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = (__pyx_t_5 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1713
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1769
* # Support for file-like objects (urlgrabber.urlopen, ...)
* if hasattr(source, u'read'):
* return _parseFilelikeDocument(source, url, parser) # <<<<<<<<<<<<<<
* raise TypeError, u"cannot parse from '%s'" % python._fqtypename(source).decode('UTF-8')
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseFilelikeDocument(__pyx_v_source, __pyx_v_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseFilelikeDocument(__pyx_v_source, __pyx_v_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1769; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct LxmlDocument *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1715
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1771
* return _parseFilelikeDocument(source, url, parser)
*
* raise TypeError, u"cannot parse from '%s'" % python._fqtypename(source).decode('UTF-8') # <<<<<<<<<<<<<<
* cdef _Document _parseDocumentFromURL(url, _BaseParser parser):
*/
__pyx_t_6 = _fqtypename(__pyx_v_source);
- __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_6, 0, strlen(__pyx_t_6), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_cannot_parse_from_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_cannot_parse_from_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_2, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1688
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1744
* ############################################################
*
* cdef _Document _parseDocument(source, _BaseParser parser, base_url): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1717
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1773
* raise TypeError, u"cannot parse from '%s'" % python._fqtypename(source).decode('UTF-8')
*
* cdef _Document _parseDocumentFromURL(url, _BaseParser parser): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parseDocumentFromURL", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1718
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1774
*
* cdef _Document _parseDocumentFromURL(url, _BaseParser parser):
* c_doc = _parseDocFromFile(url, parser) # <<<<<<<<<<<<<<
* return _documentFactory(c_doc, parser)
*
*/
- __pyx_t_1 = __pyx_f_4lxml_5etree__parseDocFromFile(__pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1718; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4lxml_5etree__parseDocFromFile(__pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_doc = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1719
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1775
* cdef _Document _parseDocumentFromURL(url, _BaseParser parser):
* c_doc = _parseDocFromFile(url, parser)
* return _documentFactory(c_doc, parser) # <<<<<<<<<<<<<<
* cdef _Document _parseMemoryDocument(text, url, _BaseParser parser):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct LxmlDocument *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1717
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1773
* raise TypeError, u"cannot parse from '%s'" % python._fqtypename(source).decode('UTF-8')
*
* cdef _Document _parseDocumentFromURL(url, _BaseParser parser): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1721
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1777
* return _documentFactory(c_doc, parser)
*
* cdef _Document _parseMemoryDocument(text, url, _BaseParser parser): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parseMemoryDocument", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1722
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1778
*
* cdef _Document _parseMemoryDocument(text, url, _BaseParser parser):
* if isinstance(text, unicode): # <<<<<<<<<<<<<<
__pyx_t_2 = (__pyx_t_1 != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1723
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1779
* cdef _Document _parseMemoryDocument(text, url, _BaseParser parser):
* if isinstance(text, unicode):
* if _hasEncodingDeclaration(text): # <<<<<<<<<<<<<<
* raise ValueError(
* u"Unicode strings with encoding declaration are not supported. "
*/
- __pyx_t_2 = __pyx_f_4lxml_5etree__hasEncodingDeclaration(__pyx_v_text); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __pyx_f_4lxml_5etree__hasEncodingDeclaration(__pyx_v_text); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_1 = (__pyx_t_2 != 0);
if (__pyx_t_1) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1724
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1780
* if isinstance(text, unicode):
* if _hasEncodingDeclaration(text):
* raise ValueError( # <<<<<<<<<<<<<<
* u"Unicode strings with encoding declaration are not supported. "
* u"Please use bytes input or XML fragments without declaration.")
*/
- __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
goto __pyx_L3;
}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1727
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1783
* u"Unicode strings with encoding declaration are not supported. "
* u"Please use bytes input or XML fragments without declaration.")
* elif not isinstance(text, bytes): # <<<<<<<<<<<<<<
__pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
if (__pyx_t_2) {
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1728
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1784
* u"Please use bytes input or XML fragments without declaration.")
* elif not isinstance(text, bytes):
* raise ValueError, u"can only parse strings" # <<<<<<<<<<<<<<
* return _documentFactory(c_doc, parser)
*/
__Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_can_only_parse_strings, 0, 0);
- {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L3:;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1729
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1785
* elif not isinstance(text, bytes):
* raise ValueError, u"can only parse strings"
* c_doc = _parseDoc(text, url, parser) # <<<<<<<<<<<<<<
* return _documentFactory(c_doc, parser)
*
*/
- __pyx_t_4 = __pyx_f_4lxml_5etree__parseDoc(__pyx_v_text, __pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __pyx_f_4lxml_5etree__parseDoc(__pyx_v_text, __pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_doc = __pyx_t_4;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1730
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1786
* raise ValueError, u"can only parse strings"
* c_doc = _parseDoc(text, url, parser)
* return _documentFactory(c_doc, parser) # <<<<<<<<<<<<<<
* cdef _Document _parseFilelikeDocument(source, url, _BaseParser parser):
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = ((struct LxmlDocument *)__pyx_t_3);
__pyx_t_3 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1721
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1777
* return _documentFactory(c_doc, parser)
*
* cdef _Document _parseMemoryDocument(text, url, _BaseParser parser): # <<<<<<<<<<<<<<
return __pyx_r;
}
-/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1732
+/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1788
* return _documentFactory(c_doc, parser)
*
* cdef _Document _parseFilelikeDocument(source, url, _BaseParser parser): # <<<<<<<<<<<<<<
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_parseFilelikeDocument", 0);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1733
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1789
*
* cdef _Document _parseFilelikeDocument(source, url, _BaseParser parser):
* c_doc = _parseDocFromFilelike(source, url, parser) # <<<<<<<<<<<<<<
* return _documentFactory(c_doc, parser)
*/
- __pyx_t_1 = __pyx_f_4lxml_5etree__parseDocFromFilelike(__pyx_v_source, __pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __pyx_f_4lxml_5etree__parseDocFromFilelike(__pyx_v_source, __pyx_v_url, __pyx_v_parser); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_c_doc = __pyx_t_1;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1734
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1790
* cdef _Document _parseFilelikeDocument(source, url, _BaseParser parser):
* c_doc = _parseDocFromFilelike(source, url, parser)
* return _documentFactory(c_doc, parser) # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(((PyObject *)__pyx_r));
- __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = ((struct LxmlDocument *)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1732
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1788
* return _documentFactory(c_doc, parser)
*
* cdef _Document _parseFilelikeDocument(source, url, _BaseParser parser): # <<<<<<<<<<<<<<
*
* cdef void _setSaxParserTarget(self, _SaxParserTarget target):
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParseEventsIterator)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParseEventsIterator)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->events_iterator);
__Pyx_INCREF(__pyx_v_tag);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_tag);
__Pyx_GIVEREF(__pyx_v_tag);
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 182; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_GIVEREF(__pyx_t_7);
__Pyx_INCREF(__pyx_v_attrib);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_attrib);
__Pyx_GIVEREF(__pyx_v_attrib);
- __pyx_t_5 = PyObject_Call(__pyx_v_self->_factory, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_self->_factory, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 673; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* self._in_tail = 1
* return self._last
*/
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_element_stack_pop, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_element_stack_pop, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_comment);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_comment);
__Pyx_GIVEREF(__pyx_v_comment);
- __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_self->_target_start);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->_target_start);
__Pyx_GIVEREF(__pyx_v_self->_target_start);
- __pyx_t_10 = PyObject_Call(__pyx_v_4lxml_5etree_inspect_getargspec, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_inspect_getargspec, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_arguments = __pyx_t_10;
__Pyx_INCREF(__pyx_v_nsmap);
PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_nsmap);
__Pyx_GIVEREF(__pyx_v_nsmap);
- __pyx_t_3 = PyObject_Call(__pyx_v_self->_target_start, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->_target_start, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(__pyx_v_attrib);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_attrib);
__Pyx_GIVEREF(__pyx_v_attrib);
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_target_start, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_target_start, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(__pyx_v_tag);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
__Pyx_GIVEREF(__pyx_v_tag);
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_target_end, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_target_end, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_target_data, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_target_data, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_system_id);
PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_system_id);
__Pyx_GIVEREF(__pyx_v_system_id);
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_target_doctype, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_target_doctype, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_target_pi, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_target_pi, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(__pyx_v_comment);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_comment);
__Pyx_GIVEREF(__pyx_v_comment);
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_target_comment, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_target_comment, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(__pyx_v_target);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_target);
__Pyx_GIVEREF(__pyx_v_target);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__PythonSaxParserTarget)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__PythonSaxParserTarget)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF_SET(__pyx_v_target, __pyx_t_5);
*/
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
*/
__pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_11 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_v_exc = __pyx_t_11;
/*try:*/ {
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_XDECREF(__pyx_r);
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_9 = PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_r = __pyx_t_9;
*/
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
*/
__pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_11 = PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_v_exc = __pyx_t_11;
/*try:*/ {
__pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L16_error;}
__Pyx_GOTREF(__pyx_t_12);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
*/
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_python_target, __pyx_n_s_close); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
- __pyx_t_9 = PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_v_parse_result = __pyx_t_9;
__Pyx_INCREF(__pyx_v_parse_result);
PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_parse_result);
__Pyx_GIVEREF(__pyx_v_parse_result);
- __pyx_t_8 = PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_method, __pyx_t_4);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_5);
*/
__Pyx_INCREF(__pyx_v_encoding);
__pyx_t_5 = __pyx_v_encoding;
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_n_u_utf8, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (((int)__pyx_t_3)) {
- __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_kp_u_utf_8, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_2 = ((int)__pyx_t_1);
+ __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_utf8, Py_NE)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+ if (__pyx_t_3) {
+ __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_kp_u_utf_8, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+ __pyx_t_2 = __pyx_t_1;
} else {
- __pyx_t_2 = ((int)__pyx_t_3);
+ __pyx_t_2 = __pyx_t_3;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = (__pyx_t_2 != 0);
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyObject_Call(__pyx_t_4, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_6);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* fileobj=filelike, mode='wb', compresslevel=compression)
* self._close_filelike = filelike.close
*/
- __pyx_t_5 = PyObject_Call(__pyx_v_4lxml_5etree_GzipFile, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_GzipFile, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF_SET(__pyx_v_filelike, __pyx_t_5);
* else:
* self._exc_context = exc_context
*/
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExceptionContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExceptionContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_v_self->_exc_context);
*
* cdef tree.xmlOutputBuffer* _createOutputBuffer(
*/
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__Pyx_GOTREF(__pyx_v_self->error_log);
__Pyx_INCREF(__pyx_v_py_buffer);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_py_buffer);
__Pyx_GIVEREF(__pyx_v_py_buffer);
- __pyx_t_8 = PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
* # we should not close the file here as we didn't open it
* self._filelike = None
*/
- __pyx_t_6 = PyObject_Call(__pyx_v_self->_close_filelike, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_self->_close_filelike, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L14;
* gzip_file = GzipFile(
* fileobj=bytes_out, mode='wb', compresslevel=compression)
*/
- __pyx_t_3 = PyObject_Call(__pyx_v_4lxml_5etree_BytesIO, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_BytesIO, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_v_bytes_out = __pyx_t_3;
__pyx_t_3 = 0;
* fileobj=bytes_out, mode='wb', compresslevel=compression)
* try:
*/
- __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_5etree_GzipFile, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree_GzipFile, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_gzip_file = __pyx_t_4;
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/*normal exit:*/{
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip_file, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
{
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_gzip_file, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_bytes_out, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF_SET(__pyx_v_data, __pyx_t_3);
__Pyx_INCREF(__pyx_n_s_wb);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_wb);
__Pyx_GIVEREF(__pyx_n_s_wb);
- __pyx_t_5 = PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_f, __pyx_t_5);
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L12_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/*normal exit:*/{
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
{
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L15_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_data);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_data);
__Pyx_GIVEREF(__pyx_v_data);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_builtin_LookupError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_LookupError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_compression, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FilelikeWriter)), __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FilelikeWriter)), __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_GOTREF(__pyx_t_8);
if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_compression, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FilelikeWriter)), __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FilelikeWriter)), __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_10) {
- __pyx_t_14 = PyObject_Call(__pyx_t_10, __pyx_tuple__57, NULL);
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__57, NULL);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 570; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_14);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_7, 0, 0, 0);
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
- __pyx_t_5 = PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IncrementalFileWriter)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IncrementalFileWriter)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_v_writer = ((struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)__pyx_t_2);
*/
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 707; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
* attrib = attrib.items()
* for name, value in attrib:
*/
- __Pyx_INCREF(__pyx_v_attrib);
- __pyx_t_1 = __pyx_v_attrib;
- __pyx_t_3 = PyDict_Check(__pyx_t_1);
+ __pyx_t_3 = PyDict_Check(__pyx_v_attrib);
if (!__pyx_t_3) {
- __pyx_t_2 = __Pyx_TypeCheck(__pyx_t_1, ((PyObject*)__pyx_ptype_4lxml_5etree__Attrib));
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_attrib, ((PyObject*)__pyx_ptype_4lxml_5etree__Attrib));
__pyx_t_4 = __pyx_t_2;
} else {
__pyx_t_4 = __pyx_t_3;
}
- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = (__pyx_t_4 != 0);
if (__pyx_t_3) {
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_5);
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_9 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (PyList_CheckExact(__pyx_t_9) || PyTuple_CheckExact(__pyx_t_9)) {
PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileWriterElement)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileWriterElement)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__pyx_r = __pyx_t_5;
*/
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
*/
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
*/
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
if (!__pyx_t_4) {
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_content, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*/
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_INCREF(__pyx_v_content);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_content);
__Pyx_GIVEREF(__pyx_v_content);
- __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
*/
__pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_5 = PyObject_Call(__pyx_t_8, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_Raise(__pyx_t_5, 0, 0, 0);
*/
__pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
*/
__pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LxmlSyntaxError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
Py_ssize_t __pyx_t_5;
PyObject *(*__pyx_t_6)(PyObject *);
PyObject *__pyx_t_7 = NULL;
- PyObject *__pyx_t_8 = NULL;
- int __pyx_t_9;
+ int __pyx_t_8;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_INCREF(__pyx_n_s_rb);
PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_rb);
__Pyx_GIVEREF(__pyx_n_s_rb);
- __pyx_t_4 = PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF_SET(__pyx_v_source, __pyx_t_4);
*/
__Pyx_INCREF(__pyx_v_event);
__pyx_t_7 = __pyx_v_event;
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s_start_ns, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- if (((int)__pyx_t_1)) {
- __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_kp_s_end_ns, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_9 = ((int)__pyx_t_2);
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_start_ns, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_1) {
+ __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_end_ns, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __pyx_t_2;
} else {
- __pyx_t_9 = ((int)__pyx_t_1);
+ __pyx_t_8 = __pyx_t_1;
}
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_1 = (__pyx_t_9 != 0);
+ __pyx_t_1 = (__pyx_t_8 != 0);
if (__pyx_t_1) {
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/iterparse.pxi":88
* events,
* tag=tag,
*/
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_HTMLPullParser)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_HTMLPullParser)), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* events,
* tag=tag,
*/
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLPullParser)), __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLPullParser)), __pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_read_events); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GIVEREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_7);
- __Pyx_XDECREF(__pyx_t_8);
__Pyx_AddTraceback("lxml.etree.iterparse.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
*
* def __iter__(self):
*/
- __pyx_t_9 = PyObject_Call(__pyx_v_close, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_v_close, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
goto __pyx_L20;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_source, __pyx_n_s_read); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_data = __pyx_t_2;
* if not data:
* try:
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_tag);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag);
__Pyx_GIVEREF(__pyx_v_tag);
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_GIVEREF(__pyx_t_6);
* node = self._node_stack[self._index][0]
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_v_self->_pop_event, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->_pop_event, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_node), __pyx_n_s_getnext); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_2 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4lxml_5etree__Element))))) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyObject_Call(__pyx_v_self->_pop_event, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_self->_pop_event, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__pyx_r = __pyx_t_5;
__pyx_t_5 = 0;
*
* # ElementTree compatible implementation: parse and look for 'id' attributes
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPath)), __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPath)), __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XGOTREF(__pyx_v_4lxml_5etree__find_id_attributes);
__Pyx_DECREF_SET(__pyx_v_4lxml_5etree__find_id_attributes, __pyx_t_3);
__pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_6 = PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_root);
PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_root);
__Pyx_GIVEREF(__pyx_v_root);
- __pyx_t_5 = PyObject_Call(__pyx_v_4lxml_5etree__find_id_attributes, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__find_id_attributes, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_4 = PyObject_Call(__pyx_t_5, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(PyDict_SetItem(__pyx_v_dic, __pyx_t_4, __pyx_v_elem) < 0)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_base_url, __pyx_v_base_url) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_root));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_root));
__Pyx_GIVEREF(((PyObject *)__pyx_v_root));
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IDDict)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IDDict)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_doc));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_doc));
__Pyx_GIVEREF(((PyObject *)__pyx_v_doc));
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IDDict)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IDDict)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_self->_doc));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->_doc));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_doc));
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IDDict)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__IDDict)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*
* property error_log:
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->_error_log);
PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_self->_error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log));
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_INCREF(__pyx_v_attribute_names);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attribute_names);
__Pyx_GIVEREF(__pyx_v_attribute_names);
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_4);
__Pyx_INCREF(__pyx_v_tag_names);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag_names);
__Pyx_GIVEREF(__pyx_v_tag_names);
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_4);
__Pyx_INCREF(__pyx_v_tag_names);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag_names);
__Pyx_GIVEREF(__pyx_v_tag_names);
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MultiTagMatcher)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_4);
*/
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_extension, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_7 = PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF_SET(__pyx_v_namespaces, __pyx_t_6);
* self._extensions = extensions
* self._namespaces = namespaces
*/
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExceptionContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExceptionContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->_exc);
* self._temp_documents = set()
* self._build_smart_strings = build_smart_strings
*/
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__TempStore)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__TempStore)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_v_self->_temp_refs);
* _regexp._register_in_context(self)
*
*/
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExsltRegExp)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExsltRegExp)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__pyx_v__regexp = ((struct __pyx_obj_4lxml_5etree__ExsltRegExp *)__pyx_t_6);
__pyx_t_6 = 0;
PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_function_mapping, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_7 = PyObject_Call(__pyx_t_4, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__86, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_firstnode);
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_firstnode);
__Pyx_GIVEREF(__pyx_v_firstnode);
- __pyx_t_13 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_r = __pyx_t_13;
__Pyx_INCREF(__pyx_v_value);
PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_value);
__Pyx_GIVEREF(__pyx_v_value);
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(__pyx_v_py_flags);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_py_flags);
__Pyx_GIVEREF(__pyx_v_py_flags);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_INCREF(__pyx_v_s);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
__Pyx_GIVEREF(__pyx_v_s);
- __pyx_t_4 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_INCREF(__pyx_v_s);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
__Pyx_GIVEREF(__pyx_v_s);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_INCREF(__pyx_v_s);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
__Pyx_GIVEREF(__pyx_v_s);
- __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
*/
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_group); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_groups); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
*/
__pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Element); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_root = __pyx_t_1;
__Pyx_INCREF(__pyx_v_s_match);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_s_match);
__Pyx_GIVEREF(__pyx_v_s_match);
- __pyx_t_3 = PyObject_Call(__pyx_v_join_groups, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_join_groups, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF_SET(__pyx_v_s_match, __pyx_t_3);
__Pyx_INCREF(__pyx_n_u_match);
PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_u_match);
__Pyx_GIVEREF(__pyx_n_u_match);
- __pyx_t_8 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyUnicode_Format(__pyx_kp_u_Unknown_xpath_result_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_string_value);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_string_value);
__Pyx_GIVEREF(__pyx_v_string_value);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 749; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_string_value);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_string_value);
__Pyx_GIVEREF(__pyx_v_string_value);
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ElementUnicodeResult)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ElementUnicodeResult)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_v_uresult = ((struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)__pyx_t_4);
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_8 = PyObject_Call(__pyx_v_function, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_v_function, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_v_res = __pyx_t_8;
PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
__Pyx_GIVEREF(__pyx_t_9);
__pyx_t_9 = 0;
- __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
* build_smart_strings)
*
*/
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_variable_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
*
* def __init__(self, namespaces, extensions, enable_regexp,
*/
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GOTREF(__pyx_v_self->_error_log);
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_smart_strings);
PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_smart_strings);
__Pyx_GIVEREF(__pyx_v_smart_strings);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XPathContext)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XPathContext)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_GIVEREF(__pyx_t_2);
__Pyx_GIVEREF(__pyx_v__eval_arg);
__pyx_t_2 = __pyx_v__variables;
__Pyx_INCREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS);
__Pyx_GIVEREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log));
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log));
- __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
* u"Error in xpath expression"),
* self._error_log)
*/
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS);
__Pyx_GIVEREF(__pyx_v_4lxml_5etree__XPATH_EVAL_ERRORS);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS);
__Pyx_GIVEREF(__pyx_v_4lxml_5etree__XPATH_SYNTAX_ERRORS);
- __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log));
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
* u"Error in xpath expression"),
* self._error_log)
*/
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
* regexp, smart_strings)
* xpathCtxt = xpath.xmlXPathNewContext(doc._c_doc)
*/
- __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_namespaces, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
* self, etree._context_node, namespaces=namespaces,
* extensions=extensions, regexp=regexp,
*/
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
* etree_or_element, namespaces=namespaces,
* extensions=extensions, regexp=regexp, smart_strings=smart_strings)
*/
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator)), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator)), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* etree_or_element, namespaces=namespaces,
* extensions=extensions, regexp=regexp, smart_strings=smart_strings)
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathElementEvaluator)), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPathElementEvaluator)), __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* regexp, smart_strings)
* self._path = _utf8(path)
*/
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 425; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
* extensions=extensions, regexp=regexp,
* smart_strings=smart_strings)
*/
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_INCREF(__pyx_v_path_utf);
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_path_utf);
__Pyx_GIVEREF(__pyx_v_path_utf);
- __pyx_t_2 = PyObject_Call(__pyx_v_4lxml_5etree__replace_strings, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__replace_strings, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_stripped_path = __pyx_t_2;
__Pyx_INCREF(__pyx_v_stripped_path);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stripped_path);
__Pyx_GIVEREF(__pyx_v_stripped_path);
- __pyx_t_1 = PyObject_Call(__pyx_v_4lxml_5etree__find_namespaces, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__find_namespaces, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
__Pyx_INCREF(__pyx_v_prefix_str);
PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_prefix_str);
__Pyx_GIVEREF(__pyx_v_prefix_str);
- __pyx_t_9 = PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
*/
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_path_utf, __pyx_n_s_decode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF_SET(__pyx_v_path, __pyx_t_9);
* _initXSLTResolverContext(context, self._parser)
* context._c_style_doc = self._c_style_doc
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTResolverContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTResolverContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_context = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)__pyx_t_1);
__pyx_t_1 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_context));
PyTuple_SET_ITEM(__pyx_t_9, 2, ((PyObject *)__pyx_v_context));
__Pyx_GIVEREF(((PyObject *)__pyx_v_context));
- __pyx_t_10 = PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
- __pyx_t_7 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(__pyx_v_message);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_message);
__Pyx_GIVEREF(__pyx_v_message);
- __pyx_t_5 = PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_v_items = __pyx_t_1;
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_extensions, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
*/
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_extensions, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_9 = PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF_SET(__pyx_v_extensions, __pyx_t_9);
* build_smart_strings)
*
*/
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_4 = PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyUnicode_Format(__pyx_kp_u_string___STRING__XSLT___d_xslt, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* self._xslt_resolver_context = _XSLTResolverContext()
* _initXSLTResolverContext(self._xslt_resolver_context, doc._parser)
*/
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_v_self->_error_log);
* _initXSLTResolverContext(self._xslt_resolver_context, doc._parser)
* # keep a copy in case we need to access the stylesheet via 'document()'
*/
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTResolverContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTResolverContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__Pyx_GOTREF(__pyx_v_self->_xslt_resolver_context);
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_6) {
- __pyx_t_10 = PyObject_Call(__pyx_t_6, __pyx_tuple__93, NULL);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__93, NULL);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
* self._error_log)
* else:
*/
- __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_self->_error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log));
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_INCREF(Py_True);
PyTuple_SET_ITEM(__pyx_t_4, 4, Py_True);
__Pyx_GIVEREF(Py_True);
- __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTContext)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTContext)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GIVEREF(__pyx_t_5);
__Pyx_INCREF(__pyx_v_strval);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_strval);
__Pyx_GIVEREF(__pyx_v_strval);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTQuotedStringParam)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__XSLTQuotedStringParam)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
* xslt.xsltMaxDepth = max_depth
*
*/
- __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_RaiseDoubleKeywordsError("function", __pyx_n_s_profile_run); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_profile_run, __pyx_v_profile_run) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_result_tree));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_result_tree));
__Pyx_GIVEREF(((PyObject *)__pyx_v_result_tree));
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(((PyObject *)__pyx_v_self->_error_log));
PyTuple_SET_ITEM(__pyx_t_17, 1, ((PyObject *)__pyx_v_self->_error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->_error_log));
- __pyx_t_1 = PyObject_Call(__pyx_t_5, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L21_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
* new_xslt._context = stylesheet._context._copy()
*
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 682; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_new_xslt->_error_log);
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_unicode_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __pyx_t_3 = PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__pyx_r = __pyx_t_3;
__Pyx_INCREF(__pyx_v_root);
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_root);
__Pyx_GIVEREF(__pyx_v_root);
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
* u"//xsl:stylesheet[@xml:id = $id]",
* namespaces={u"xsl" : u"http://www.w3.org/1999/XSL/Transform"})
*/
- __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPath)), __pyx_tuple__95, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPath)), __pyx_tuple__95, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___findStylesheetByID));
__pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_id, __pyx_v_id) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_5 = PyObject_Call(((PyObject *)__pyx_v_4lxml_5etree___findStylesheetByID), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_4lxml_5etree___findStylesheetByID), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_3 = ((unsigned char *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node->content);
__pyx_t_4 = __Pyx_decode_c_string(((char *)__pyx_t_3), 0, strlen(((char *)__pyx_t_3)), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u__14, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u__14, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_v_4lxml_5etree__FIND_PI_HREF, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__FIND_PI_HREF, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_v_hrefs = __pyx_t_5;
__Pyx_INCREF(__pyx_v_text);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_text);
__Pyx_GIVEREF(__pyx_v_text);
- __pyx_t_4 = PyObject_Call(__pyx_v_4lxml_5etree__FIND_PI_HREF, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__FIND_PI_HREF, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(__pyx_v_text);
PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_text);
__Pyx_GIVEREF(__pyx_v_text);
- __pyx_t_5 = PyObject_Call(__pyx_v_4lxml_5etree__REPLACE_PI_HREF, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_5etree__REPLACE_PI_HREF, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (!__pyx_t_3) {
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_4 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11);
__Pyx_GIVEREF(__pyx_t_11);
__pyx_t_11 = 0;
- __pyx_t_11 = PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
__Pyx_GOTREF(__pyx_t_11);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_11, 0, 0, 0);
__Pyx_INCREF(__pyx_v_output_parent);
PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_output_parent);
__Pyx_GIVEREF(__pyx_v_output_parent);
- __pyx_t_10 = PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L28_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_e);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_e);
__Pyx_GIVEREF(__pyx_v_e);
- __pyx_t_22 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L40_error;}
+ __pyx_t_22 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_9, NULL); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L40_error;}
__Pyx_GOTREF(__pyx_t_22);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_9 = PyUnicode_AsUTF8String(((PyObject*)__pyx_t_22)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L40_error;}
__pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_24, __pyx_n_s_encode); if (unlikely(!__pyx_t_25)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L42_except_error;}
__Pyx_GOTREF(__pyx_t_25);
__Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
- __pyx_t_24 = PyObject_Call(__pyx_t_25, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L42_except_error;}
+ __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_25, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_24)) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L42_except_error;}
__Pyx_GOTREF(__pyx_t_24);
__Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
__Pyx_DECREF_SET(__pyx_v_e, __pyx_t_24);
*
* def validate(self, etree):
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_v_self->_error_log);
__Pyx_INCREF(__pyx_v_etree);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_etree);
__Pyx_GIVEREF(__pyx_v_etree);
- __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3266; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(__pyx_v_etree);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_etree);
__Pyx_GIVEREF(__pyx_v_etree);
- __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* u"Document does not comply with schema"),
* self._error_log)
*/
- __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_INCREF(__pyx_v_etree);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_etree);
__Pyx_GIVEREF(__pyx_v_etree);
- __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = 0;
__pyx_t_4 = 0;
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3287; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_r = __pyx_t_5;
__Pyx_GOTREF(__pyx_t_1);
if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_11_clear_error_log)) {
__Pyx_XDECREF(__pyx_r);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3292; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_r = __pyx_t_2;
__pyx_t_2 = 0;
__Pyx_INCREF(__pyx_v_node);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_node);
__Pyx_GIVEREF(__pyx_v_node);
- __pyx_t_2 = PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyUnicode_Format(__pyx_kp_u_invalid_DTD_proxy_at_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_7 = PyObject_Call(__pyx_builtin_id, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_10 = PyObject_Call(__pyx_builtin_id, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__pyx_t_9 = PyTuple_New(9); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_itervalues); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_7 = PyObject_Call(__pyx_builtin_id, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_6 = PyTuple_New(6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iterattributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_5 = PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_6) {
- __pyx_t_10 = PyObject_Call(__pyx_t_6, __pyx_tuple__97, NULL);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__97, NULL);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
__Pyx_GOTREF(__pyx_t_1);
__pyx_t_13 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
__Pyx_GOTREF(__pyx_t_13);
- __pyx_t_14 = PyObject_Call(__pyx_t_6, __pyx_t_13, NULL);
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L24_except_error;}
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_6) {
- __pyx_t_8 = PyObject_Call(__pyx_t_6, __pyx_tuple__98, NULL);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__98, NULL);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._error_log));
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* node._dtd = self
* node._c_node = <tree.xmlElement*>c_node
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__DTDElementDecl)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__DTDElementDecl)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_node));
__Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_node, ((struct __pyx_obj_4lxml_5etree__DTDElementDecl *)__pyx_t_3));
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iterelements); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
* node._dtd = self
* node._c_node = <tree.xmlEntity*>c_node
*/
- __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__DTDEntityDecl)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__DTDEntityDecl)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_node));
__Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_node, ((struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)__pyx_t_3));
__Pyx_XDECREF(__pyx_r);
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_iterentities); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
__Pyx_GIVEREF(__pyx_t_2);
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_r = __pyx_t_2;
*/
__pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTDError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_GOTREF(__pyx_t_10);
__pyx_t_11 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = PyObject_Call(__pyx_t_4, __pyx_t_11, NULL);
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L13_except_error;}
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_4) {
- __pyx_t_8 = PyObject_Call(__pyx_t_4, __pyx_tuple__100, NULL);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__100, NULL);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 361; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
__Pyx_GOTREF(__pyx_t_8);
* self._error_log)
* if ret == 1:
*/
- __pyx_t_3 = PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
* dtd_parser = _FileReaderContext(file, exc_context, None)
* error_log = _ErrorLog()
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExceptionContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ExceptionContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_exc_context = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)__pyx_t_1);
__pyx_t_1 = 0;
__Pyx_INCREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
__Pyx_GIVEREF(Py_None);
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileReaderContext)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__FileReaderContext)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_dtd_parser = ((struct __pyx_obj_4lxml_5etree__FileReaderContext *)__pyx_t_2);
*
* with error_log:
*/
- __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ErrorLog)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__pyx_v_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_2);
__pyx_t_2 = 0;
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_3) {
- __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_tuple__101, NULL);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__101, NULL);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_INCREF(((PyObject *)__pyx_v_error_log));
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_error_log));
- __pyx_t_9 = PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_dtd));
PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_dtd));
__Pyx_GIVEREF(((PyObject *)__pyx_v_dtd));
- __pyx_t_5 = PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_9) {
- __pyx_t_13 = PyObject_Call(__pyx_t_9, __pyx_tuple__102, NULL);
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__102, NULL);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_13);
PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._error_log));
__pyx_t_2 = 0;
- __pyx_t_2 = PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._error_log));
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
* u"Internal error in Relax NG validation",
* self._error_log)
*/
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_4 = PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->__pyx_base._error_log));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._error_log));
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_doc));
PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_doc));
__Pyx_GIVEREF(((PyObject *)__pyx_v_doc));
- __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_4lxml_5etree__check_for_default_attributes), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_4lxml_5etree__check_for_default_attributes), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* u"Internal error in XML Schema validation.",
* self._error_log)
*/
- __pyx_t_5 = PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_INCREF(((PyObject *)__pyx_v_self));
PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
__Pyx_GIVEREF(((PyObject *)__pyx_v_self));
- __pyx_t_3 = PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_7) {
- __pyx_t_11 = PyObject_Call(__pyx_t_7, __pyx_tuple__103, NULL);
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__103, NULL);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_7) {
- __pyx_t_9 = PyObject_Call(__pyx_t_7, __pyx_tuple__104, NULL);
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__104, NULL);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L22_error;}
__Pyx_GOTREF(__pyx_t_9);
* u"Document is not a valid Schematron schema",
* self._error_log)
*/
- __pyx_t_1 = PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_GOTREF(__pyx_t_12);
__pyx_t_13 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
__Pyx_GOTREF(__pyx_t_13);
- __pyx_t_14 = PyObject_Call(__pyx_t_6, __pyx_t_13, NULL);
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;}
/*finally:*/ {
/*normal exit:*/{
if (__pyx_t_6) {
- __pyx_t_10 = PyObject_Call(__pyx_t_6, __pyx_tuple__105, NULL);
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__105, NULL);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_10);
* u"Internal error in Schematron validation",
* self._error_log)
*/
- __pyx_t_1 = PyObject_Call(__pyx_t_12, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_GOTREF(__pyx_t_3);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
__pyx_t_5 = 0;
- __pyx_t_5 = PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_GOTREF(__pyx_t_5);
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static struct __pyx_vtabstruct_4lxml_5etree__BaseParser __pyx_vtable_4lxml_5etree__BaseParser;
+static struct __pyx_vtabstruct_4lxml_5etree__TempStore __pyx_vtable_4lxml_5etree__TempStore;
-static PyObject *__pyx_tp_new_4lxml_5etree__BaseParser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__BaseParser *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__TempStore(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__TempStore *p;
PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__BaseParser *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__BaseParser;
- p->_class_lookup = ((struct LxmlElementClassLookup *)Py_None); Py_INCREF(Py_None);
- p->_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)Py_None); Py_INCREF(Py_None);
- p->_parser_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None); Py_INCREF(Py_None);
- p->_push_parser_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None); Py_INCREF(Py_None);
- p->_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)Py_None); Py_INCREF(Py_None);
- p->_filename = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->target = Py_None; Py_INCREF(Py_None);
- p->_default_encoding = Py_None; Py_INCREF(Py_None);
- p->_events_to_collect = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__TempStore *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__TempStore;
+ p->_storage = ((PyObject*)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__BaseParser(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__BaseParser *p = (struct __pyx_obj_4lxml_5etree__BaseParser *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__TempStore(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__TempStore *p = (struct __pyx_obj_4lxml_5etree__TempStore *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_class_lookup);
- Py_CLEAR(p->_resolvers);
- Py_CLEAR(p->_parser_context);
- Py_CLEAR(p->_push_parser_context);
- Py_CLEAR(p->_schema);
- Py_CLEAR(p->_filename);
- Py_CLEAR(p->target);
- Py_CLEAR(p->_default_encoding);
- Py_CLEAR(p->_events_to_collect);
+ Py_CLEAR(p->_storage);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__BaseParser(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__TempStore(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__BaseParser *p = (struct __pyx_obj_4lxml_5etree__BaseParser *)o;
- if (p->_class_lookup) {
- e = (*v)(((PyObject*)p->_class_lookup), a); if (e) return e;
- }
- if (p->_resolvers) {
- e = (*v)(((PyObject*)p->_resolvers), a); if (e) return e;
- }
- if (p->_parser_context) {
- e = (*v)(((PyObject*)p->_parser_context), a); if (e) return e;
- }
- if (p->_push_parser_context) {
- e = (*v)(((PyObject*)p->_push_parser_context), a); if (e) return e;
- }
- if (p->_schema) {
- e = (*v)(((PyObject*)p->_schema), a); if (e) return e;
- }
- if (p->target) {
- e = (*v)(p->target, a); if (e) return e;
- }
- if (p->_default_encoding) {
- e = (*v)(p->_default_encoding, a); if (e) return e;
- }
- if (p->_events_to_collect) {
- e = (*v)(p->_events_to_collect, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__TempStore *p = (struct __pyx_obj_4lxml_5etree__TempStore *)o;
+ if (p->_storage) {
+ e = (*v)(p->_storage, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__BaseParser(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__BaseParser *p = (struct __pyx_obj_4lxml_5etree__BaseParser *)o;
- Py_CLEAR(p->_class_lookup);
- Py_CLEAR(p->_resolvers);
- Py_CLEAR(p->_parser_context);
- Py_CLEAR(p->_push_parser_context);
- Py_CLEAR(p->_schema);
- Py_CLEAR(p->target);
- Py_CLEAR(p->_default_encoding);
- Py_CLEAR(p->_events_to_collect);
+static int __pyx_tp_clear_4lxml_5etree__TempStore(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__TempStore *p = (struct __pyx_obj_4lxml_5etree__TempStore *)o;
+ Py_CLEAR(p->_storage);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_error_log(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_11_BaseParser_9error_log_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_resolvers(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_11_BaseParser_9resolvers_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_version(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_11_BaseParser_7version_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_target(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_11_BaseParser_6target_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__BaseParser[] = {
- {__Pyx_NAMESTR("setElementClassLookup"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_2setElementClassLookup)},
- {__Pyx_NAMESTR("set_element_class_lookup"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_4set_element_class_lookup)},
- {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_7copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_6copy)},
- {__Pyx_NAMESTR("makeelement"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_8makeelement)},
+static PyMethodDef __pyx_methods_4lxml_5etree__TempStore[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__BaseParser[] = {
- {(char *)"error_log", __pyx_getprop_4lxml_5etree_11_BaseParser_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_error_log_of_the_last_parser), 0},
- {(char *)"resolvers", __pyx_getprop_4lxml_5etree_11_BaseParser_resolvers, 0, __Pyx_DOCSTR(__pyx_k_The_custom_resolver_registry_of), 0},
- {(char *)"version", __pyx_getprop_4lxml_5etree_11_BaseParser_version, 0, __Pyx_DOCSTR(__pyx_k_The_version_of_the_underlying_XM), 0},
- {(char *)"target", __pyx_getprop_4lxml_5etree_11_BaseParser_target, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__BaseParser = {
+static PyTypeObject __pyx_type_4lxml_5etree__TempStore = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._BaseParser"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__BaseParser), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._TempStore"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__TempStore), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__TempStore, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__TempStore, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__TempStore, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__BaseParser, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__TempStore, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__BaseParser, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_11_BaseParser_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_10_TempStore_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__BaseParser, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__TempStore, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__FeedParser __pyx_vtable_4lxml_5etree__FeedParser;
+static struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext __pyx_vtable_4lxml_5etree__ExceptionContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__FeedParser(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__FeedParser *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__BaseParser(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ExceptionContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ExceptionContext *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__FeedParser *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree__FeedParser;
+ p = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ExceptionContext;
+ p->_exc_info = Py_None; Py_INCREF(Py_None);
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_11_FeedParser_feed_error_log(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_11_FeedParser_14feed_error_log_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__FeedParser[] = {
- {__Pyx_NAMESTR("feed"), (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_1feed, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_FeedParser_feed)},
- {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_3close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_FeedParser_2close)},
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__FeedParser[] = {
- {(char *)"feed_error_log", __pyx_getprop_4lxml_5etree_11_FeedParser_feed_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_error_log_of_the_last_or_cur), 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__FeedParser = {
- PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._FeedParser"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__FeedParser), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- #if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
- #else
- 0, /*reserved*/
- #endif
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__FeedParser, /*tp_methods*/
- 0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__FeedParser, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_11_BaseParser_1__init__, /*tp_init*/
- #else
- 0, /*tp_init*/
- #endif
- 0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__FeedParser, /*tp_new*/
- 0, /*tp_free*/
- 0, /*tp_is_gc*/
- 0, /*tp_bases*/
- 0, /*tp_mro*/
- 0, /*tp_cache*/
- 0, /*tp_subclasses*/
- 0, /*tp_weaklist*/
- 0, /*tp_del*/
- #if PY_VERSION_HEX >= 0x02060000
- 0, /*tp_version_tag*/
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__ExceptionContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ExceptionContext *p = (struct __pyx_obj_4lxml_5etree__ExceptionContext *)o;
#if PY_VERSION_HEX >= 0x030400a1
- 0, /*tp_finalize*/
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
#endif
-};
-static struct __pyx_vtabstruct_4lxml_5etree_XMLParser __pyx_vtable_4lxml_5etree_XMLParser;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_exc_info);
+ (*Py_TYPE(o)->tp_free)(o);
+}
-static PyObject *__pyx_tp_new_4lxml_5etree_XMLParser(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XMLParser *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__FeedParser(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XMLParser *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_XMLParser;
- return o;
+static int __pyx_tp_traverse_4lxml_5etree__ExceptionContext(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__ExceptionContext *p = (struct __pyx_obj_4lxml_5etree__ExceptionContext *)o;
+ if (p->_exc_info) {
+ e = (*v)(p->_exc_info, a); if (e) return e;
+ }
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XMLParser[] = {
- {0, 0, 0, 0}
-};
+static int __pyx_tp_clear_4lxml_5etree__ExceptionContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ExceptionContext *p = (struct __pyx_obj_4lxml_5etree__ExceptionContext *)o;
+ Py_CLEAR(p->_exc_info);
+ return 0;
+}
-static PyTypeObject __pyx_type_4lxml_5etree_XMLParser = {
+static PyTypeObject __pyx_type_4lxml_5etree__ExceptionContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XMLParser"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XMLParser), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ExceptionContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ExceptionContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ExceptionContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, XMLSchema schema=None, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, target=None, compact=True)\n\n The XML parser.\n\n Parsers can be supplied as additional argument to various parse\n functions of the lxml API. A default parser is always available\n and can be replaced by a call to the global function\n 'set_default_parser'. New parsers can be created at any time\n without a major run-time overhead.\n\n The keyword arguments in the constructor are mainly based on the\n libxml2 parser configuration. A DTD will also be loaded if DTD\n validation or attribute default values are requested (unless you\n additionally provide an XMLSchema from which the default\n attributes can be read).\n\n Available boolean keyword arguments:\n\n - attribute_defaults - inject default attributes from DTD or XMLSchema\n - dtd_validation - validate against a DTD referenced by the document\n - load_dtd - use DTD for parsing\n - no_network - prevent network access for related files (default: True)\n - ns_clean - clean up redundant namespace declarations\n - recover - try hard to parse through broken XML\n - remove_blank_text - discard blank text nodes\n - remove_comments - discard comments\n - remove_pis - discard processing instructions\n - strip_cdata - replace CDATA sections by normal text content (default: True)\n - compact - safe memory for short text content (default: True)\n - resolve_entities - replace entities by their text value (default: True)\n - huge_tree - disable security restrictions and support very deep trees\n and very long text content (only affects libxml2 2.7+)\n\n Other keyword arguments:\n\n - encoding - override the document encoding\n - target - a parser target object that will receive the parse events\n - schema - an XMLSchema to validate against\n\n Note that you should avoid sharing parsers between threads. While this is\n not harmful, it is more efficient to use separate parsers. This does not\n apply to the default parser.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ExceptionContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ExceptionContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XMLParser, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_9XMLParser_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XMLParser, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ExceptionContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_ETCompatXMLParser __pyx_vtable_4lxml_5etree_ETCompatXMLParser;
+static struct __pyx_vtabstruct_4lxml_5etree__Document __pyx_vtable_4lxml_5etree__Document;
-static PyObject *__pyx_tp_new_4lxml_5etree_ETCompatXMLParser(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ETCompatXMLParser *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_XMLParser(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ETCompatXMLParser *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_ETCompatXMLParser;
+static struct LxmlDocument *__pyx_freelist_4lxml_5etree__Document[8];
+static int __pyx_freecount_4lxml_5etree__Document = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__Document(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct LxmlDocument *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree__Document > 0) & (t->tp_basicsize == sizeof(struct LxmlDocument)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__Document[--__pyx_freecount_4lxml_5etree__Document];
+ memset(o, 0, sizeof(struct LxmlDocument));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct LxmlDocument *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__Document;
+ p->_prefix_tail = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ETCompatXMLParser[] = {
+static void __pyx_tp_dealloc_4lxml_5etree__Document(PyObject *o) {
+ struct LxmlDocument *p = (struct LxmlDocument *)o;
+ PyObject_GC_UnTrack(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_9_Document_1__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_prefix_tail);
+ Py_CLEAR(p->_parser);
+ if ((__pyx_freecount_4lxml_5etree__Document < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct LxmlDocument))) {
+ __pyx_freelist_4lxml_5etree__Document[__pyx_freecount_4lxml_5etree__Document++] = ((struct LxmlDocument *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_4lxml_5etree__Document(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct LxmlDocument *p = (struct LxmlDocument *)o;
+ if (p->_parser) {
+ e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__Document(PyObject *o) {
+ struct LxmlDocument *p = (struct LxmlDocument *)o;
+ Py_CLEAR(p->_parser);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__Document[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_ETCompatXMLParser = {
+DL_EXPORT(PyTypeObject) LxmlDocumentType = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ETCompatXMLParser"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ETCompatXMLParser), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._Document"), /*tp_name*/
+ sizeof(struct LxmlDocument), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Document, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ETCompatXMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, schema=None, huge_tree=False, remove_blank_text=False, resolve_entities=True, remove_comments=True, remove_pis=True, strip_cdata=True, target=None, compact=True)\n\n An XML parser with an ElementTree compatible default setup.\n\n See the XMLParser class for details.\n\n This parser has ``remove_comments`` and ``remove_pis`` enabled by default\n and thus ignores comments and processing instructions.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("Internal base class to reference a libxml document.\n\n When instances of this class are garbage collected, the libxml\n document is cleaned up.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Document, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__Document, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ETCompatXMLParser, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__Document, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_17ETCompatXMLParser_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ETCompatXMLParser, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__Document, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement __pyx_vtable_4lxml_5etree___ContentOnlyElement;
+static struct __pyx_vtabstruct_4lxml_5etree__BaseParser __pyx_vtable_4lxml_5etree__BaseParser;
-static PyObject *__pyx_tp_new_4lxml_5etree___ContentOnlyElement(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree___ContentOnlyElement *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__Element(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__BaseParser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__BaseParser *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree___ContentOnlyElement *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
+ p = ((struct __pyx_obj_4lxml_5etree__BaseParser *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__BaseParser;
+ p->_class_lookup = ((struct LxmlElementClassLookup *)Py_None); Py_INCREF(Py_None);
+ p->_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)Py_None); Py_INCREF(Py_None);
+ p->_parser_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None); Py_INCREF(Py_None);
+ p->_push_parser_context = ((struct __pyx_obj_4lxml_5etree__ParserContext *)Py_None); Py_INCREF(Py_None);
+ p->_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)Py_None); Py_INCREF(Py_None);
+ p->_filename = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->target = Py_None; Py_INCREF(Py_None);
+ p->_default_encoding = Py_None; Py_INCREF(Py_None);
+ p->_events_to_collect = ((PyObject*)Py_None); Py_INCREF(Py_None);
return o;
}
-static PyObject *__pyx_sq_item_4lxml_5etree___ContentOnlyElement(PyObject *o, Py_ssize_t i) {
- PyObject *r;
- PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
- r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
- Py_DECREF(x);
- return r;
+
+static void __pyx_tp_dealloc_4lxml_5etree__BaseParser(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__BaseParser *p = (struct __pyx_obj_4lxml_5etree__BaseParser *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_class_lookup);
+ Py_CLEAR(p->_resolvers);
+ Py_CLEAR(p->_parser_context);
+ Py_CLEAR(p->_push_parser_context);
+ Py_CLEAR(p->_schema);
+ Py_CLEAR(p->_filename);
+ Py_CLEAR(p->target);
+ Py_CLEAR(p->_default_encoding);
+ Py_CLEAR(p->_events_to_collect);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_mp_ass_subscript_4lxml_5etree___ContentOnlyElement(PyObject *o, PyObject *i, PyObject *v) {
- if (v) {
- return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_7__setitem__(o, i, v);
+static int __pyx_tp_traverse_4lxml_5etree__BaseParser(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__BaseParser *p = (struct __pyx_obj_4lxml_5etree__BaseParser *)o;
+ if (p->_class_lookup) {
+ e = (*v)(((PyObject*)p->_class_lookup), a); if (e) return e;
}
- else {
- if (__pyx_ptype_4lxml_5etree__Element->tp_as_mapping && __pyx_ptype_4lxml_5etree__Element->tp_as_mapping->mp_ass_subscript)
- return __pyx_ptype_4lxml_5etree__Element->tp_as_mapping->mp_ass_subscript(o, i, v);
- PyErr_Format(PyExc_NotImplementedError,
- "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
- return -1;
+ if (p->_resolvers) {
+ e = (*v)(((PyObject*)p->_resolvers), a); if (e) return e;
+ }
+ if (p->_parser_context) {
+ e = (*v)(((PyObject*)p->_parser_context), a); if (e) return e;
+ }
+ if (p->_push_parser_context) {
+ e = (*v)(((PyObject*)p->_push_parser_context), a); if (e) return e;
+ }
+ if (p->_schema) {
+ e = (*v)(((PyObject*)p->_schema), a); if (e) return e;
+ }
+ if (p->target) {
+ e = (*v)(p->target, a); if (e) return e;
+ }
+ if (p->_default_encoding) {
+ e = (*v)(p->_default_encoding, a); if (e) return e;
}
+ if (p->_events_to_collect) {
+ e = (*v)(p->_events_to_collect, a); if (e) return e;
+ }
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_20__ContentOnlyElement_attrib(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_6attrib_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree__BaseParser(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__BaseParser *p = (struct __pyx_obj_4lxml_5etree__BaseParser *)o;
+ Py_CLEAR(p->_class_lookup);
+ Py_CLEAR(p->_resolvers);
+ Py_CLEAR(p->_parser_context);
+ Py_CLEAR(p->_push_parser_context);
+ Py_CLEAR(p->_schema);
+ Py_CLEAR(p->target);
+ Py_CLEAR(p->_default_encoding);
+ Py_CLEAR(p->_events_to_collect);
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_20__ContentOnlyElement_text(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_4text_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_error_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_11_BaseParser_9error_log_1__get__(o);
}
-static int __pyx_setprop_4lxml_5etree_20__ContentOnlyElement_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_4text_3__set__(o, v);
- }
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
- }
+static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_resolvers(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_11_BaseParser_9resolvers_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree___ContentOnlyElement[] = {
- {__Pyx_NAMESTR("set"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_set)},
- {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_3append, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_2append)},
- {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_4insert)},
- {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_12get)},
- {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_15keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_14keys)},
- {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_17items, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_16items)},
- {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_19values, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_18values)},
- {0, 0, 0, 0}
-};
+static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_version(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_11_BaseParser_7version_1__get__(o);
+}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree___ContentOnlyElement[] = {
- {(char *)"attrib", __pyx_getprop_4lxml_5etree_20__ContentOnlyElement_attrib, 0, 0, 0},
- {(char *)"text", __pyx_getprop_4lxml_5etree_20__ContentOnlyElement_text, __pyx_setprop_4lxml_5etree_20__ContentOnlyElement_text, 0, 0},
- {0, 0, 0, 0, 0}
-};
+static PyObject *__pyx_getprop_4lxml_5etree_11_BaseParser_target(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_11_BaseParser_6target_1__get__(o);
+}
-static PySequenceMethods __pyx_tp_as_sequence___ContentOnlyElement = {
- __pyx_pw_4lxml_5etree_20__ContentOnlyElement_11__len__, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- __pyx_sq_item_4lxml_5etree___ContentOnlyElement, /*sq_item*/
- 0, /*sq_slice*/
- 0, /*sq_ass_item*/
- 0, /*sq_ass_slice*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_39__contains__, /*sq_contains*/
- #else
- 0, /*sq_contains*/
- #endif
- 0, /*sq_inplace_concat*/
- 0, /*sq_inplace_repeat*/
+static PyMethodDef __pyx_methods_4lxml_5etree__BaseParser[] = {
+ {__Pyx_NAMESTR("setElementClassLookup"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_3setElementClassLookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_2setElementClassLookup)},
+ {__Pyx_NAMESTR("set_element_class_lookup"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_5set_element_class_lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_4set_element_class_lookup)},
+ {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_7copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_6copy)},
+ {__Pyx_NAMESTR("makeelement"), (PyCFunction)__pyx_pw_4lxml_5etree_11_BaseParser_9makeelement, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_BaseParser_8makeelement)},
+ {0, 0, 0, 0}
};
-static PyMappingMethods __pyx_tp_as_mapping___ContentOnlyElement = {
- __pyx_pw_4lxml_5etree_20__ContentOnlyElement_11__len__, /*mp_length*/
- __pyx_pw_4lxml_5etree_20__ContentOnlyElement_9__getitem__, /*mp_subscript*/
- __pyx_mp_ass_subscript_4lxml_5etree___ContentOnlyElement, /*mp_ass_subscript*/
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__BaseParser[] = {
+ {(char *)"error_log", __pyx_getprop_4lxml_5etree_11_BaseParser_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_error_log_of_the_last_parser), 0},
+ {(char *)"resolvers", __pyx_getprop_4lxml_5etree_11_BaseParser_resolvers, 0, __Pyx_DOCSTR(__pyx_k_The_custom_resolver_registry_of), 0},
+ {(char *)"version", __pyx_getprop_4lxml_5etree_11_BaseParser_version, 0, __Pyx_DOCSTR(__pyx_k_The_version_of_the_underlying_XM), 0},
+ {(char *)"target", __pyx_getprop_4lxml_5etree_11_BaseParser_target, 0, 0, 0},
+ {0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree___ContentOnlyElement = {
+static PyTypeObject __pyx_type_4lxml_5etree__BaseParser = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.__ContentOnlyElement"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree___ContentOnlyElement), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._BaseParser"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__BaseParser), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_31__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
- &__pyx_tp_as_sequence___ContentOnlyElement, /*tp_as_sequence*/
- &__pyx_tp_as_mapping___ContentOnlyElement, /*tp_as_mapping*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree___ContentOnlyElement, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__BaseParser, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree___ContentOnlyElement, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__BaseParser, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_11_BaseParser_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree___ContentOnlyElement, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__BaseParser, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction __pyx_vtable_4lxml_5etree__ProcessingInstruction;
-static PyObject *__pyx_tp_new_4lxml_5etree__ProcessingInstruction(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ProcessingInstruction *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree___ContentOnlyElement(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ProcessingInstruction *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__ProcessingInstruction;
+static struct __pyx_obj_4lxml_5etree_QName *__pyx_freelist_4lxml_5etree_QName[8];
+static int __pyx_freecount_4lxml_5etree_QName = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree_QName(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_QName *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree_QName > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_QName)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree_QName[--__pyx_freecount_4lxml_5etree_QName];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree_QName));
+ (void) PyObject_INIT(o, t);
+ } else {
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree_QName *)o);
+ p->text = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->localname = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->namespace = ((PyObject*)Py_None); Py_INCREF(Py_None);
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_22_ProcessingInstruction_tag(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_3tag_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree_QName(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_QName *p = (struct __pyx_obj_4lxml_5etree_QName *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ Py_CLEAR(p->text);
+ Py_CLEAR(p->localname);
+ Py_CLEAR(p->namespace);
+ if ((__pyx_freecount_4lxml_5etree_QName < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_QName))) {
+ __pyx_freelist_4lxml_5etree_QName[__pyx_freecount_4lxml_5etree_QName++] = ((struct __pyx_obj_4lxml_5etree_QName *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static PyObject *__pyx_getprop_4lxml_5etree_22_ProcessingInstruction_target(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_6target_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_5QName_text(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_5QName_4text_1__get__(o);
}
-static int __pyx_setprop_4lxml_5etree_22_ProcessingInstruction_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_6target_3__set__(o, v);
- }
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
- }
+static PyObject *__pyx_getprop_4lxml_5etree_5QName_localname(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_5QName_9localname_1__get__(o);
}
-static PyObject *__pyx_getprop_4lxml_5etree_22_ProcessingInstruction_attrib(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_6attrib_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_5QName_namespace(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_5QName_9namespace_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ProcessingInstruction[] = {
- {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_ProcessingInstruction_2get)},
+static PyMethodDef __pyx_methods_4lxml_5etree_QName[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ProcessingInstruction[] = {
- {(char *)"tag", __pyx_getprop_4lxml_5etree_22_ProcessingInstruction_tag, 0, 0, 0},
- {(char *)"target", __pyx_getprop_4lxml_5etree_22_ProcessingInstruction_target, __pyx_setprop_4lxml_5etree_22_ProcessingInstruction_target, 0, 0},
- {(char *)"attrib", __pyx_getprop_4lxml_5etree_22_ProcessingInstruction_attrib, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_dict_containing_all_ps), 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_QName[] = {
+ {(char *)"text", __pyx_getprop_4lxml_5etree_5QName_text, 0, 0, 0},
+ {(char *)"localname", __pyx_getprop_4lxml_5etree_5QName_localname, 0, 0, 0},
+ {(char *)"namespace", __pyx_getprop_4lxml_5etree_5QName_namespace, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ProcessingInstruction = {
+static PyTypeObject __pyx_type_4lxml_5etree_QName = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ProcessingInstruction"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ProcessingInstruction), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.QName"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_QName), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_QName, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_22_ProcessingInstruction_1__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
- 0, /*tp_hash*/
+ __pyx_pw_4lxml_5etree_5QName_5__hash__, /*tp_hash*/
0, /*tp_call*/
- 0, /*tp_str*/
+ __pyx_pw_4lxml_5etree_5QName_3__str__, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ __Pyx_DOCSTR("QName(text_or_uri_or_element, tag=None)\n\n QName wrapper for qualified XML names.\n\n Pass a tag name by itself or a namespace URI and a tag name to\n create a qualified name. Alternatively, pass an Element to\n extract its tag name.\n\n The ``text`` property holds the qualified name in\n ``{namespace}tagname`` notation. The ``namespace`` and\n ``localname`` properties hold the respective parts of the tag\n name.\n\n You can pass QName objects wherever a tag name is expected. Also,\n setting Element text from a QName will resolve the namespace\n prefix and set a qualified text value. This is helpful in XML\n languages like SOAP or XML-Schema that use prefixed tag names in\n their text content.\n "), /*tp_doc*/
+ 0, /*tp_traverse*/
0, /*tp_clear*/
- 0, /*tp_richcompare*/
+ __pyx_pw_4lxml_5etree_5QName_7__richcmp__, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ProcessingInstruction, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_QName, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ProcessingInstruction, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_QName, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_5QName_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ProcessingInstruction, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_QName, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_PIBase __pyx_vtable_4lxml_5etree_PIBase;
+static struct __pyx_vtabstruct_4lxml_5etree__LogEntry __pyx_vtable_4lxml_5etree__LogEntry;
-static PyObject *__pyx_tp_new_4lxml_5etree_PIBase(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_PIBase *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ProcessingInstruction(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_PIBase *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree_PIBase;
+static struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_freelist_4lxml_5etree__LogEntry[16];
+static int __pyx_freecount_4lxml_5etree__LogEntry = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__LogEntry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__LogEntry *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree__LogEntry > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__LogEntry)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__LogEntry[--__pyx_freecount_4lxml_5etree__LogEntry];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__LogEntry));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree__LogEntry *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__LogEntry;
+ p->_message = Py_None; Py_INCREF(Py_None);
+ p->_filename = Py_None; Py_INCREF(Py_None);
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_PIBase[] = {
- {0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree_PIBase = {
- PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.PIBase"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_PIBase), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- #if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
- #else
- 0, /*reserved*/
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_22_ProcessingInstruction_1__repr__, /*tp_repr*/
- #else
- 0, /*tp_repr*/
- #endif
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("All custom Processing Instruction classes must inherit from this one.\n\n To create an XML ProcessingInstruction instance, use the ``PI()``\n factory.\n\n Subclasses *must not* override __init__ or __new__ as it is\n absolutely undefined when these objects will be created or\n destroyed. All persistent state of PIs must be stored in the\n underlying XML. If you really need to initialize the object after\n creation, you can implement an ``_init(self)`` method that will be\n called after object creation.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
- 0, /*tp_iter*/
- #endif
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_PIBase, /*tp_methods*/
- 0, /*tp_members*/
- 0, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_6PIBase_1__init__, /*tp_init*/
- 0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_PIBase, /*tp_new*/
- 0, /*tp_free*/
- 0, /*tp_is_gc*/
- 0, /*tp_bases*/
- 0, /*tp_mro*/
- 0, /*tp_cache*/
- 0, /*tp_subclasses*/
- 0, /*tp_weaklist*/
- 0, /*tp_del*/
- #if PY_VERSION_HEX >= 0x02060000
- 0, /*tp_version_tag*/
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__LogEntry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__LogEntry *p = (struct __pyx_obj_4lxml_5etree__LogEntry *)o;
#if PY_VERSION_HEX >= 0x030400a1
- 0, /*tp_finalize*/
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
#endif
-};
-static struct __pyx_vtabstruct_4lxml_5etree__XSLTProcessingInstruction __pyx_vtable_4lxml_5etree__XSLTProcessingInstruction;
+ PyObject_GC_UnTrack(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_9_LogEntry_1__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_message);
+ Py_CLEAR(p->_filename);
+ if ((__pyx_freecount_4lxml_5etree__LogEntry < 16) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__LogEntry))) {
+ __pyx_freelist_4lxml_5etree__LogEntry[__pyx_freecount_4lxml_5etree__LogEntry++] = ((struct __pyx_obj_4lxml_5etree__LogEntry *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTProcessingInstruction(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_PIBase(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction;
- return o;
+static int __pyx_tp_traverse_4lxml_5etree__LogEntry(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__LogEntry *p = (struct __pyx_obj_4lxml_5etree__LogEntry *)o;
+ if (p->_message) {
+ e = (*v)(p->_message, a); if (e) return e;
+ }
+ if (p->_filename) {
+ e = (*v)(p->_filename, a); if (e) return e;
+ }
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__XSLTProcessingInstruction[] = {
- {__Pyx_NAMESTR("parseXSL"), (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL)},
- {__Pyx_NAMESTR("set"), (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_2set)},
- {0, 0, 0, 0}
-};
+static int __pyx_tp_clear_4lxml_5etree__LogEntry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__LogEntry *p = (struct __pyx_obj_4lxml_5etree__LogEntry *)o;
+ Py_CLEAR(p->_message);
+ Py_CLEAR(p->_filename);
+ return 0;
+}
-static PyTypeObject __pyx_type_4lxml_5etree__XSLTProcessingInstruction = {
- PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XSLTProcessingInstruction"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- #if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
- #else
- 0, /*reserved*/
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_22_ProcessingInstruction_1__repr__, /*tp_repr*/
- #else
- 0, /*tp_repr*/
- #endif
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
- 0, /*tp_iter*/
- #endif
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__XSLTProcessingInstruction, /*tp_methods*/
- 0, /*tp_members*/
- 0, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_6PIBase_1__init__, /*tp_init*/
- #else
- 0, /*tp_init*/
- #endif
- 0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XSLTProcessingInstruction, /*tp_new*/
- 0, /*tp_free*/
- 0, /*tp_is_gc*/
- 0, /*tp_bases*/
- 0, /*tp_mro*/
- 0, /*tp_cache*/
- 0, /*tp_subclasses*/
- 0, /*tp_weaklist*/
- 0, /*tp_del*/
- #if PY_VERSION_HEX >= 0x02060000
- 0, /*tp_version_tag*/
- #endif
- #if PY_VERSION_HEX >= 0x030400a1
- 0, /*tp_finalize*/
- #endif
-};
-static struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser __pyx_vtable_4lxml_5etree_XMLPullParser;
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_domain_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_11domain_name_1__get__(o);
+}
-static PyObject *__pyx_tp_new_4lxml_5etree_XMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XMLPullParser *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_XMLParser(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XMLPullParser *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_XMLPullParser;
- return o;
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_type_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_9type_name_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XMLPullParser[] = {
- {__Pyx_NAMESTR("read_events"), (PyCFunction)__pyx_pw_4lxml_5etree_13XMLPullParser_3read_events, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_level_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_10level_name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_message(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_7message_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_filename(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_8filename_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_domain(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_6domain_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_type(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_4type_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_level(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_5level_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_line(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_4line_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_column(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9_LogEntry_6column_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__LogEntry[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_XMLPullParser = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__LogEntry[] = {
+ {(char *)"domain_name", __pyx_getprop_4lxml_5etree_9_LogEntry_domain_name, 0, __Pyx_DOCSTR(__pyx_k_The_name_of_the_error_domain_See), 0},
+ {(char *)"type_name", __pyx_getprop_4lxml_5etree_9_LogEntry_type_name, 0, __Pyx_DOCSTR(__pyx_k_The_name_of_the_error_type_See_l), 0},
+ {(char *)"level_name", __pyx_getprop_4lxml_5etree_9_LogEntry_level_name, 0, __Pyx_DOCSTR(__pyx_k_The_name_of_the_error_level_See), 0},
+ {(char *)"message", __pyx_getprop_4lxml_5etree_9_LogEntry_message, 0, 0, 0},
+ {(char *)"filename", __pyx_getprop_4lxml_5etree_9_LogEntry_filename, 0, 0, 0},
+ {(char *)"domain", __pyx_getprop_4lxml_5etree_9_LogEntry_domain, 0, 0, 0},
+ {(char *)"type", __pyx_getprop_4lxml_5etree_9_LogEntry_type, 0, 0, 0},
+ {(char *)"level", __pyx_getprop_4lxml_5etree_9_LogEntry_level, 0, 0, 0},
+ {(char *)"line", __pyx_getprop_4lxml_5etree_9_LogEntry_line, 0, 0, 0},
+ {(char *)"column", __pyx_getprop_4lxml_5etree_9_LogEntry_column, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__LogEntry = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XMLPullParser"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XMLPullParser), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._LogEntry"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__LogEntry), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__LogEntry, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_9_LogEntry_3__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XMLPullParser(self, events=None, *, tag=None, **kwargs)\n\n XML parser that collects parse events in an iterator.\n\n The collected events are the same as for iterparse(), but the\n parser itself is non-blocking in the sense that it receives\n data chunks incrementally through its .feed() method, instead\n of reading them directly from a file(-like) object all by itself.\n\n By default, it collects Element end events. To change that,\n pass any subset of the available events into the ``events``\n argument: ``'start'``, ``'end'``, ``'start-ns'``,\n ``'end-ns'``, ``'comment'``, ``'pi'``.\n\n To support loading external dependencies relative to the input\n source, you can pass the ``base_url``.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
+ __Pyx_DOCSTR("A log message entry from an error log.\n\n Attributes:\n\n - message: the message text\n - domain: the domain ID (see lxml.etree.ErrorDomains)\n - type: the message type ID (see lxml.etree.ErrorTypes)\n - level: the log level ID (see lxml.etree.ErrorLevels)\n - line: the line at which the message originated (if applicable)\n - column: the character column at which the message originated (if applicable)\n - filename: the name of the file in which the message originated (if applicable)\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__LogEntry, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__LogEntry, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XMLPullParser, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__LogEntry, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__LogEntry, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_13XMLPullParser_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XMLPullParser, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__LogEntry, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog __pyx_vtable_4lxml_5etree__BaseErrorLog;
-static struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *__pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[8];
-static int __pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct__itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_4lxml_5etree__BaseErrorLog(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__BaseErrorLog *p;
PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[--__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__BaseErrorLog;
+ p->_first_error = ((struct __pyx_obj_4lxml_5etree__LogEntry *)Py_None); Py_INCREF(Py_None);
+ p->last_error = Py_None; Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct__itervalues(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues))) {
- __pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
+static void __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__BaseErrorLog *p = (struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
}
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_first_error);
+ Py_CLEAR(p->last_error);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct__itervalues(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__BaseErrorLog(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o;
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__BaseErrorLog *p = (struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o;
+ if (p->_first_error) {
+ e = (*v)(((PyObject*)p->_first_error), a); if (e) return e;
+ }
+ if (p->last_error) {
+ e = (*v)(p->last_error, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct__itervalues(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o;
- Py_CLEAR(p->__pyx_v_self);
+static int __pyx_tp_clear_4lxml_5etree__BaseErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__BaseErrorLog *p = (struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o;
+ Py_CLEAR(p->_first_error);
+ Py_CLEAR(p->last_error);
return 0;
}
-static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct__itervalues = {
+static PyObject *__pyx_getprop_4lxml_5etree_13_BaseErrorLog_last_error(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_13_BaseErrorLog_10last_error_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__BaseErrorLog[] = {
+ {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_13_BaseErrorLog_3copy, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_13_BaseErrorLog_7receive, METH_O, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__BaseErrorLog[] = {
+ {(char *)"last_error", __pyx_getprop_4lxml_5etree_13_BaseErrorLog_last_error, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__BaseErrorLog = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct__itervalues"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._BaseErrorLog"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__BaseErrorLog), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_13_BaseErrorLog_5__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__BaseErrorLog, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseErrorLog, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__BaseErrorLog, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__BaseErrorLog, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_13_BaseErrorLog_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__BaseErrorLog, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry __pyx_vtable_4lxml_5etree__NamespaceRegistry;
+static struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog __pyx_vtable_4lxml_5etree__ListErrorLog;
-static PyObject *__pyx_tp_new_4lxml_5etree__NamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__ListErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ListErrorLog *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__BaseErrorLog(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__NamespaceRegistry;
- p->_ns_uri = Py_None; Py_INCREF(Py_None);
- p->_ns_uri_utf = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__ListErrorLog *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__ListErrorLog;
p->_entries = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_18_NamespaceRegistry_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__ListErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ListErrorLog *p = (struct __pyx_obj_4lxml_5etree__ListErrorLog *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_ns_uri);
- Py_CLEAR(p->_ns_uri_utf);
Py_CLEAR(p->_entries);
- (*Py_TYPE(o)->tp_free)(o);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ListErrorLog(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o;
- if (p->_ns_uri) {
- e = (*v)(p->_ns_uri, a); if (e) return e;
- }
+ struct __pyx_obj_4lxml_5etree__ListErrorLog *p = (struct __pyx_obj_4lxml_5etree__ListErrorLog *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__BaseErrorLog(o, v, a); if (e) return e;
if (p->_entries) {
e = (*v)(p->_entries, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__NamespaceRegistry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o;
- Py_CLEAR(p->_ns_uri);
+static int __pyx_tp_clear_4lxml_5etree__ListErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ListErrorLog *p = (struct __pyx_obj_4lxml_5etree__ListErrorLog *)o;
+ __pyx_tp_clear_4lxml_5etree__BaseErrorLog(o);
Py_CLEAR(p->_entries);
return 0;
}
-static PyObject *__pyx_sq_item_4lxml_5etree__NamespaceRegistry(PyObject *o, Py_ssize_t i) {
+static PyObject *__pyx_sq_item_4lxml_5etree__ListErrorLog(PyObject *o, Py_ssize_t i) {
PyObject *r;
PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
return r;
}
-static int __pyx_mp_ass_subscript_4lxml_5etree__NamespaceRegistry(PyObject *o, PyObject *i, PyObject *v) {
- if (v) {
- PyErr_Format(PyExc_NotImplementedError,
- "Subscript assignment not supported by %.200s", Py_TYPE(o)->tp_name);
- return -1;
- }
- else {
- return __pyx_pw_4lxml_5etree_18_NamespaceRegistry_7__delitem__(o, i);
- }
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__NamespaceRegistry[] = {
- {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_3update, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_18_NamespaceRegistry_2update)},
- {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_11items, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("iteritems"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_13iteritems, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_15clear, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__ListErrorLog[] = {
+ {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_3copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_2copy)},
+ {__Pyx_NAMESTR("filter_domains"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_17filter_domains, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_16filter_domains)},
+ {__Pyx_NAMESTR("filter_types"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_19filter_types, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_18filter_types)},
+ {__Pyx_NAMESTR("filter_levels"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_21filter_levels, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_20filter_levels)},
+ {__Pyx_NAMESTR("filter_from_level"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_23filter_from_level, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_22filter_from_level)},
+ {__Pyx_NAMESTR("filter_from_fatals"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_25filter_from_fatals, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_24filter_from_fatals)},
+ {__Pyx_NAMESTR("filter_from_errors"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_27filter_from_errors, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_26filter_from_errors)},
+ {__Pyx_NAMESTR("filter_from_warnings"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_29filter_from_warnings, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_28filter_from_warnings)},
{0, 0, 0, 0}
};
-static PySequenceMethods __pyx_tp_as_sequence__NamespaceRegistry = {
- 0, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- __pyx_sq_item_4lxml_5etree__NamespaceRegistry, /*sq_item*/
- 0, /*sq_slice*/
- 0, /*sq_ass_item*/
- 0, /*sq_ass_slice*/
- 0, /*sq_contains*/
- 0, /*sq_inplace_concat*/
- 0, /*sq_inplace_repeat*/
-};
-
-static PyMappingMethods __pyx_tp_as_mapping__NamespaceRegistry = {
- 0, /*mp_length*/
- __pyx_pw_4lxml_5etree_18_NamespaceRegistry_5__getitem__, /*mp_subscript*/
- __pyx_mp_ass_subscript_4lxml_5etree__NamespaceRegistry, /*mp_ass_subscript*/
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__NamespaceRegistry = {
- PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._NamespaceRegistry"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__NamespaceRegistry), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
+static PyNumberMethods __pyx_tp_as_number__ListErrorLog = {
+ 0, /*nb_add*/
+ 0, /*nb_subtract*/
+ 0, /*nb_multiply*/
#if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
+ 0, /*nb_divide*/
+ #endif
+ 0, /*nb_remainder*/
+ 0, /*nb_divmod*/
+ 0, /*nb_power*/
+ 0, /*nb_negative*/
+ 0, /*nb_positive*/
+ 0, /*nb_absolute*/
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_15__nonzero__, /*nb_nonzero*/
+ 0, /*nb_invert*/
+ 0, /*nb_lshift*/
+ 0, /*nb_rshift*/
+ 0, /*nb_and*/
+ 0, /*nb_xor*/
+ 0, /*nb_or*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_coerce*/
+ #endif
+ 0, /*nb_int*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_long*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- &__pyx_tp_as_sequence__NamespaceRegistry, /*tp_as_sequence*/
- &__pyx_tp_as_mapping__NamespaceRegistry, /*tp_as_mapping*/
- 0, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Dictionary-like namespace registry"), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__NamespaceRegistry, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__NamespaceRegistry, /*tp_methods*/
- 0, /*tp_members*/
- 0, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- 0, /*tp_init*/
- 0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__NamespaceRegistry, /*tp_new*/
- 0, /*tp_free*/
- 0, /*tp_is_gc*/
- 0, /*tp_bases*/
- 0, /*tp_mro*/
- 0, /*tp_cache*/
- 0, /*tp_subclasses*/
- 0, /*tp_weaklist*/
- 0, /*tp_del*/
- #if PY_VERSION_HEX >= 0x02060000
- 0, /*tp_version_tag*/
+ 0, /*nb_float*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_oct*/
#endif
- #if PY_VERSION_HEX >= 0x030400a1
- 0, /*tp_finalize*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_hex*/
+ #endif
+ 0, /*nb_inplace_add*/
+ 0, /*nb_inplace_subtract*/
+ 0, /*nb_inplace_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_inplace_divide*/
+ #endif
+ 0, /*nb_inplace_remainder*/
+ 0, /*nb_inplace_power*/
+ 0, /*nb_inplace_lshift*/
+ 0, /*nb_inplace_rshift*/
+ 0, /*nb_inplace_and*/
+ 0, /*nb_inplace_xor*/
+ 0, /*nb_inplace_or*/
+ 0, /*nb_floor_divide*/
+ 0, /*nb_true_divide*/
+ 0, /*nb_inplace_floor_divide*/
+ 0, /*nb_inplace_true_divide*/
+ #if PY_VERSION_HEX >= 0x02050000
+ 0, /*nb_index*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry __pyx_vtable_4lxml_5etree__FunctionNamespaceRegistry;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__NamespaceRegistry(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry*)__pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry;
- return o;
-}
-
-static int __pyx_mp_ass_subscript_4lxml_5etree__FunctionNamespaceRegistry(PyObject *o, PyObject *i, PyObject *v) {
- if (v) {
- return __pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_1__setitem__(o, i, v);
- }
- else {
- if (__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping && __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript)
- return __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript(o, i, v);
- PyErr_Format(PyExc_NotImplementedError,
- "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
- return -1;
- }
-}
-static PyMethodDef __pyx_methods_4lxml_5etree__FunctionNamespaceRegistry[] = {
- {0, 0, 0, 0}
+static PySequenceMethods __pyx_tp_as_sequence__ListErrorLog = {
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_11__len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4lxml_5etree__ListErrorLog, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_13__contains__, /*sq_contains*/
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
};
-static PyMappingMethods __pyx_tp_as_mapping__FunctionNamespaceRegistry = {
- 0, /*mp_length*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_18_NamespaceRegistry_5__getitem__, /*mp_subscript*/
- #else
- 0, /*mp_subscript*/
- #endif
- __pyx_mp_ass_subscript_4lxml_5etree__FunctionNamespaceRegistry, /*mp_ass_subscript*/
+static PyMappingMethods __pyx_tp_as_mapping__ListErrorLog = {
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_11__len__, /*mp_length*/
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_9__getitem__, /*mp_subscript*/
+ 0, /*mp_ass_subscript*/
};
-static PyTypeObject __pyx_type_4lxml_5etree__FunctionNamespaceRegistry = {
+static PyTypeObject __pyx_type_4lxml_5etree__ListErrorLog = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._FunctionNamespaceRegistry"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ListErrorLog"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ListErrorLog), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ListErrorLog, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_3__repr__, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- &__pyx_tp_as_mapping__FunctionNamespaceRegistry, /*tp_as_mapping*/
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
+ &__pyx_tp_as_number__ListErrorLog, /*tp_as_number*/
+ &__pyx_tp_as_sequence__ListErrorLog, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping__ListErrorLog, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__NamespaceRegistry, /*tp_clear*/
+ __Pyx_DOCSTR("Immutable base version of a list based error log."), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ListErrorLog, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ListErrorLog, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
- #else
- 0, /*tp_iter*/
- #endif
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_5__iter__, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__FunctionNamespaceRegistry, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ListErrorLog, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ListErrorLog, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__XPathFunctionNamespaceRegistry __pyx_vtable_4lxml_5etree__XPathFunctionNamespaceRegistry;
-static PyObject *__pyx_tp_new_4lxml_5etree__XPathFunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLogContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry*)__pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry;
- p->_prefix = Py_None; Py_INCREF(Py_None);
- p->_prefix_utf = ((PyObject*)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__XPathFunctionNamespaceRegistry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_prefix);
- Py_CLEAR(p->_prefix_utf);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__XPathFunctionNamespaceRegistry(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o;
- e = __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry(o, v, a); if (e) return e;
- if (p->_prefix) {
- e = (*v)(p->_prefix, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__XPathFunctionNamespaceRegistry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o;
- __pyx_tp_clear_4lxml_5etree__NamespaceRegistry(o);
- Py_CLEAR(p->_prefix);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_3__get__(o);
-}
-
-static int __pyx_setprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_5__set__(o, v);
- }
- else {
- return __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_1__del__(o);
- }
+static void __pyx_tp_dealloc_4lxml_5etree__ErrorLogContext(PyObject *o) {
+ (*Py_TYPE(o)->tp_free)(o);
}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__XPathFunctionNamespaceRegistry[] = {
- {(char *)"prefix", __pyx_getprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix, __pyx_setprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix, __Pyx_DOCSTR(__pyx_k_Namespace_prefix_for_extension_f), 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry = {
+static PyTypeObject __pyx_type_4lxml_5etree__ErrorLogContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XPathFunctionNamespaceRegistry"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ErrorLogContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ErrorLogContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ErrorLogContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_3__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ __Pyx_DOCSTR("\n Error log context for the 'with' statement.\n Stores a reference to the current callbacks to allow for\n recursively stacked log contexts.\n "), /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
0, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ErrorLogContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext __pyx_vtable_4lxml_5etree__FileReaderContext;
+static struct __pyx_vtabstruct_4lxml_5etree__ErrorLog __pyx_vtable_4lxml_5etree__ErrorLog;
-static PyObject *__pyx_tp_new_4lxml_5etree__FileReaderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__FileReaderContext *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ErrorLog *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ListErrorLog(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__FileReaderContext *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__FileReaderContext;
- p->_filelike = Py_None; Py_INCREF(Py_None);
- p->_encoding = Py_None; Py_INCREF(Py_None);
- p->_url = Py_None; Py_INCREF(Py_None);
- p->_bytes = Py_None; Py_INCREF(Py_None);
- p->_exc_context = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_18_FileReaderContext_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__ErrorLog;
+ p->_logContexts = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_9_ErrorLog_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__FileReaderContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__FileReaderContext *p = (struct __pyx_obj_4lxml_5etree__FileReaderContext *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__ErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ErrorLog *p = (struct __pyx_obj_4lxml_5etree__ErrorLog *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_filelike);
- Py_CLEAR(p->_encoding);
- Py_CLEAR(p->_url);
- Py_CLEAR(p->_bytes);
- Py_CLEAR(p->_exc_context);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->_logContexts);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__ListErrorLog(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__FileReaderContext(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ErrorLog(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__FileReaderContext *p = (struct __pyx_obj_4lxml_5etree__FileReaderContext *)o;
- if (p->_filelike) {
- e = (*v)(p->_filelike, a); if (e) return e;
- }
- if (p->_encoding) {
- e = (*v)(p->_encoding, a); if (e) return e;
- }
- if (p->_url) {
- e = (*v)(p->_url, a); if (e) return e;
- }
- if (p->_bytes) {
- e = (*v)(p->_bytes, a); if (e) return e;
- }
- if (p->_exc_context) {
- e = (*v)(((PyObject*)p->_exc_context), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__ErrorLog *p = (struct __pyx_obj_4lxml_5etree__ErrorLog *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__ListErrorLog(o, v, a); if (e) return e;
+ if (p->_logContexts) {
+ e = (*v)(p->_logContexts, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__FileReaderContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__FileReaderContext *p = (struct __pyx_obj_4lxml_5etree__FileReaderContext *)o;
- Py_CLEAR(p->_filelike);
- Py_CLEAR(p->_encoding);
- Py_CLEAR(p->_url);
- Py_CLEAR(p->_bytes);
- Py_CLEAR(p->_exc_context);
+static int __pyx_tp_clear_4lxml_5etree__ErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ErrorLog *p = (struct __pyx_obj_4lxml_5etree__ErrorLog *)o;
+ __pyx_tp_clear_4lxml_5etree__ListErrorLog(o);
+ Py_CLEAR(p->_logContexts);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__FileReaderContext[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__ErrorLog[] = {
+ {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_7clear, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_9copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_ErrorLog_8copy)},
+ {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_13receive, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__FileReaderContext = {
+static PyTypeObject __pyx_type_4lxml_5etree__ErrorLog = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._FileReaderContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__FileReaderContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ErrorLog"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ErrorLog), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__FileReaderContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ErrorLog, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__FileReaderContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__FileReaderContext, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__ErrorLog, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ErrorLog, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_9_ErrorLog_11__iter__, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__FileReaderContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ErrorLog, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_9_ErrorLog_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__FileReaderContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ErrorLog, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog __pyx_vtable_4lxml_5etree__BaseErrorLog;
+static struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog __pyx_vtable_4lxml_5etree__DomainErrorLog;
-static PyObject *__pyx_tp_new_4lxml_5etree__BaseErrorLog(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__BaseErrorLog *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__DomainErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__DomainErrorLog *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ErrorLog(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__BaseErrorLog;
- p->_first_error = ((struct __pyx_obj_4lxml_5etree__LogEntry *)Py_None); Py_INCREF(Py_None);
- p->last_error = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__DomainErrorLog *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__DomainErrorLog;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__BaseErrorLog *p = (struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_first_error);
- Py_CLEAR(p->last_error);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__BaseErrorLog(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__BaseErrorLog *p = (struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o;
- if (p->_first_error) {
- e = (*v)(((PyObject*)p->_first_error), a); if (e) return e;
- }
- if (p->last_error) {
- e = (*v)(p->last_error, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__BaseErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__BaseErrorLog *p = (struct __pyx_obj_4lxml_5etree__BaseErrorLog *)o;
- Py_CLEAR(p->_first_error);
- Py_CLEAR(p->last_error);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_13_BaseErrorLog_last_error(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_13_BaseErrorLog_10last_error_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__BaseErrorLog[] = {
- {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_13_BaseErrorLog_3copy, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_13_BaseErrorLog_7receive, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__DomainErrorLog[] = {
+ {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_15_DomainErrorLog_3receive, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__BaseErrorLog[] = {
- {(char *)"last_error", __pyx_getprop_4lxml_5etree_13_BaseErrorLog_last_error, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__BaseErrorLog = {
+static PyTypeObject __pyx_type_4lxml_5etree__DomainErrorLog = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._BaseErrorLog"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__BaseErrorLog), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._DomainErrorLog"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__DomainErrorLog), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ErrorLog, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_13_BaseErrorLog_5__repr__, /*tp_repr*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseErrorLog, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseErrorLog, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__ErrorLog, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ErrorLog, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_9_ErrorLog_11__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__BaseErrorLog, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__DomainErrorLog, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__BaseErrorLog, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_13_BaseErrorLog_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_15_DomainErrorLog_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__BaseErrorLog, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__DomainErrorLog, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher __pyx_vtable_4lxml_5etree__ElementTagMatcher;
+static struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog __pyx_vtable_4lxml_5etree__RotatingErrorLog;
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementTagMatcher(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct LxmlElementTagMatcher *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__RotatingErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__RotatingErrorLog *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ErrorLog(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct LxmlElementTagMatcher *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ElementTagMatcher;
- p->_pystrings = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__RotatingErrorLog *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__RotatingErrorLog;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ElementTagMatcher(PyObject *o) {
- struct LxmlElementTagMatcher *p = (struct LxmlElementTagMatcher *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_pystrings);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ElementTagMatcher(PyObject *o, visitproc v, void *a) {
- int e;
- struct LxmlElementTagMatcher *p = (struct LxmlElementTagMatcher *)o;
- if (p->_pystrings) {
- e = (*v)(p->_pystrings, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ElementTagMatcher(PyObject *o) {
- struct LxmlElementTagMatcher *p = (struct LxmlElementTagMatcher *)o;
- Py_CLEAR(p->_pystrings);
- return 0;
-}
+static PyMethodDef __pyx_methods_4lxml_5etree__RotatingErrorLog[] = {
+ {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_17_RotatingErrorLog_3receive, METH_O, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
-DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType = {
+static PyTypeObject __pyx_type_4lxml_5etree__RotatingErrorLog = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ElementTagMatcher"), /*tp_name*/
- sizeof(struct LxmlElementTagMatcher), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._RotatingErrorLog"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__RotatingErrorLog), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementTagMatcher, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ErrorLog, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("\n Dead but public. :)\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementTagMatcher, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementTagMatcher, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ErrorLog, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ErrorLog, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_9_ErrorLog_11__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__RotatingErrorLog, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_17_RotatingErrorLog_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ElementTagMatcher, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__RotatingErrorLog, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_XSLT __pyx_vtable_4lxml_5etree_XSLT;
+static struct __pyx_vtabstruct_4lxml_5etree_PyErrorLog __pyx_vtable_4lxml_5etree_PyErrorLog;
-static PyObject *__pyx_tp_new_4lxml_5etree_XSLT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XSLT *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree_PyErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_PyErrorLog *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__BaseErrorLog(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XSLT *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_XSLT;
- p->_context = ((struct __pyx_obj_4lxml_5etree__XSLTContext *)Py_None); Py_INCREF(Py_None);
- p->_xslt_resolver_context = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)Py_None); Py_INCREF(Py_None);
- p->_access_control = ((struct __pyx_obj_4lxml_5etree_XSLTAccessControl *)Py_None); Py_INCREF(Py_None);
- p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_4XSLT_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree_PyErrorLog *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree_PyErrorLog;
+ p->level_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_map_level = Py_None; Py_INCREF(Py_None);
+ p->_log = Py_None; Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_XSLT(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_XSLT *p = (struct __pyx_obj_4lxml_5etree_XSLT *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_PyErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_PyErrorLog *p = (struct __pyx_obj_4lxml_5etree_PyErrorLog *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_4XSLT_5__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_CLEAR(p->_context);
- Py_CLEAR(p->_xslt_resolver_context);
- Py_CLEAR(p->_access_control);
- Py_CLEAR(p->_error_log);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->level_map);
+ Py_CLEAR(p->_map_level);
+ Py_CLEAR(p->_log);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_XSLT(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_PyErrorLog(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_XSLT *p = (struct __pyx_obj_4lxml_5etree_XSLT *)o;
- if (p->_context) {
- e = (*v)(((PyObject*)p->_context), a); if (e) return e;
- }
- if (p->_xslt_resolver_context) {
- e = (*v)(((PyObject*)p->_xslt_resolver_context), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree_PyErrorLog *p = (struct __pyx_obj_4lxml_5etree_PyErrorLog *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__BaseErrorLog(o, v, a); if (e) return e;
+ if (p->level_map) {
+ e = (*v)(p->level_map, a); if (e) return e;
}
- if (p->_access_control) {
- e = (*v)(((PyObject*)p->_access_control), a); if (e) return e;
+ if (p->_map_level) {
+ e = (*v)(p->_map_level, a); if (e) return e;
}
- if (p->_error_log) {
- e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ if (p->_log) {
+ e = (*v)(p->_log, a); if (e) return e;
}
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_4XSLT_error_log(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_4XSLT_9error_log_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree_PyErrorLog(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_PyErrorLog *p = (struct __pyx_obj_4lxml_5etree_PyErrorLog *)o;
+ __pyx_tp_clear_4lxml_5etree__BaseErrorLog(o);
+ Py_CLEAR(p->level_map);
+ Py_CLEAR(p->_map_level);
+ Py_CLEAR(p->_log);
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XSLT[] = {
- {__Pyx_NAMESTR("strparam"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_7strparam, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_6strparam)},
- {__Pyx_NAMESTR("set_global_max_depth"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_8set_global_max_depth)},
- {__Pyx_NAMESTR("apply"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_11apply, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_10apply)},
- {__Pyx_NAMESTR("tostring"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_13tostring, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_12tostring)},
- {__Pyx_NAMESTR("__deepcopy__"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_15__deepcopy__, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("__copy__"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_17__copy__, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyObject *__pyx_getprop_4lxml_5etree_10PyErrorLog_level_map(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_10PyErrorLog_9level_map_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_PyErrorLog[] = {
+ {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_3copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10PyErrorLog_2copy)},
+ {__Pyx_NAMESTR("log"), (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_5log, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10PyErrorLog_4log)},
+ {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_7receive, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10PyErrorLog_6receive)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XSLT[] = {
- {(char *)"error_log", __pyx_getprop_4lxml_5etree_4XSLT_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_log_of_errors_and_warnings_o), 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_PyErrorLog[] = {
+ {(char *)"level_map", __pyx_getprop_4lxml_5etree_10PyErrorLog_level_map, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_XSLT = {
+static PyTypeObject __pyx_type_4lxml_5etree_PyErrorLog = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XSLT"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XSLT), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.PyErrorLog"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_PyErrorLog), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XSLT, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_PyErrorLog, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_13_BaseErrorLog_5__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_4XSLT_19__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)\n\n Turn an XSL document into an XSLT object.\n\n Calling this object on a tree or Element will execute the XSLT::\n\n transform = etree.XSLT(xsl_tree)\n result = transform(xml_tree)\n\n Keyword arguments of the constructor:\n\n - extensions: a dict mapping ``(namespace, name)`` pairs to\n extension functions or extension elements\n - regexp: enable exslt regular expression support in XPath\n (default: True)\n - access_control: access restrictions for network or file\n system (see `XSLTAccessControl`)\n\n Keyword arguments of the XSLT call:\n\n - profile_run: enable XSLT profiling (default: False)\n\n Other keyword arguments of the call are passed to the stylesheet\n as parameters.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_XSLT, /*tp_traverse*/
- 0, /*tp_clear*/
+ __Pyx_DOCSTR("PyErrorLog(self, logger_name=None, logger=None)\n A global error log that connects to the Python stdlib logging package.\n\n The constructor accepts an optional logger name or a readily\n instantiated logger instance.\n\n If you want to change the mapping between libxml2's ErrorLevels and Python\n logging levels, you can modify the level_map dictionary from a subclass.\n\n The default mapping is::\n\n ErrorLevels.WARNING = logging.WARNING\n ErrorLevels.ERROR = logging.ERROR\n ErrorLevels.FATAL = logging.CRITICAL\n\n You can also override the method ``receive()`` that takes a LogEntry\n object and calls ``self.log(log_entry, format_string, arg1, arg2, ...)``\n with appropriate data.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_PyErrorLog, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_PyErrorLog, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XSLT, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_PyErrorLog, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_XSLT, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_PyErrorLog, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_4XSLT_3__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_10PyErrorLog_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XSLT, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_PyErrorLog, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_ElementDepthFirstIterator __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementDepthFirstIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p;
+static struct __pyx_obj_4lxml_5etree_DocInfo *__pyx_freelist_4lxml_5etree_DocInfo[4];
+static int __pyx_freecount_4lxml_5etree_DocInfo = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree_DocInfo(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_DocInfo *p;
PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
+ if (likely((__pyx_freecount_4lxml_5etree_DocInfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_DocInfo)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree_DocInfo[--__pyx_freecount_4lxml_5etree_DocInfo];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree_DocInfo));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
} else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
}
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator;
- p->_next_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
- p->_top_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
- p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_DocInfo *)o);
+ p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_7DocInfo_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_ElementDepthFirstIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p = (struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_DocInfo(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_DocInfo *p = (struct __pyx_obj_4lxml_5etree_DocInfo *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_next_node);
- Py_CLEAR(p->_top_node);
- Py_CLEAR(p->_matcher);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->_doc);
+ if ((__pyx_freecount_4lxml_5etree_DocInfo < 4) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_DocInfo))) {
+ __pyx_freelist_4lxml_5etree_DocInfo[__pyx_freecount_4lxml_5etree_DocInfo++] = ((struct __pyx_obj_4lxml_5etree_DocInfo *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_4lxml_5etree_ElementDepthFirstIterator(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_DocInfo(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p = (struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o;
- if (p->_next_node) {
- e = (*v)(((PyObject*)p->_next_node), a); if (e) return e;
- }
- if (p->_top_node) {
- e = (*v)(((PyObject*)p->_top_node), a); if (e) return e;
- }
- if (p->_matcher) {
- e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree_DocInfo *p = (struct __pyx_obj_4lxml_5etree_DocInfo *)o;
+ if (p->_doc) {
+ e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_ElementDepthFirstIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p = (struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o;
- Py_CLEAR(p->_next_node);
- Py_CLEAR(p->_top_node);
- Py_CLEAR(p->_matcher);
+static int __pyx_tp_clear_4lxml_5etree_DocInfo(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_DocInfo *p = (struct __pyx_obj_4lxml_5etree_DocInfo *)o;
+ Py_CLEAR(p->_doc);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ElementDepthFirstIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_root_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_9root_name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_public_id(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_9public_id_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_system_url(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_10system_url_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_xml_version(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_11xml_version_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_encoding(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_8encoding_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_standalone(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_10standalone_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_URL(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_3URL_1__get__(o);
+}
+
+static int __pyx_setprop_4lxml_5etree_7DocInfo_URL(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_3URL_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_doctype(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_7doctype_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_internalDTD(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_11internalDTD_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_externalDTD(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7DocInfo_11externalDTD_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_DocInfo[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_ElementDepthFirstIterator = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_DocInfo[] = {
+ {(char *)"root_name", __pyx_getprop_4lxml_5etree_7DocInfo_root_name, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_name_of_the_root_nod), 0},
+ {(char *)"public_id", __pyx_getprop_4lxml_5etree_7DocInfo_public_id, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_public_ID_of_the_DOC), 0},
+ {(char *)"system_url", __pyx_getprop_4lxml_5etree_7DocInfo_system_url, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_system_ID_of_the_DOC), 0},
+ {(char *)"xml_version", __pyx_getprop_4lxml_5etree_7DocInfo_xml_version, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_XML_version_as_decla), 0},
+ {(char *)"encoding", __pyx_getprop_4lxml_5etree_7DocInfo_encoding, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_encoding_name_as_dec), 0},
+ {(char *)"standalone", __pyx_getprop_4lxml_5etree_7DocInfo_standalone, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_standalone_flag_as_d), 0},
+ {(char *)"URL", __pyx_getprop_4lxml_5etree_7DocInfo_URL, __pyx_setprop_4lxml_5etree_7DocInfo_URL, __Pyx_DOCSTR(__pyx_k_The_source_URL_of_the_document_o), 0},
+ {(char *)"doctype", __pyx_getprop_4lxml_5etree_7DocInfo_doctype, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_DOCTYPE_declaration_st), 0},
+ {(char *)"internalDTD", __pyx_getprop_4lxml_5etree_7DocInfo_internalDTD, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_DTD_validator_based_on), 0},
+ {(char *)"externalDTD", __pyx_getprop_4lxml_5etree_7DocInfo_externalDTD, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_DTD_validator_based_on_2), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_DocInfo = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ElementDepthFirstIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.DocInfo"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_DocInfo), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_ElementDepthFirstIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_DocInfo, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ElementDepthFirstIterator(self, node, tag=None, inclusive=True)\n Iterates over an element and its sub-elements in document order (depth\n first pre-order).\n\n Note that this also includes comments, entities and processing\n instructions. To filter them out, check if the ``tag`` property\n of the returned element is a string (i.e. not None and not a\n factory function), or pass the ``Element`` factory for the ``tag``\n argument to receive only Elements.\n\n If the optional ``tag`` argument is not None, the iterator returns only\n the elements that match the respective name and namespace.\n\n The optional boolean argument 'inclusive' defaults to True and can be set\n to False to exclude the start element itself.\n\n Note that the behaviour of this iterator is completely undefined if the\n tree it traverses is modified during iteration.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_ElementDepthFirstIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_ElementDepthFirstIterator, /*tp_clear*/
+ __Pyx_DOCSTR("Document information provided by parser and DTD."), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_DocInfo, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_DocInfo, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_3__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ElementDepthFirstIterator, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_DocInfo, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_DocInfo, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ElementDepthFirstIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_DocInfo, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement __pyx_vtable_4lxml_5etree___ContentOnlyElement;
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementClassLookup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree___ContentOnlyElement(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree___ContentOnlyElement *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Element(t, a, k);
if (unlikely(!o)) return 0;
- if (unlikely(__pyx_pw_4lxml_5etree_18ElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree___ContentOnlyElement *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
return o;
}
+static PyObject *__pyx_sq_item_4lxml_5etree___ContentOnlyElement(PyObject *o, Py_ssize_t i) {
+ PyObject *r;
+ PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+ r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+ Py_DECREF(x);
+ return r;
+}
-static void __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup(PyObject *o) {
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
+static int __pyx_mp_ass_subscript_4lxml_5etree___ContentOnlyElement(PyObject *o, PyObject *i, PyObject *v) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_7__setitem__(o, i, v);
+ }
+ else {
+ if (__pyx_ptype_4lxml_5etree__Element->tp_as_mapping && __pyx_ptype_4lxml_5etree__Element->tp_as_mapping->mp_ass_subscript)
+ return __pyx_ptype_4lxml_5etree__Element->tp_as_mapping->mp_ass_subscript(o, i, v);
+ PyErr_Format(PyExc_NotImplementedError,
+ "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
+ return -1;
}
- #endif
- (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ElementClassLookup[] = {
+static PyObject *__pyx_getprop_4lxml_5etree_20__ContentOnlyElement_attrib(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_6attrib_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_20__ContentOnlyElement_text(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_4text_1__get__(o);
+}
+
+static int __pyx_setprop_4lxml_5etree_20__ContentOnlyElement_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_20__ContentOnlyElement_4text_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree___ContentOnlyElement[] = {
+ {__Pyx_NAMESTR("set"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_set)},
+ {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_3append, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_2append)},
+ {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_4insert)},
+ {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_12get)},
+ {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_15keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_14keys)},
+ {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_17items, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_16items)},
+ {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_20__ContentOnlyElement_19values, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_20__ContentOnlyElement_18values)},
{0, 0, 0, 0}
};
-DL_EXPORT(PyTypeObject) LxmlElementClassLookupType = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree___ContentOnlyElement[] = {
+ {(char *)"attrib", __pyx_getprop_4lxml_5etree_20__ContentOnlyElement_attrib, 0, 0, 0},
+ {(char *)"text", __pyx_getprop_4lxml_5etree_20__ContentOnlyElement_text, __pyx_setprop_4lxml_5etree_20__ContentOnlyElement_text, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PySequenceMethods __pyx_tp_as_sequence___ContentOnlyElement = {
+ __pyx_pw_4lxml_5etree_20__ContentOnlyElement_11__len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4lxml_5etree___ContentOnlyElement, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_39__contains__, /*sq_contains*/
+ #else
+ 0, /*sq_contains*/
+ #endif
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping___ContentOnlyElement = {
+ __pyx_pw_4lxml_5etree_20__ContentOnlyElement_11__len__, /*mp_length*/
+ __pyx_pw_4lxml_5etree_20__ContentOnlyElement_9__getitem__, /*mp_subscript*/
+ __pyx_mp_ass_subscript_4lxml_5etree___ContentOnlyElement, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree___ContentOnlyElement = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ElementClassLookup"), /*tp_name*/
- sizeof(struct LxmlElementClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.__ContentOnlyElement"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree___ContentOnlyElement), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_31__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ &__pyx_tp_as_sequence___ContentOnlyElement, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping___ContentOnlyElement, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("ElementClassLookup(self)\n Superclass of Element class lookups.\n "), /*tp_doc*/
- 0, /*tp_traverse*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ElementClassLookup, /*tp_methods*/
+ __pyx_methods_4lxml_5etree___ContentOnlyElement, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree___ContentOnlyElement, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ElementClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree___ContentOnlyElement, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry __pyx_vtable_4lxml_5etree__ResolverRegistry;
+static struct __pyx_vtabstruct_4lxml_5etree__Comment __pyx_vtable_4lxml_5etree__Comment;
-static PyObject *__pyx_tp_new_4lxml_5etree__ResolverRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ResolverRegistry *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree__Comment(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__Comment *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree___ContentOnlyElement(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ResolverRegistry;
- p->_resolvers = Py_None; Py_INCREF(Py_None);
- p->_default_resolver = ((struct __pyx_obj_4lxml_5etree_Resolver *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_17_ResolverRegistry_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree__Comment *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__Comment;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ResolverRegistry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ResolverRegistry *p = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_resolvers);
- Py_CLEAR(p->_default_resolver);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ResolverRegistry(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__ResolverRegistry *p = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o;
- if (p->_resolvers) {
- e = (*v)(p->_resolvers, a); if (e) return e;
- }
- if (p->_default_resolver) {
- e = (*v)(((PyObject*)p->_default_resolver), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ResolverRegistry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ResolverRegistry *p = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o;
- Py_CLEAR(p->_resolvers);
- Py_CLEAR(p->_default_resolver);
- return 0;
+static PyObject *__pyx_getprop_4lxml_5etree_8_Comment_tag(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_8_Comment_3tag_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ResolverRegistry[] = {
- {__Pyx_NAMESTR("add"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_3add, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_2add)},
- {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_5remove, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_4remove)},
- {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_7copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_6copy)},
- {__Pyx_NAMESTR("resolve"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_8resolve)},
+static PyMethodDef __pyx_methods_4lxml_5etree__Comment[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ResolverRegistry = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__Comment[] = {
+ {(char *)"tag", __pyx_getprop_4lxml_5etree_8_Comment_tag, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__Comment = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ResolverRegistry"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ResolverRegistry), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._Comment"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__Comment), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ResolverRegistry, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_17_ResolverRegistry_11__repr__, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_8_Comment_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ResolverRegistry, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ResolverRegistry, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ResolverRegistry, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__Comment, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__Comment, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ResolverRegistry, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__Comment, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget __pyx_vtable_4lxml_5etree__SaxParserTarget;
+static struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction __pyx_vtable_4lxml_5etree__ProcessingInstruction;
-static PyObject *__pyx_tp_new_4lxml_5etree__SaxParserTarget(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__SaxParserTarget *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__ProcessingInstruction(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ProcessingInstruction *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree___ContentOnlyElement(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__SaxParserTarget;
- if (unlikely(__pyx_pw_4lxml_5etree_16_SaxParserTarget_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree__ProcessingInstruction *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__ProcessingInstruction;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget(PyObject *o) {
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
+static PyObject *__pyx_getprop_4lxml_5etree_22_ProcessingInstruction_tag(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_3tag_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_22_ProcessingInstruction_target(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_6target_1__get__(o);
+}
+
+static int __pyx_setprop_4lxml_5etree_22_ProcessingInstruction_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_6target_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
}
- #endif
- (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__SaxParserTarget[] = {
+static PyObject *__pyx_getprop_4lxml_5etree_22_ProcessingInstruction_attrib(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_ProcessingInstruction_6attrib_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__ProcessingInstruction[] = {
+ {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_ProcessingInstruction_2get)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__SaxParserTarget = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ProcessingInstruction[] = {
+ {(char *)"tag", __pyx_getprop_4lxml_5etree_22_ProcessingInstruction_tag, 0, 0, 0},
+ {(char *)"target", __pyx_getprop_4lxml_5etree_22_ProcessingInstruction_target, __pyx_setprop_4lxml_5etree_22_ProcessingInstruction_target, 0, 0},
+ {(char *)"attrib", __pyx_getprop_4lxml_5etree_22_ProcessingInstruction_attrib, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_dict_containing_all_ps), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__ProcessingInstruction = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._SaxParserTarget"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__SaxParserTarget), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ProcessingInstruction"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ProcessingInstruction), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_22_ProcessingInstruction_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- 0, /*tp_traverse*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__SaxParserTarget, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ProcessingInstruction, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ProcessingInstruction, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__SaxParserTarget, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ProcessingInstruction, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_TreeBuilder __pyx_vtable_4lxml_5etree_TreeBuilder;
-
-static PyObject *__pyx_tp_new_4lxml_5etree_TreeBuilder(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_TreeBuilder *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__SaxParserTarget(t, a, k);
+static struct __pyx_vtabstruct_4lxml_5etree__Entity __pyx_vtable_4lxml_5etree__Entity;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__Entity(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__Entity *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree___ContentOnlyElement(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_TreeBuilder *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget*)__pyx_vtabptr_4lxml_5etree_TreeBuilder;
- p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
- p->_factory = Py_None; Py_INCREF(Py_None);
- p->_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_element_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_element_stack_pop = Py_None; Py_INCREF(Py_None);
- p->_last = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__Entity *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__Entity;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_TreeBuilder(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_TreeBuilder *p = (struct __pyx_obj_4lxml_5etree_TreeBuilder *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_parser);
- Py_CLEAR(p->_factory);
- Py_CLEAR(p->_data);
- Py_CLEAR(p->_element_stack);
- Py_CLEAR(p->_element_stack_pop);
- Py_CLEAR(p->_last);
- #if CYTHON_COMPILING_IN_CPYTHON
- if (PyType_IS_GC(Py_TYPE(o)->tp_base))
- #endif
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget(o);
+static PyObject *__pyx_getprop_4lxml_5etree_7_Entity_tag(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7_Entity_3tag_1__get__(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_TreeBuilder(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree_TreeBuilder *p = (struct __pyx_obj_4lxml_5etree_TreeBuilder *)o;
- e = ((likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) ? ((__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse) ? __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree_TreeBuilder)); if (e) return e;
- if (p->_parser) {
- e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
- }
- if (p->_factory) {
- e = (*v)(p->_factory, a); if (e) return e;
- }
- if (p->_data) {
- e = (*v)(p->_data, a); if (e) return e;
- }
- if (p->_element_stack) {
- e = (*v)(p->_element_stack, a); if (e) return e;
- }
- if (p->_element_stack_pop) {
- e = (*v)(p->_element_stack_pop, a); if (e) return e;
+static PyObject *__pyx_getprop_4lxml_5etree_7_Entity_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7_Entity_4name_1__get__(o);
+}
+
+static int __pyx_setprop_4lxml_5etree_7_Entity_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_7_Entity_4name_3__set__(o, v);
}
- if (p->_last) {
- e = (*v)(((PyObject*)p->_last), a); if (e) return e;
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
}
- return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_TreeBuilder(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_TreeBuilder *p = (struct __pyx_obj_4lxml_5etree_TreeBuilder *)o;
- if (likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) { if (__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear) __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree_TreeBuilder);
- Py_CLEAR(p->_parser);
- Py_CLEAR(p->_factory);
- Py_CLEAR(p->_data);
- Py_CLEAR(p->_element_stack);
- Py_CLEAR(p->_element_stack_pop);
- Py_CLEAR(p->_last);
- return 0;
+static PyObject *__pyx_getprop_4lxml_5etree_7_Entity_text(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_7_Entity_4text_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_TreeBuilder[] = {
- {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_3close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_2close)},
- {__Pyx_NAMESTR("data"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_5data, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_4data)},
- {__Pyx_NAMESTR("start"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_7start, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_6start)},
- {__Pyx_NAMESTR("end"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_9end, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_8end)},
- {__Pyx_NAMESTR("pi"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_11pi, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_10pi)},
- {__Pyx_NAMESTR("comment"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_13comment, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_12comment)},
+static PyMethodDef __pyx_methods_4lxml_5etree__Entity[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_TreeBuilder = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__Entity[] = {
+ {(char *)"tag", __pyx_getprop_4lxml_5etree_7_Entity_tag, 0, 0, 0},
+ {(char *)"name", __pyx_getprop_4lxml_5etree_7_Entity_name, __pyx_setprop_4lxml_5etree_7_Entity_name, 0, 0},
+ {(char *)"text", __pyx_getprop_4lxml_5etree_7_Entity_text, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__Entity = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.TreeBuilder"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_TreeBuilder), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._Entity"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__Entity), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_TreeBuilder, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_7_Entity_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("TreeBuilder(self, element_factory=None, parser=None)\n Parser target that builds a tree.\n\n The final tree is returned by the ``close()`` method.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_TreeBuilder, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_TreeBuilder, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_TreeBuilder, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__Entity, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__Entity, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_11TreeBuilder_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_TreeBuilder, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__Entity, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase __pyx_vtable_4lxml_5etree__XPathEvaluatorBase;
+static struct __pyx_vtabstruct_4lxml_5etree__ElementTree __pyx_vtable_4lxml_5etree__ElementTree;
-static PyObject *__pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p;
+static struct LxmlElementTree *__pyx_freelist_4lxml_5etree__ElementTree[8];
+static int __pyx_freecount_4lxml_5etree__ElementTree = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementTree(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct LxmlElementTree *p;
PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
+ if (likely((__pyx_freecount_4lxml_5etree__ElementTree > 0) & (t->tp_basicsize == sizeof(struct LxmlElementTree)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__ElementTree[--__pyx_freecount_4lxml_5etree__ElementTree];
+ memset(o, 0, sizeof(struct LxmlElementTree));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
} else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
- p->_context = ((struct __pyx_obj_4lxml_5etree__XPathContext *)Py_None); Py_INCREF(Py_None);
- p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
}
+ p = ((struct LxmlElementTree *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ElementTree;
+ p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
+ p->_context_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p = (struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__ElementTree(PyObject *o) {
+ struct LxmlElementTree *p = (struct LxmlElementTree *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_5__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
+ Py_CLEAR(p->_doc);
+ Py_CLEAR(p->_context_node);
+ if ((__pyx_freecount_4lxml_5etree__ElementTree < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct LxmlElementTree))) {
+ __pyx_freelist_4lxml_5etree__ElementTree[__pyx_freecount_4lxml_5etree__ElementTree++] = ((struct LxmlElementTree *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
}
- Py_CLEAR(p->_context);
- Py_CLEAR(p->_error_log);
- (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ElementTree(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p = (struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o;
- if (p->_context) {
- e = (*v)(((PyObject*)p->_context), a); if (e) return e;
+ struct LxmlElementTree *p = (struct LxmlElementTree *)o;
+ if (p->_doc) {
+ e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
}
- if (p->_error_log) {
- e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ if (p->_context_node) {
+ e = (*v)(((PyObject*)p->_context_node), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p = (struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o;
- Py_CLEAR(p->_context);
- Py_CLEAR(p->_error_log);
+static int __pyx_tp_clear_4lxml_5etree__ElementTree(PyObject *o) {
+ struct LxmlElementTree *p = (struct LxmlElementTree *)o;
+ Py_CLEAR(p->_doc);
+ Py_CLEAR(p->_context_node);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_19_XPathEvaluatorBase_error_log(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_9error_log_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_12_ElementTree_docinfo(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_12_ElementTree_7docinfo_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__XPathEvaluatorBase[] = {
- {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_19_XPathEvaluatorBase_6evaluate)},
+static PyObject *__pyx_getprop_4lxml_5etree_12_ElementTree_parser(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_12_ElementTree_6parser_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__ElementTree[] = {
+ {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_1parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_parse)},
+ {__Pyx_NAMESTR("_setroot"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_3_setroot, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_2_setroot)},
+ {__Pyx_NAMESTR("getroot"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_5getroot, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_4getroot)},
+ {__Pyx_NAMESTR("__copy__"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_7__copy__, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("__deepcopy__"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_9__deepcopy__, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_11write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_10write)},
+ {__Pyx_NAMESTR("getpath"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_13getpath, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_12getpath)},
+ {__Pyx_NAMESTR("getiterator"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_15getiterator, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_14getiterator)},
+ {__Pyx_NAMESTR("iter"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_17iter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_16iter)},
+ {__Pyx_NAMESTR("find"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_19find, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_18find)},
+ {__Pyx_NAMESTR("findtext"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_21findtext, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_20findtext)},
+ {__Pyx_NAMESTR("findall"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_23findall, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_22findall)},
+ {__Pyx_NAMESTR("iterfind"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_25iterfind, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_24iterfind)},
+ {__Pyx_NAMESTR("xpath"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_27xpath, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_26xpath)},
+ {__Pyx_NAMESTR("xslt"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_29xslt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_28xslt)},
+ {__Pyx_NAMESTR("relaxng"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_31relaxng, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_30relaxng)},
+ {__Pyx_NAMESTR("xmlschema"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_33xmlschema, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_32xmlschema)},
+ {__Pyx_NAMESTR("xinclude"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_35xinclude, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_34xinclude)},
+ {__Pyx_NAMESTR("write_c14n"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_37write_c14n, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_36write_c14n)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__XPathEvaluatorBase[] = {
- {(char *)"error_log", __pyx_getprop_4lxml_5etree_19_XPathEvaluatorBase_error_log, 0, 0, 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ElementTree[] = {
+ {(char *)"docinfo", __pyx_getprop_4lxml_5etree_12_ElementTree_docinfo, 0, __Pyx_DOCSTR(__pyx_k_Information_about_the_document_p), 0},
+ {(char *)"parser", __pyx_getprop_4lxml_5etree_12_ElementTree_parser, 0, __Pyx_DOCSTR(__pyx_k_The_parser_that_was_used_to_pars), 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__XPathEvaluatorBase = {
+DL_EXPORT(PyTypeObject) LxmlElementTreeType = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XPathEvaluatorBase"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ElementTree"), /*tp_name*/
+ sizeof(struct LxmlElementTree), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementTree, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__ElementTree, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementTree, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__XPathEvaluatorBase, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ElementTree, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__XPathEvaluatorBase, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ElementTree, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XPathEvaluatorBase, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ElementTree, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_XPathElementEvaluator __pyx_vtable_4lxml_5etree_XPathElementEvaluator;
-static PyObject *__pyx_tp_new_4lxml_5etree_XPathElementEvaluator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_XPathElementEvaluator;
+static struct __pyx_obj_4lxml_5etree__Attrib *__pyx_freelist_4lxml_5etree__Attrib[16];
+static int __pyx_freecount_4lxml_5etree__Attrib = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__Attrib(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__Attrib *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree__Attrib > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__Attrib)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__Attrib[--__pyx_freecount_4lxml_5etree__Attrib];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__Attrib));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree__Attrib *)o);
p->_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_7_Attrib_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_XPathElementEvaluator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p = (struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__Attrib(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__Attrib *p = (struct __pyx_obj_4lxml_5etree__Attrib *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
#endif
PyObject_GC_UnTrack(o);
Py_CLEAR(p->_element);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase(o);
+ if ((__pyx_freecount_4lxml_5etree__Attrib < 16) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__Attrib))) {
+ __pyx_freelist_4lxml_5etree__Attrib[__pyx_freecount_4lxml_5etree__Attrib++] = ((struct __pyx_obj_4lxml_5etree__Attrib *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_4lxml_5etree_XPathElementEvaluator(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__Attrib(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p = (struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o;
- e = __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase(o, v, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__Attrib *p = (struct __pyx_obj_4lxml_5etree__Attrib *)o;
if (p->_element) {
e = (*v)(((PyObject*)p->_element), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_XPathElementEvaluator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p = (struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o;
- __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase(o);
+static int __pyx_tp_clear_4lxml_5etree__Attrib(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__Attrib *p = (struct __pyx_obj_4lxml_5etree__Attrib *)o;
Py_CLEAR(p->_element);
return 0;
}
+static PyObject *__pyx_sq_item_4lxml_5etree__Attrib(PyObject *o, Py_ssize_t i) {
+ PyObject *r;
+ PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+ r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+ Py_DECREF(x);
+ return r;
+}
-static PyMethodDef __pyx_methods_4lxml_5etree_XPathElementEvaluator[] = {
- {__Pyx_NAMESTR("register_namespace"), (PyCFunction)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21XPathElementEvaluator_2register_namespace)},
- {__Pyx_NAMESTR("register_namespaces"), (PyCFunction)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_5register_namespaces, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21XPathElementEvaluator_4register_namespaces)},
+static int __pyx_mp_ass_subscript_4lxml_5etree__Attrib(PyObject *o, PyObject *i, PyObject *v) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_7_Attrib_3__setitem__(o, i, v);
+ }
+ else {
+ return __pyx_pw_4lxml_5etree_7_Attrib_5__delitem__(o, i);
+ }
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__Attrib[] = {
+ {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_7update, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("pop"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_9pop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_11clear, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("__copy__"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_15__copy__, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("__deepcopy__"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_17__deepcopy__, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_25get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_27keys, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("iterkeys"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_31iterkeys, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_33values, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("itervalues"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_35itervalues, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_37items, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("iteritems"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_39iteritems, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("has_key"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_41has_key, METH_O, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_XPathElementEvaluator = {
+static PyNumberMethods __pyx_tp_as_number__Attrib = {
+ 0, /*nb_add*/
+ 0, /*nb_subtract*/
+ 0, /*nb_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_divide*/
+ #endif
+ 0, /*nb_remainder*/
+ 0, /*nb_divmod*/
+ 0, /*nb_power*/
+ 0, /*nb_negative*/
+ 0, /*nb_positive*/
+ 0, /*nb_absolute*/
+ __pyx_pw_4lxml_5etree_7_Attrib_21__bool__, /*nb_nonzero*/
+ 0, /*nb_invert*/
+ 0, /*nb_lshift*/
+ 0, /*nb_rshift*/
+ 0, /*nb_and*/
+ 0, /*nb_xor*/
+ 0, /*nb_or*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_coerce*/
+ #endif
+ 0, /*nb_int*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_long*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*nb_float*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_oct*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_hex*/
+ #endif
+ 0, /*nb_inplace_add*/
+ 0, /*nb_inplace_subtract*/
+ 0, /*nb_inplace_multiply*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*nb_inplace_divide*/
+ #endif
+ 0, /*nb_inplace_remainder*/
+ 0, /*nb_inplace_power*/
+ 0, /*nb_inplace_lshift*/
+ 0, /*nb_inplace_rshift*/
+ 0, /*nb_inplace_and*/
+ 0, /*nb_inplace_xor*/
+ 0, /*nb_inplace_or*/
+ 0, /*nb_floor_divide*/
+ 0, /*nb_true_divide*/
+ 0, /*nb_inplace_floor_divide*/
+ 0, /*nb_inplace_true_divide*/
+ #if PY_VERSION_HEX >= 0x02050000
+ 0, /*nb_index*/
+ #endif
+};
+
+static PySequenceMethods __pyx_tp_as_sequence__Attrib = {
+ __pyx_pw_4lxml_5etree_7_Attrib_23__len__, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4lxml_5etree__Attrib, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ __pyx_pw_4lxml_5etree_7_Attrib_43__contains__, /*sq_contains*/
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping__Attrib = {
+ __pyx_pw_4lxml_5etree_7_Attrib_23__len__, /*mp_length*/
+ __pyx_pw_4lxml_5etree_7_Attrib_19__getitem__, /*mp_subscript*/
+ __pyx_mp_ass_subscript_4lxml_5etree__Attrib, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__Attrib = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XPathElementEvaluator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XPathElementEvaluator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._Attrib"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__Attrib), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XPathElementEvaluator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Attrib, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ __pyx_pw_4lxml_5etree_7_Attrib_13__repr__, /*tp_repr*/
+ &__pyx_tp_as_number__Attrib, /*tp_as_number*/
+ &__pyx_tp_as_sequence__Attrib, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping__Attrib, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_21XPathElementEvaluator_7__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XPathElementEvaluator(self, element, namespaces=None, extensions=None, regexp=True, smart_strings=True)\n Create an XPath evaluator for an element.\n\n Absolute XPath expressions (starting with '/') will be evaluated against\n the ElementTree as returned by getroottree().\n\n Additional namespace declarations can be passed with the\n 'namespace' keyword argument. EXSLT regular expression support\n can be disabled with the 'regexp' boolean keyword (defaults to\n True). Smart strings will be returned for string results unless\n you pass ``smart_strings=False``.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_XPathElementEvaluator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_XPathElementEvaluator, /*tp_clear*/
- 0, /*tp_richcompare*/
+ __Pyx_DOCSTR("A dict-like proxy for the ``Element.attrib`` property.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Attrib, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__Attrib, /*tp_clear*/
+ __pyx_pw_4lxml_5etree_7_Attrib_45__richcmp__, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_7_Attrib_29__iter__, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XPathElementEvaluator, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__Attrib, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_21XPathElementEvaluator_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XPathElementEvaluator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__Attrib, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_XPathDocumentEvaluator __pyx_vtable_4lxml_5etree_XPathDocumentEvaluator;
-static PyObject *__pyx_tp_new_4lxml_5etree_XPathDocumentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_XPathElementEvaluator(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__AttribIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__AttribIterator *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator;
+ p = ((struct __pyx_obj_4lxml_5etree__AttribIterator *)o);
+ p->_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XPathDocumentEvaluator[] = {
+static void __pyx_tp_dealloc_4lxml_5etree__AttribIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__AttribIterator *p = (struct __pyx_obj_4lxml_5etree__AttribIterator *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_node);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree__AttribIterator(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__AttribIterator *p = (struct __pyx_obj_4lxml_5etree__AttribIterator *)o;
+ if (p->_node) {
+ e = (*v)(((PyObject*)p->_node), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__AttribIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__AttribIterator *p = (struct __pyx_obj_4lxml_5etree__AttribIterator *)o;
+ Py_CLEAR(p->_node);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__AttribIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_15_AttribIterator_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_XPathDocumentEvaluator = {
+static PyTypeObject __pyx_type_4lxml_5etree__AttribIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XPathDocumentEvaluator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._AttribIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__AttribIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XPathElementEvaluator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__AttribIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_22XPathDocumentEvaluator_3__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XPathDocumentEvaluator(self, etree, namespaces=None, extensions=None, regexp=True, smart_strings=True)\n Create an XPath evaluator for an ElementTree.\n\n Additional namespace declarations can be passed with the\n 'namespace' keyword argument. EXSLT regular expression support\n can be disabled with the 'regexp' boolean keyword (defaults to\n True). Smart strings will be returned for string results unless\n you pass ``smart_strings=False``.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_XPathElementEvaluator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_XPathElementEvaluator, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("Attribute iterator - for internal use only!\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__AttribIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__AttribIterator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XPathDocumentEvaluator, /*tp_methods*/
+ __pyx_pw_4lxml_5etree_15_AttribIterator_1__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_15_AttribIterator_3__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree__AttribIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_22XPathDocumentEvaluator_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XPathDocumentEvaluator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__AttribIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher __pyx_vtable_4lxml_5etree__ElementTagMatcher;
-static struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *__pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[8];
-static int __pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementTagMatcher(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct LxmlElementTagMatcher *p;
PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
+ if (unlikely(!o)) return 0;
+ p = ((struct LxmlElementTagMatcher *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ElementTagMatcher;
+ p->_pystrings = Py_None; Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes))) {
- __pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
+static void __pyx_tp_dealloc_4lxml_5etree__ElementTagMatcher(PyObject *o) {
+ struct LxmlElementTagMatcher *p = (struct LxmlElementTagMatcher *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
}
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_pystrings);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ElementTagMatcher(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o;
- if (p->__pyx_v_node) {
- e = (*v)(((PyObject*)p->__pyx_v_node), a); if (e) return e;
- }
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ struct LxmlElementTagMatcher *p = (struct LxmlElementTagMatcher *)o;
+ if (p->_pystrings) {
+ e = (*v)(p->_pystrings, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o;
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_self);
+static int __pyx_tp_clear_4lxml_5etree__ElementTagMatcher(PyObject *o) {
+ struct LxmlElementTagMatcher *p = (struct LxmlElementTagMatcher *)o;
+ Py_CLEAR(p->_pystrings);
return 0;
}
-static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes = {
+DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct_1_iterattributes"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ElementTagMatcher"), /*tp_name*/
+ sizeof(struct LxmlElementTagMatcher), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementTagMatcher, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("\n Dead but public. :)\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ElementTagMatcher, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementTagMatcher, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ElementTagMatcher, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__Comment __pyx_vtable_4lxml_5etree__Comment;
+static struct __pyx_vtabstruct_4lxml_5etree__ElementIterator __pyx_vtable_4lxml_5etree__ElementIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree__Comment(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__Comment *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree___ContentOnlyElement(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct LxmlElementIterator *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ElementTagMatcher(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__Comment *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__Comment;
+ p = ((struct LxmlElementIterator *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher*)__pyx_vtabptr_4lxml_5etree__ElementIterator;
+ p->_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_8_Comment_tag(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_8_Comment_3tag_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree__ElementIterator(PyObject *o) {
+ struct LxmlElementIterator *p = (struct LxmlElementIterator *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_node);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__ElementTagMatcher(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__Comment[] = {
- {0, 0, 0, 0}
-};
+static int __pyx_tp_traverse_4lxml_5etree__ElementIterator(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct LxmlElementIterator *p = (struct LxmlElementIterator *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__ElementTagMatcher(o, v, a); if (e) return e;
+ if (p->_node) {
+ e = (*v)(((PyObject*)p->_node), a); if (e) return e;
+ }
+ return 0;
+}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__Comment[] = {
- {(char *)"tag", __pyx_getprop_4lxml_5etree_8_Comment_tag, 0, 0, 0},
- {0, 0, 0, 0, 0}
+static int __pyx_tp_clear_4lxml_5etree__ElementIterator(PyObject *o) {
+ struct LxmlElementIterator *p = (struct LxmlElementIterator *)o;
+ __pyx_tp_clear_4lxml_5etree__ElementTagMatcher(o);
+ Py_CLEAR(p->_node);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__ElementIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_16_ElementIterator_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__Comment = {
+DL_EXPORT(PyTypeObject) LxmlElementIteratorType = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._Comment"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__Comment), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ElementIterator"), /*tp_name*/
+ sizeof(struct LxmlElementIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_8_Comment_1__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
+ __Pyx_DOCSTR("\n Dead but public. :)\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ElementIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementIterator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
- 0, /*tp_iter*/
- #endif
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__Comment, /*tp_methods*/
+ __pyx_pw_4lxml_5etree_16_ElementIterator_1__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_16_ElementIterator_3__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree__ElementIterator, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__Comment, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__Comment, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ElementIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_XPath __pyx_vtable_4lxml_5etree_XPath;
+static struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_vtable_4lxml_5etree__ElementMatchIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree_XPath(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XPath *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XPath *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_XPath;
- p->_path = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_5XPath_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementMatchIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
+ p->_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_XPath(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_XPath *p = (struct __pyx_obj_4lxml_5etree_XPath *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p = (struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_5XPath_7__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
+ Py_CLEAR(p->_node);
+ Py_CLEAR(p->_matcher);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p = (struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o;
+ if (p->_node) {
+ e = (*v)(((PyObject*)p->_node), a); if (e) return e;
}
- Py_CLEAR(p->_path);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase(o);
+ if (p->_matcher) {
+ e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
+ }
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_5XPath_path(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_5XPath_4path_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree__ElementMatchIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p = (struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o;
+ Py_CLEAR(p->_node);
+ Py_CLEAR(p->_matcher);
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XPath[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__ElementMatchIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XPath[] = {
- {(char *)"path", __pyx_getprop_4lxml_5etree_5XPath_path, 0, __Pyx_DOCSTR(__pyx_k_The_literal_XPath_expression), 0},
- {0, 0, 0, 0, 0}
+static PyTypeObject __pyx_type_4lxml_5etree__ElementMatchIterator = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("lxml.etree._ElementMatchIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ElementMatchIterator), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree__ElementMatchIterator, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_4lxml_5etree__ElementMatchIterator, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator __pyx_vtable_4lxml_5etree_ElementChildIterator;
-static PyTypeObject __pyx_type_4lxml_5etree_XPath = {
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementChildIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ElementChildIterator *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ElementMatchIterator(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_ElementChildIterator *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator*)__pyx_vtabptr_4lxml_5etree_ElementChildIterator;
+ if (unlikely(__pyx_pw_4lxml_5etree_20ElementChildIterator_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_ElementChildIterator[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_ElementChildIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XPath"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XPath), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ElementChildIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ElementChildIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XPath, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_5XPath_9__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_5XPath_5__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True)\n A compiled XPath expression that can be called on Elements and ElementTrees.\n\n Besides the XPath expression, you can pass prefix-namespace\n mappings and extension functions to the constructor through the\n keyword arguments ``namespaces`` and ``extensions``. EXSLT\n regular expression support can be disabled with the 'regexp'\n boolean keyword (defaults to True). Smart strings will be\n returned for string results unless you pass\n ``smart_strings=False``.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase, /*tp_clear*/
+ __Pyx_DOCSTR("ElementChildIterator(self, node, tag=None, reversed=False)\n Iterates over the children of an element.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
+ #else
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XPath, /*tp_methods*/
+ #endif
+ __pyx_methods_4lxml_5etree_ElementChildIterator, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_XPath, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_5XPath_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XPath, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ElementChildIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_ETXPath __pyx_vtable_4lxml_5etree_ETXPath;
+static struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator __pyx_vtable_4lxml_5etree_SiblingsIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree_ETXPath(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ETXPath *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_XPath(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_SiblingsIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_SiblingsIterator *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ElementMatchIterator(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ETXPath *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_ETXPath;
+ p = ((struct __pyx_obj_4lxml_5etree_SiblingsIterator *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator*)__pyx_vtabptr_4lxml_5etree_SiblingsIterator;
+ if (unlikely(__pyx_pw_4lxml_5etree_16SiblingsIterator_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ETXPath[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_SiblingsIterator[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_ETXPath = {
+static PyTypeObject __pyx_type_4lxml_5etree_SiblingsIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ETXPath"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ETXPath), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.SiblingsIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_SiblingsIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XPath, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_5XPath_9__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("SiblingsIterator(self, node, tag=None, preceding=False)\n Iterates over the siblings of an element.\n\n You can pass the boolean keyword ``preceding`` to specify the direction.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
#if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_5XPath_5__call__, /*tp_call*/
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
#else
- 0, /*tp_call*/
+ 0, /*tp_iter*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
+ #else
+ 0, /*tp_iternext*/
+ #endif
+ __pyx_methods_4lxml_5etree_SiblingsIterator, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_4lxml_5etree_SiblingsIterator, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+static struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator __pyx_vtable_4lxml_5etree_AncestorsIterator;
+
+static PyObject *__pyx_tp_new_4lxml_5etree_AncestorsIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_AncestorsIterator *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ElementMatchIterator(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_AncestorsIterator *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator*)__pyx_vtabptr_4lxml_5etree_AncestorsIterator;
+ if (unlikely(__pyx_pw_4lxml_5etree_17AncestorsIterator_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
+ return o;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_AncestorsIterator[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_AncestorsIterator = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("lxml.etree.AncestorsIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_AncestorsIterator), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
#endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ETXPath(self, path, extensions=None, regexp=True, smart_strings=True)\n Special XPath class that supports the ElementTree {uri} notation for namespaces.\n\n Note that this class does not accept the ``namespace`` keyword\n argument. All namespaces must be passed as part of the path\n string. Smart strings will be returned for string results unless\n you pass ``smart_strings=False``.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase, /*tp_clear*/
+ __Pyx_DOCSTR("AncestorsIterator(self, node, tag=None)\n Iterates over the ancestors of an element (from parent to parent).\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
+ #else
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ETXPath, /*tp_methods*/
+ #endif
+ __pyx_methods_4lxml_5etree_AncestorsIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_7ETXPath_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ETXPath, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_AncestorsIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_vtable_4lxml_5etree_FallbackElementClassLookup;
+static struct __pyx_vtabstruct_4lxml_5etree_ElementDepthFirstIterator __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct LxmlFallbackElementClassLookup *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_ElementClassLookup(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementDepthFirstIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct LxmlFallbackElementClassLookup *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
- p->fallback = ((struct LxmlElementClassLookup *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_26FallbackElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator;
+ p->_next_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ p->_top_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup(PyObject *o) {
- struct LxmlFallbackElementClassLookup *p = (struct LxmlFallbackElementClassLookup *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_ElementDepthFirstIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p = (struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->fallback);
- #if CYTHON_COMPILING_IN_CPYTHON
- if (PyType_IS_GC(Py_TYPE(o)->tp_base))
- #endif
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup(o);
+ Py_CLEAR(p->_next_node);
+ Py_CLEAR(p->_top_node);
+ Py_CLEAR(p->_matcher);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_ElementDepthFirstIterator(PyObject *o, visitproc v, void *a) {
int e;
- struct LxmlFallbackElementClassLookup *p = (struct LxmlFallbackElementClassLookup *)o;
- e = ((likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) ? ((__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse) ? __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup)); if (e) return e;
- if (p->fallback) {
- e = (*v)(((PyObject*)p->fallback), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p = (struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o;
+ if (p->_next_node) {
+ e = (*v)(((PyObject*)p->_next_node), a); if (e) return e;
+ }
+ if (p->_top_node) {
+ e = (*v)(((PyObject*)p->_top_node), a); if (e) return e;
+ }
+ if (p->_matcher) {
+ e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup(PyObject *o) {
- struct LxmlFallbackElementClassLookup *p = (struct LxmlFallbackElementClassLookup *)o;
- if (likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) { if (__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear) __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup);
- Py_CLEAR(p->fallback);
+static int __pyx_tp_clear_4lxml_5etree_ElementDepthFirstIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *p = (struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)o;
+ Py_CLEAR(p->_next_node);
+ Py_CLEAR(p->_top_node);
+ Py_CLEAR(p->_matcher);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_26FallbackElementClassLookup_fallback(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_8fallback_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree_FallbackElementClassLookup[] = {
- {__Pyx_NAMESTR("set_fallback"), (PyCFunction)__pyx_pw_4lxml_5etree_26FallbackElementClassLookup_5set_fallback, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_26FallbackElementClassLookup_4set_fallback)},
+static PyMethodDef __pyx_methods_4lxml_5etree_ElementDepthFirstIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_FallbackElementClassLookup[] = {
- {(char *)"fallback", __pyx_getprop_4lxml_5etree_26FallbackElementClassLookup_fallback, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-DL_EXPORT(PyTypeObject) LxmlFallbackElementClassLookupType = {
+static PyTypeObject __pyx_type_4lxml_5etree_ElementDepthFirstIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.FallbackElementClassLookup"), /*tp_name*/
- sizeof(struct LxmlFallbackElementClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ElementDepthFirstIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_ElementDepthFirstIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("FallbackElementClassLookup(self, fallback=None)\n\n Superclass of Element class lookups with additional fallback.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
+ __Pyx_DOCSTR("ElementDepthFirstIterator(self, node, tag=None, inclusive=True)\n Iterates over an element and its sub-elements in document order (depth\n first pre-order).\n\n Note that this also includes comments, entities and processing\n instructions. To filter them out, check if the ``tag`` property\n of the returned element is a string (i.e. not None and not a\n factory function), or pass the ``Element`` factory for the ``tag``\n argument to receive only Elements.\n\n If the optional ``tag`` argument is not None, the iterator returns only\n the elements that match the respective name and namespace.\n\n The optional boolean argument 'inclusive' defaults to True and can be set\n to False to exclude the start element itself.\n\n Note that the behaviour of this iterator is completely undefined if the\n tree it traverses is modified during iteration.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_ElementDepthFirstIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_ElementDepthFirstIterator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_FallbackElementClassLookup, /*tp_methods*/
+ __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_3__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_5__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_ElementDepthFirstIterator, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_FallbackElementClassLookup, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ElementDepthFirstIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_CustomElementClassLookup __pyx_vtable_4lxml_5etree_CustomElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree_CustomElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_CustomElementClassLookup *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementTextIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ElementTextIterator *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_CustomElementClassLookup *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_CustomElementClassLookup;
- if (unlikely(__pyx_pw_4lxml_5etree_24CustomElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o);
+ p->_nextEvent = Py_None; Py_INCREF(Py_None);
+ p->_start_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_19ElementTextIterator_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_CustomElementClassLookup[] = {
- {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_24CustomElementClassLookup_2lookup)},
+static void __pyx_tp_dealloc_4lxml_5etree_ElementTextIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementTextIterator *p = (struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_nextEvent);
+ Py_CLEAR(p->_start_element);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree_ElementTextIterator(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree_ElementTextIterator *p = (struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o;
+ if (p->_nextEvent) {
+ e = (*v)(p->_nextEvent, a); if (e) return e;
+ }
+ if (p->_start_element) {
+ e = (*v)(((PyObject*)p->_start_element), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree_ElementTextIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementTextIterator *p = (struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o;
+ Py_CLEAR(p->_nextEvent);
+ Py_CLEAR(p->_start_element);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_ElementTextIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_CustomElementClassLookup = {
+static PyTypeObject __pyx_type_4lxml_5etree_ElementTextIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.CustomElementClassLookup"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_CustomElementClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ElementTextIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ElementTextIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_ElementTextIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("CustomElementClassLookup(self, fallback=None)\n Element class lookup based on a subclass method.\n\n You can inherit from this class and override the method::\n\n lookup(self, type, doc, namespace, name)\n\n to lookup the element class for a node. Arguments of the method:\n * type: one of 'element', 'comment', 'PI', 'entity'\n * doc: document that the node is in\n * namespace: namespace URI of the node (or None for comments/PIs/entities)\n * name: name of the element/entity, None for comments, target for PIs\n\n If you return None from this method, the fallback will be called.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
+ __Pyx_DOCSTR("ElementTextIterator(self, element, tag=None, with_tail=True)\n Iterates over the text content of a subtree.\n\n You can pass the ``tag`` keyword argument to restrict text content to a\n specific tag name.\n\n You can set the ``with_tail`` keyword argument to ``False`` to skip over\n tail text (e.g. if you know that it's only whitespace from pretty-printing).\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_ElementTextIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_ElementTextIterator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_CustomElementClassLookup, /*tp_methods*/
+ __pyx_pw_4lxml_5etree_19ElementTextIterator_3__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_ElementTextIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
- #else
0, /*tp_init*/
- #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_CustomElementClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ElementTextIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter __pyx_vtable_4lxml_5etree__IncrementalFileWriter;
-static PyObject *__pyx_tp_new_4lxml_5etree__IncrementalFileWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p;
+static struct __pyx_obj_4lxml_5etree_CDATA *__pyx_freelist_4lxml_5etree_CDATA[8];
+static int __pyx_freecount_4lxml_5etree_CDATA = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree_CDATA(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_CDATA *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__IncrementalFileWriter;
- p->_encoding = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_target = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)Py_None); Py_INCREF(Py_None);
- p->_element_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_1__cinit__(o, a, k) < 0)) {
+ if (likely((__pyx_freecount_4lxml_5etree_CDATA > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_CDATA)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree_CDATA[--__pyx_freecount_4lxml_5etree_CDATA];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree_CDATA));
+ (void) PyObject_INIT(o, t);
+ } else {
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree_CDATA *)o);
+ p->_utf8_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_5CDATA_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__IncrementalFileWriter(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p = (struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o;
- PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_22_IncrementalFileWriter_3__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_CLEAR(p->_encoding);
- Py_CLEAR(p->_target);
- Py_CLEAR(p->_element_stack);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__IncrementalFileWriter(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p = (struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o;
- if (p->_target) {
- e = (*v)(((PyObject*)p->_target), a); if (e) return e;
+static void __pyx_tp_dealloc_4lxml_5etree_CDATA(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_CDATA *p = (struct __pyx_obj_4lxml_5etree_CDATA *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
}
- if (p->_element_stack) {
- e = (*v)(p->_element_stack, a); if (e) return e;
+ #endif
+ Py_CLEAR(p->_utf8_data);
+ if ((__pyx_freecount_4lxml_5etree_CDATA < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_CDATA))) {
+ __pyx_freelist_4lxml_5etree_CDATA[__pyx_freecount_4lxml_5etree_CDATA++] = ((struct __pyx_obj_4lxml_5etree_CDATA *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
}
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__IncrementalFileWriter(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p = (struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o;
- Py_CLEAR(p->_target);
- Py_CLEAR(p->_element_stack);
- return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__IncrementalFileWriter[] = {
- {__Pyx_NAMESTR("write_declaration"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_4write_declaration)},
- {__Pyx_NAMESTR("write_doctype"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_7write_doctype, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_6write_doctype)},
- {__Pyx_NAMESTR("element"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_9element, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_8element)},
- {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_10write)},
+static PyMethodDef __pyx_methods_4lxml_5etree_CDATA[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__IncrementalFileWriter = {
+static PyTypeObject __pyx_type_4lxml_5etree_CDATA = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._IncrementalFileWriter"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.CDATA"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_CDATA), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__IncrementalFileWriter, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_CDATA, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__IncrementalFileWriter, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__IncrementalFileWriter, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ __Pyx_DOCSTR("CDATA(data)\n\n CDATA factory. This factory creates an opaque data object that\n can be used to set Element text. The usual way to use it is::\n\n >>> el = Element('content')\n >>> el.text = CDATA('a string')\n\n >>> print(el.text)\n a string\n >>> print(tostring(el, encoding=\"unicode\"))\n <content><![CDATA[a string]]></content>\n "), /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__IncrementalFileWriter, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_CDATA, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__IncrementalFileWriter, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_CDATA, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy __pyx_vtable_4lxml_5etree__ReadOnlyElementProxy;
+static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy __pyx_vtable_4lxml_5etree__ReadOnlyPIProxy;
-static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy *p;
PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyProxy(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy;
+ p = ((struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy;
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_attrib(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_6attrib_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_prefix(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_6prefix_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_16_ReadOnlyPIProxy_target(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_16_ReadOnlyPIProxy_6target_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ReadOnlyElementProxy[] = {
- {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_get)},
- {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_3keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_2keys)},
- {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_5values, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_4values)},
- {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_7items, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_6items)},
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ReadOnlyElementProxy[] = {
- {(char *)"attrib", __pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_attrib, 0, 0, 0},
- {(char *)"prefix", __pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_prefix, 0, __Pyx_DOCSTR(__pyx_k_Namespace_prefix_or_None), 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ReadOnlyPIProxy[] = {
+ {(char *)"target", __pyx_getprop_4lxml_5etree_16_ReadOnlyPIProxy_target, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ReadOnlyElementProxy = {
+static PyTypeObject __pyx_type_4lxml_5etree__ReadOnlyPIProxy = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ReadOnlyElementProxy"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ReadOnlyPIProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy), /*tp_basicsize*/
0, /*tp_itemsize*/
__pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("The main read-only Element proxy class (for internal use only!)."), /*tp_doc*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("A read-only proxy for processing instructions (for internal use only!)"), /*tp_doc*/
__pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
__pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_iter*/
#endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ReadOnlyElementProxy, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ReadOnlyElementProxy, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ReadOnlyPIProxy, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ReadOnlyPIProxy, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_CommentBase __pyx_vtable_4lxml_5etree_CommentBase;
+static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyEntityProxy __pyx_vtable_4lxml_5etree__ReadOnlyEntityProxy;
-static PyObject *__pyx_tp_new_4lxml_5etree_CommentBase(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_CommentBase *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__Comment(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyProxy(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_CommentBase *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree_CommentBase;
+ p = ((struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy;
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_CommentBase[] = {
- {0, 0, 0, 0}
+static PyObject *__pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4name_1__get__(o);
+}
+
+static int __pyx_setprop_4lxml_5etree_20_ReadOnlyEntityProxy_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4name_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
+ }
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_text(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4text_1__get__(o);
+}
+
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ReadOnlyEntityProxy[] = {
+ {(char *)"name", __pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_name, __pyx_setprop_4lxml_5etree_20_ReadOnlyEntityProxy_name, 0, 0},
+ {(char *)"text", __pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_text, 0, 0, 0},
+ {0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_CommentBase = {
+static PyTypeObject __pyx_type_4lxml_5etree__ReadOnlyEntityProxy = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.CommentBase"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_CommentBase), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ReadOnlyEntityProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*reserved*/
#endif
#if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Comment_1__repr__, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
#else
0, /*tp_repr*/
#endif
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("All custom Comment classes must inherit from this one.\n\n To create an XML Comment instance, use the ``Comment()`` factory.\n\n Subclasses *must not* override __init__ or __new__ as it is\n absolutely undefined when these objects will be created or\n destroyed. All persistent state of Comments must be stored in the\n underlying XML. If you really need to initialize the object after\n creation, you can implement an ``_init(self)`` method that will be\n called after object creation.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("A read-only proxy for entity references (for internal use only!)"), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
#if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
#else
0, /*tp_iter*/
#endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_CommentBase, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ReadOnlyEntityProxy, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_11CommentBase_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_CommentBase, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ReadOnlyEntityProxy, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy __pyx_vtable_4lxml_5etree__ReadOnlyElementProxy;
-static struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *__pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[8];
-static int __pyx_freecount_4lxml_5etree__XSLTQuotedStringParam = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTQuotedStringParam(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[--__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam));
- (void) PyObject_INIT(o, t);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *)o);
- p->strval = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_22_XSLTQuotedStringParam_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyProxy(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__XSLTQuotedStringParam(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *p = (struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *)o;
- Py_CLEAR(p->strval);
- if ((__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam))) {
- __pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam++] = ((struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+static PyObject *__pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_attrib(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_6attrib_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__XSLTQuotedStringParam[] = {
+static PyObject *__pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_prefix(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_6prefix_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__ReadOnlyElementProxy[] = {
+ {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_1get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_get)},
+ {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_3keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_2keys)},
+ {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_5values, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_4values)},
+ {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ReadOnlyElementProxy_7items, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21_ReadOnlyElementProxy_6items)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__XSLTQuotedStringParam = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ReadOnlyElementProxy[] = {
+ {(char *)"attrib", __pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_attrib, 0, 0, 0},
+ {(char *)"prefix", __pyx_getprop_4lxml_5etree_21_ReadOnlyElementProxy_prefix, 0, __Pyx_DOCSTR(__pyx_k_Namespace_prefix_or_None), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__ReadOnlyElementProxy = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XSLTQuotedStringParam"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ReadOnlyElementProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__XSLTQuotedStringParam, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
- __Pyx_DOCSTR("A wrapper class for literal XSLT string parameters that require\n quote escaping.\n "), /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("The main read-only Element proxy class (for internal use only!)."), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__XSLTQuotedStringParam, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ReadOnlyElementProxy, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ReadOnlyElementProxy, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XSLTQuotedStringParam, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__BaseContext __pyx_vtable_4lxml_5etree__BaseContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__BaseContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__BaseContext *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__BaseContext *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__BaseContext;
- p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
- p->_extensions = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_namespaces = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_global_namespaces = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_utf_refs = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_function_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_eval_context_dict = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_temp_refs = ((struct __pyx_obj_4lxml_5etree__TempStore *)Py_None); Py_INCREF(Py_None);
- p->_temp_documents = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_exc = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)Py_None); Py_INCREF(Py_None);
- p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_12_BaseContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__BaseContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__BaseContext *p = (struct __pyx_obj_4lxml_5etree__BaseContext *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__OpaqueNodeWrapper(PyObject *o) {
#if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_doc);
- Py_CLEAR(p->_extensions);
- Py_CLEAR(p->_namespaces);
- Py_CLEAR(p->_global_namespaces);
- Py_CLEAR(p->_utf_refs);
- Py_CLEAR(p->_function_cache);
- Py_CLEAR(p->_eval_context_dict);
- Py_CLEAR(p->_temp_refs);
- Py_CLEAR(p->_temp_documents);
- Py_CLEAR(p->_exc);
- Py_CLEAR(p->_error_log);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__BaseContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__BaseContext *p = (struct __pyx_obj_4lxml_5etree__BaseContext *)o;
- if (p->_doc) {
- e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
- }
- if (p->_extensions) {
- e = (*v)(p->_extensions, a); if (e) return e;
- }
- if (p->_namespaces) {
- e = (*v)(p->_namespaces, a); if (e) return e;
- }
- if (p->_global_namespaces) {
- e = (*v)(p->_global_namespaces, a); if (e) return e;
- }
- if (p->_utf_refs) {
- e = (*v)(p->_utf_refs, a); if (e) return e;
- }
- if (p->_function_cache) {
- e = (*v)(p->_function_cache, a); if (e) return e;
- }
- if (p->_eval_context_dict) {
- e = (*v)(p->_eval_context_dict, a); if (e) return e;
- }
- if (p->_temp_refs) {
- e = (*v)(((PyObject*)p->_temp_refs), a); if (e) return e;
- }
- if (p->_temp_documents) {
- e = (*v)(p->_temp_documents, a); if (e) return e;
- }
- if (p->_exc) {
- e = (*v)(((PyObject*)p->_exc), a); if (e) return e;
- }
- if (p->_error_log) {
- e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__BaseContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__BaseContext *p = (struct __pyx_obj_4lxml_5etree__BaseContext *)o;
- Py_CLEAR(p->_doc);
- Py_CLEAR(p->_extensions);
- Py_CLEAR(p->_namespaces);
- Py_CLEAR(p->_global_namespaces);
- Py_CLEAR(p->_utf_refs);
- Py_CLEAR(p->_function_cache);
- Py_CLEAR(p->_eval_context_dict);
- Py_CLEAR(p->_temp_refs);
- Py_CLEAR(p->_temp_documents);
- Py_CLEAR(p->_exc);
- Py_CLEAR(p->_error_log);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_12_BaseContext_context_node(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_12_BaseContext_12context_node_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_12_BaseContext_eval_context(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_12_BaseContext_12eval_context_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__BaseContext[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__OpaqueNodeWrapper[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__BaseContext[] = {
- {(char *)"context_node", __pyx_getprop_4lxml_5etree_12_BaseContext_context_node, 0, 0, 0},
- {(char *)"eval_context", __pyx_getprop_4lxml_5etree_12_BaseContext_eval_context, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__BaseContext = {
+static PyTypeObject __pyx_type_4lxml_5etree__OpaqueNodeWrapper = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._BaseContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__BaseContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._OpaqueNodeWrapper"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__OpaqueNodeWrapper, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseContext, /*tp_clear*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__BaseContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__OpaqueNodeWrapper, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__BaseContext, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_12_BaseContext_3__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_18_OpaqueNodeWrapper_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__BaseContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__XSLTContext __pyx_vtable_4lxml_5etree__XSLTContext;
+static struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper __pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper;
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XSLTContext *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__BaseContext(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueDocumentWrapper(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__XSLTContext *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseContext*)__pyx_vtabptr_4lxml_5etree__XSLTContext;
- p->_extension_element_proxy = ((struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *)Py_None); Py_INCREF(Py_None);
- p->_extension_elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_12_XSLTContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__XSLTContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XSLTContext *p = (struct __pyx_obj_4lxml_5etree__XSLTContext *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_extension_element_proxy);
- Py_CLEAR(p->_extension_elements);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__BaseContext(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__XSLTContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__XSLTContext *p = (struct __pyx_obj_4lxml_5etree__XSLTContext *)o;
- e = __pyx_tp_traverse_4lxml_5etree__BaseContext(o, v, a); if (e) return e;
- if (p->_extension_element_proxy) {
- e = (*v)(((PyObject*)p->_extension_element_proxy), a); if (e) return e;
- }
- if (p->_extension_elements) {
- e = (*v)(p->_extension_elements, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__XSLTContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XSLTContext *p = (struct __pyx_obj_4lxml_5etree__XSLTContext *)o;
- __pyx_tp_clear_4lxml_5etree__BaseContext(o);
- Py_CLEAR(p->_extension_element_proxy);
- Py_CLEAR(p->_extension_elements);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__XSLTContext[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__OpaqueDocumentWrapper[] = {
+ {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4lxml_5etree_22_OpaqueDocumentWrapper_1append, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_OpaqueDocumentWrapper_append)},
+ {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pw_4lxml_5etree_22_OpaqueDocumentWrapper_3extend, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_OpaqueDocumentWrapper_2extend)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__XSLTContext = {
+static PyTypeObject __pyx_type_4lxml_5etree__OpaqueDocumentWrapper = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XSLTContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XSLTContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._OpaqueDocumentWrapper"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__XSLTContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__OpaqueNodeWrapper, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XSLTContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XSLTContext, /*tp_clear*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__XSLTContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__OpaqueDocumentWrapper, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_12_XSLTContext_3__init__, /*tp_init*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_18_OpaqueNodeWrapper_1__init__, /*tp_init*/
+ #else
+ 0, /*tp_init*/
+ #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XSLTContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__OpaqueDocumentWrapper, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy __pyx_vtable_4lxml_5etree__ModifyContentOnlyProxy;
-static struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_freelist_4lxml_5etree__DTDElementDecl[8];
-static int __pyx_freecount_4lxml_5etree__DTDElementDecl = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__DTDElementDecl *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__DTDElementDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementDecl[--__pyx_freecount_4lxml_5etree__DTDElementDecl];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o);
- p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
+static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyProxy(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__DTDElementDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDElementDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_dtd);
- if ((__pyx_freecount_4lxml_5etree__DTDElementDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl))) {
- __pyx_freelist_4lxml_5etree__DTDElementDecl[__pyx_freecount_4lxml_5etree__DTDElementDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+static PyObject *__pyx_getprop_4lxml_5etree_23_ModifyContentOnlyProxy_text(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_23_ModifyContentOnlyProxy_4text_1__get__(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__DTDElementDecl(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__DTDElementDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o;
- if (p->_dtd) {
- e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
+static int __pyx_setprop_4lxml_5etree_23_ModifyContentOnlyProxy_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_23_ModifyContentOnlyProxy_4text_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
}
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__DTDElementDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDElementDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o;
- Py_CLEAR(p->_dtd);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_15_DTDElementDecl_4name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_prefix(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_15_DTDElementDecl_6prefix_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_type(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_15_DTDElementDecl_4type_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_content(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_15_DTDElementDecl_7content_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__DTDElementDecl[] = {
- {__Pyx_NAMESTR("iterattributes"), (PyCFunction)__pyx_pw_4lxml_5etree_15_DTDElementDecl_3iterattributes, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("attributes"), (PyCFunction)__pyx_pw_4lxml_5etree_15_DTDElementDecl_6attributes, METH_NOARGS, __Pyx_DOCSTR(0)},
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDElementDecl[] = {
- {(char *)"name", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_name, 0, 0, 0},
- {(char *)"prefix", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_prefix, 0, 0, 0},
- {(char *)"type", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_type, 0, 0, 0},
- {(char *)"content", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_content, 0, 0, 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ModifyContentOnlyProxy[] = {
+ {(char *)"text", __pyx_getprop_4lxml_5etree_23_ModifyContentOnlyProxy_text, __pyx_setprop_4lxml_5etree_23_ModifyContentOnlyProxy_text, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__DTDElementDecl = {
+static PyTypeObject __pyx_type_4lxml_5etree__ModifyContentOnlyProxy = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._DTDElementDecl"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ModifyContentOnlyProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__DTDElementDecl, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_15_DTDElementDecl_1__repr__, /*tp_repr*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__DTDElementDecl, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__DTDElementDecl, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("A read-only proxy that allows changing the text content.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__DTDElementDecl, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__DTDElementDecl, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ModifyContentOnlyProxy, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__DTDElementDecl, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension __pyx_vtable_4lxml_5etree_XSLTExtension;
+static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy __pyx_vtable_4lxml_5etree__ModifyContentOnlyPIProxy;
-static PyObject *__pyx_tp_new_4lxml_5etree_XSLTExtension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XSLTExtension *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XSLTExtension *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_XSLTExtension;
+ p = ((struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_XSLTExtension(PyObject *o) {
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
+static PyObject *__pyx_getprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_1__get__(o);
+}
+
+static int __pyx_setprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
}
- #endif
- (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XSLTExtension[] = {
- {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_1execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13XSLTExtension_execute)},
- {__Pyx_NAMESTR("apply_templates"), (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13XSLTExtension_2apply_templates)},
- {__Pyx_NAMESTR("process_children"), (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13XSLTExtension_4process_children)},
- {0, 0, 0, 0}
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ModifyContentOnlyPIProxy[] = {
+ {(char *)"target", __pyx_getprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target, __pyx_setprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target, 0, 0},
+ {0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_XSLTExtension = {
+static PyTypeObject __pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XSLTExtension"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XSLTExtension), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ModifyContentOnlyPIProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XSLTExtension, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("Base class of an XSLT extension element.\n "), /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("A read-only proxy that allows changing the text/target content of a\n processing instruction.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XSLTExtension, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ModifyContentOnlyPIProxy, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XSLTExtension, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ModifyContentOnlyPIProxy, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext __pyx_vtable_4lxml_5etree__ExceptionContext;
+static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyEntityProxy __pyx_vtable_4lxml_5etree__ModifyContentOnlyEntityProxy;
-static PyObject *__pyx_tp_new_4lxml_5etree__ExceptionContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ExceptionContext *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ExceptionContext;
- p->_exc_info = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ExceptionContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ExceptionContext *p = (struct __pyx_obj_4lxml_5etree__ExceptionContext *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_exc_info);
- (*Py_TYPE(o)->tp_free)(o);
+static PyObject *__pyx_getprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_1__get__(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__ExceptionContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__ExceptionContext *p = (struct __pyx_obj_4lxml_5etree__ExceptionContext *)o;
- if (p->_exc_info) {
- e = (*v)(p->_exc_info, a); if (e) return e;
+static int __pyx_setprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_3__set__(o, v);
+ }
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
}
- return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__ExceptionContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ExceptionContext *p = (struct __pyx_obj_4lxml_5etree__ExceptionContext *)o;
- Py_CLEAR(p->_exc_info);
- return 0;
-}
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ModifyContentOnlyEntityProxy[] = {
+ {(char *)"name", __pyx_getprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name, __pyx_setprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name, 0, 0},
+ {0, 0, 0, 0, 0}
+};
-static PyTypeObject __pyx_type_4lxml_5etree__ExceptionContext = {
+static PyTypeObject __pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ExceptionContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ExceptionContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ModifyContentOnlyEntityProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ExceptionContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ExceptionContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ExceptionContext, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("A read-only proxy for entity references (for internal use only!)"), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
0, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ModifyContentOnlyEntityProxy, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ExceptionContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ModifyContentOnlyEntityProxy, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ResolverContext __pyx_vtable_4lxml_5etree__ResolverContext;
+static struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy __pyx_vtable_4lxml_5etree__AppendOnlyElementProxy;
-static PyObject *__pyx_tp_new_4lxml_5etree__ResolverContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ResolverContext *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ExceptionContext(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__AppendOnlyElementProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ResolverContext *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__ResolverContext;
- p->_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)Py_None); Py_INCREF(Py_None);
- p->_storage = ((struct __pyx_obj_4lxml_5etree__TempStore *)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ResolverContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ResolverContext *p = (struct __pyx_obj_4lxml_5etree__ResolverContext *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_resolvers);
- Py_CLEAR(p->_storage);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__ExceptionContext(o);
+static PyObject *__pyx_getprop_4lxml_5etree_23_AppendOnlyElementProxy_text(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_4text_1__get__(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__ResolverContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__ResolverContext *p = (struct __pyx_obj_4lxml_5etree__ResolverContext *)o;
- e = __pyx_tp_traverse_4lxml_5etree__ExceptionContext(o, v, a); if (e) return e;
- if (p->_resolvers) {
- e = (*v)(((PyObject*)p->_resolvers), a); if (e) return e;
+static int __pyx_setprop_4lxml_5etree_23_AppendOnlyElementProxy_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_4text_3__set__(o, v);
}
- if (p->_storage) {
- e = (*v)(((PyObject*)p->_storage), a); if (e) return e;
+ else {
+ PyErr_SetString(PyExc_NotImplementedError, "__del__");
+ return -1;
}
- return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__ResolverContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ResolverContext *p = (struct __pyx_obj_4lxml_5etree__ResolverContext *)o;
- __pyx_tp_clear_4lxml_5etree__ExceptionContext(o);
- Py_CLEAR(p->_resolvers);
- Py_CLEAR(p->_storage);
- return 0;
+static PyMethodDef __pyx_methods_4lxml_5etree__AppendOnlyElementProxy[] = {
+ {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_1append, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_23_AppendOnlyElementProxy_append)},
+ {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_3extend, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_23_AppendOnlyElementProxy_2extend)},
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__AppendOnlyElementProxy[] = {
+ {(char *)"text", __pyx_getprop_4lxml_5etree_23_AppendOnlyElementProxy_text, __pyx_setprop_4lxml_5etree_23_AppendOnlyElementProxy_text, __Pyx_DOCSTR(__pyx_k_Text_before_the_first_subelement_2), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__AppendOnlyElementProxy = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("lxml.etree._AppendOnlyElementProxy"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("A read-only element that allows adding children and changing the\n text content (i.e. everything that adds to the subtree).\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
+ #else
+ 0, /*tp_iter*/
+ #endif
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree__AppendOnlyElementProxy, /*tp_methods*/
+ 0, /*tp_members*/
+ __pyx_getsets_4lxml_5etree__AppendOnlyElementProxy, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_4lxml_5etree__AppendOnlyElementProxy, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementBase(PyTypeObject *t, PyObject *a, PyObject *k) {
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Element(t, a, k);
+ if (unlikely(!o)) return 0;
+ return o;
}
-static PyTypeObject __pyx_type_4lxml_5etree__ResolverContext = {
+static PyMethodDef __pyx_methods_4lxml_5etree_ElementBase[] = {
+ {0, 0, 0, 0}
+};
+
+DL_EXPORT(PyTypeObject) LxmlElementBaseType = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ResolverContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ResolverContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ElementBase"), /*tp_name*/
+ sizeof(struct LxmlElementBase), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ResolverContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_31__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ResolverContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ResolverContext, /*tp_clear*/
+ __Pyx_DOCSTR("ElementBase(*children, attrib=None, nsmap=None, **_extra)\n\n The public Element class. All custom Element classes must inherit\n from this one. To create an Element, use the `Element()` factory.\n\n BIG FAT WARNING: Subclasses *must not* override __init__ or\n __new__ as it is absolutely undefined when these objects will be\n created or destroyed. All persistent state of Elements must be\n stored in the underlying XML. If you really need to initialize\n the object after creation, you can implement an ``_init(self)``\n method that will be called directly after object creation.\n\n Subclasses of this class can be instantiated to create a new\n Element. By default, the tag name will be the class name and the\n namespace will be empty. You can modify this with the following\n class attributes:\n\n * TAG - the tag name, possibly containing a namespace in Clark\n notation\n\n * NAMESPACE - the default namespace URI, unless provided as part\n of the TAG attribute.\n\n * HTML - flag if the class is an HTML tag, as opposed to an XML\n tag. This only applies to un-namespaced tags and defaults to\n false (i.e. XML).\n\n * PARSER - the parser that provides the configuration for the\n newly created document. Providing an HTML parser here will\n default to creating an HTML element.\n\n In user code, the latter three are commonly inherited in class\n hierarchies that implement a common namespace.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_ElementBase, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_11ElementBase_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ResolverContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ElementBase, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ParserContext __pyx_vtable_4lxml_5etree__ParserContext;
+static struct __pyx_vtabstruct_4lxml_5etree_CommentBase __pyx_vtable_4lxml_5etree_CommentBase;
-static PyObject *__pyx_tp_new_4lxml_5etree__ParserContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ParserContext *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ResolverContext(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_CommentBase(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_CommentBase *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Comment(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ParserContext *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__ParserContext;
- p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
- p->_validator = ((struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)Py_None); Py_INCREF(Py_None);
- p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_14_ParserContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree_CommentBase *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree_CommentBase;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ParserContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParserContext *p = (struct __pyx_obj_4lxml_5etree__ParserContext *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_14_ParserContext_3__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_CLEAR(p->_error_log);
- Py_CLEAR(p->_validator);
- Py_CLEAR(p->_doc);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__ResolverContext(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ParserContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__ParserContext *p = (struct __pyx_obj_4lxml_5etree__ParserContext *)o;
- e = __pyx_tp_traverse_4lxml_5etree__ResolverContext(o, v, a); if (e) return e;
- if (p->_error_log) {
- e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
- }
- if (p->_validator) {
- e = (*v)(((PyObject*)p->_validator), a); if (e) return e;
- }
- if (p->_doc) {
- e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ParserContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParserContext *p = (struct __pyx_obj_4lxml_5etree__ParserContext *)o;
- __pyx_tp_clear_4lxml_5etree__ResolverContext(o);
- Py_CLEAR(p->_error_log);
- Py_CLEAR(p->_validator);
- Py_CLEAR(p->_doc);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__ParserContext[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_CommentBase[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ParserContext = {
+static PyTypeObject __pyx_type_4lxml_5etree_CommentBase = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ParserContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ParserContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.CommentBase"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_CommentBase), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ParserContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Comment_1__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ParserContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ParserContext, /*tp_clear*/
+ __Pyx_DOCSTR("All custom Comment classes must inherit from this one.\n\n To create an XML Comment instance, use the ``Comment()`` factory.\n\n Subclasses *must not* override __init__ or __new__ as it is\n absolutely undefined when these objects will be created or\n destroyed. All persistent state of Comments must be stored in the\n underlying XML. If you really need to initialize the object after\n creation, you can implement an ``_init(self)`` method that will be\n called after object creation.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ParserContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_CommentBase, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_11CommentBase_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ParserContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_CommentBase, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext __pyx_vtable_4lxml_5etree__SaxParserContext;
+static struct __pyx_vtabstruct_4lxml_5etree_PIBase __pyx_vtable_4lxml_5etree_PIBase;
-static PyObject *__pyx_tp_new_4lxml_5etree__SaxParserContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__SaxParserContext *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ParserContext(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_PIBase(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_PIBase *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ProcessingInstruction(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__SaxParserContext;
- p->_target = ((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)Py_None); Py_INCREF(Py_None);
- p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
- p->_ns_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_node_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->events_iterator = ((struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)Py_None); Py_INCREF(Py_None);
- p->_root = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
- p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_17_SaxParserContext_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree_PIBase *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree_PIBase;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__SaxParserContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__SaxParserContext *p = (struct __pyx_obj_4lxml_5etree__SaxParserContext *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_target);
- Py_CLEAR(p->_parser);
- Py_CLEAR(p->_ns_stack);
- Py_CLEAR(p->_node_stack);
- Py_CLEAR(p->events_iterator);
- Py_CLEAR(p->_root);
- Py_CLEAR(p->_matcher);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__ParserContext(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__SaxParserContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__SaxParserContext *p = (struct __pyx_obj_4lxml_5etree__SaxParserContext *)o;
- e = __pyx_tp_traverse_4lxml_5etree__ParserContext(o, v, a); if (e) return e;
- if (p->_target) {
- e = (*v)(((PyObject*)p->_target), a); if (e) return e;
- }
- if (p->_parser) {
- e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
- }
- if (p->_ns_stack) {
- e = (*v)(p->_ns_stack, a); if (e) return e;
- }
- if (p->_node_stack) {
- e = (*v)(p->_node_stack, a); if (e) return e;
- }
- if (p->events_iterator) {
- e = (*v)(((PyObject*)p->events_iterator), a); if (e) return e;
- }
- if (p->_root) {
- e = (*v)(((PyObject*)p->_root), a); if (e) return e;
- }
- if (p->_matcher) {
- e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__SaxParserContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__SaxParserContext *p = (struct __pyx_obj_4lxml_5etree__SaxParserContext *)o;
- __pyx_tp_clear_4lxml_5etree__ParserContext(o);
- Py_CLEAR(p->_target);
- Py_CLEAR(p->_parser);
- Py_CLEAR(p->_ns_stack);
- Py_CLEAR(p->_node_stack);
- Py_CLEAR(p->events_iterator);
- Py_CLEAR(p->_root);
- Py_CLEAR(p->_matcher);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__SaxParserContext[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_PIBase[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__SaxParserContext = {
+static PyTypeObject __pyx_type_4lxml_5etree_PIBase = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._SaxParserContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__SaxParserContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.PIBase"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_PIBase), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__SaxParserContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_22_ProcessingInstruction_1__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("This class maps SAX2 events to parser target events.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__SaxParserContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__SaxParserContext, /*tp_clear*/
+ __Pyx_DOCSTR("All custom Processing Instruction classes must inherit from this one.\n\n To create an XML ProcessingInstruction instance, use the ``PI()``\n factory.\n\n Subclasses *must not* override __init__ or __new__ as it is\n absolutely undefined when these objects will be created or\n destroyed. All persistent state of PIs must be stored in the\n underlying XML. If you really need to initialize the object after\n creation, you can implement an ``_init(self)`` method that will be\n called after object creation.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__SaxParserContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_PIBase, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_6PIBase_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__SaxParserContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_PIBase, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext __pyx_vtable_4lxml_5etree__TargetParserContext;
+static struct __pyx_vtabstruct_4lxml_5etree_EntityBase __pyx_vtable_4lxml_5etree_EntityBase;
-static PyObject *__pyx_tp_new_4lxml_5etree__TargetParserContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__TargetParserContext *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__SaxParserContext(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_EntityBase(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_EntityBase *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Entity(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__TargetParserContext *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__TargetParserContext;
- p->_python_target = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree_EntityBase *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree_EntityBase;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__TargetParserContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__TargetParserContext *p = (struct __pyx_obj_4lxml_5etree__TargetParserContext *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_python_target);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__SaxParserContext(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__TargetParserContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__TargetParserContext *p = (struct __pyx_obj_4lxml_5etree__TargetParserContext *)o;
- e = __pyx_tp_traverse_4lxml_5etree__SaxParserContext(o, v, a); if (e) return e;
- if (p->_python_target) {
- e = (*v)(p->_python_target, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__TargetParserContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__TargetParserContext *p = (struct __pyx_obj_4lxml_5etree__TargetParserContext *)o;
- __pyx_tp_clear_4lxml_5etree__SaxParserContext(o);
- Py_CLEAR(p->_python_target);
- return 0;
-}
+static PyMethodDef __pyx_methods_4lxml_5etree_EntityBase[] = {
+ {0, 0, 0, 0}
+};
-static PyTypeObject __pyx_type_4lxml_5etree__TargetParserContext = {
+static PyTypeObject __pyx_type_4lxml_5etree_EntityBase = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._TargetParserContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__TargetParserContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.EntityBase"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_EntityBase), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__TargetParserContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_7_Entity_1__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("This class maps SAX2 events to the ET parser target interface.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__TargetParserContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__TargetParserContext, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("All custom Entity classes must inherit from this one.\n\n To create an XML Entity instance, use the ``Entity()`` factory.\n\n Subclasses *must not* override __init__ or __new__ as it is\n absolutely undefined when these objects will be created or\n destroyed. All persistent state of Entities must be stored in the\n underlying XML. If you really need to initialize the object after\n creation, you can implement an ``_init(self)`` method that will be\n called after object creation.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_EntityBase, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_10EntityBase_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__TargetParserContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_EntityBase, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
#endif
};
-static PyObject *__pyx_tp_new_4lxml_5etree_Resolver(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementClassLookup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_4lxml_5etree_18ElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_Resolver(PyObject *o) {
+static void __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup(PyObject *o) {
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
(*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_Resolver[] = {
- {__Pyx_NAMESTR("resolve"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_1resolve, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_resolve)},
- {__Pyx_NAMESTR("resolve_empty"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_3resolve_empty, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_2resolve_empty)},
- {__Pyx_NAMESTR("resolve_string"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_5resolve_string, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_4resolve_string)},
- {__Pyx_NAMESTR("resolve_filename"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_6resolve_filename)},
- {__Pyx_NAMESTR("resolve_file"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_9resolve_file, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_8resolve_file)},
+static PyMethodDef __pyx_methods_4lxml_5etree_ElementClassLookup[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_Resolver = {
+DL_EXPORT(PyTypeObject) LxmlElementClassLookupType = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.Resolver"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_Resolver), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ElementClassLookup"), /*tp_name*/
+ sizeof(struct LxmlElementClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_Resolver, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("This is the base class of all resolvers."), /*tp_doc*/
+ __Pyx_DOCSTR("ElementClassLookup(self)\n Superclass of Element class lookups.\n "), /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_Resolver, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_ElementClassLookup, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_Resolver, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ElementClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__XPathContext __pyx_vtable_4lxml_5etree__XPathContext;
+static struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup __pyx_vtable_4lxml_5etree_FallbackElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree__XPathContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XPathContext *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__BaseContext(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct LxmlFallbackElementClassLookup *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_ElementClassLookup(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__XPathContext *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseContext*)__pyx_vtabptr_4lxml_5etree__XPathContext;
- p->_variables = Py_None; Py_INCREF(Py_None);
+ p = ((struct LxmlFallbackElementClassLookup *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
+ p->fallback = ((struct LxmlElementClassLookup *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_26FallbackElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__XPathContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XPathContext *p = (struct __pyx_obj_4lxml_5etree__XPathContext *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup(PyObject *o) {
+ struct LxmlFallbackElementClassLookup *p = (struct LxmlFallbackElementClassLookup *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_variables);
+ Py_CLEAR(p->fallback);
+ #if CYTHON_COMPILING_IN_CPYTHON
+ if (PyType_IS_GC(Py_TYPE(o)->tp_base))
+ #endif
PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__BaseContext(o);
+ __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__XPathContext(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__XPathContext *p = (struct __pyx_obj_4lxml_5etree__XPathContext *)o;
- e = __pyx_tp_traverse_4lxml_5etree__BaseContext(o, v, a); if (e) return e;
- if (p->_variables) {
- e = (*v)(p->_variables, a); if (e) return e;
+ struct LxmlFallbackElementClassLookup *p = (struct LxmlFallbackElementClassLookup *)o;
+ e = ((likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) ? ((__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse) ? __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup)); if (e) return e;
+ if (p->fallback) {
+ e = (*v)(((PyObject*)p->fallback), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__XPathContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XPathContext *p = (struct __pyx_obj_4lxml_5etree__XPathContext *)o;
- __pyx_tp_clear_4lxml_5etree__BaseContext(o);
- Py_CLEAR(p->_variables);
+static int __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup(PyObject *o) {
+ struct LxmlFallbackElementClassLookup *p = (struct LxmlFallbackElementClassLookup *)o;
+ if (likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) { if (__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear) __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup);
+ Py_CLEAR(p->fallback);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__XPathContext[] = {
+static PyObject *__pyx_getprop_4lxml_5etree_26FallbackElementClassLookup_fallback(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_8fallback_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_FallbackElementClassLookup[] = {
+ {__Pyx_NAMESTR("set_fallback"), (PyCFunction)__pyx_pw_4lxml_5etree_26FallbackElementClassLookup_5set_fallback, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_26FallbackElementClassLookup_4set_fallback)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__XPathContext = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_FallbackElementClassLookup[] = {
+ {(char *)"fallback", __pyx_getprop_4lxml_5etree_26FallbackElementClassLookup_fallback, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+DL_EXPORT(PyTypeObject) LxmlFallbackElementClassLookupType = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XPathContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XPathContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.FallbackElementClassLookup"), /*tp_name*/
+ sizeof(struct LxmlFallbackElementClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__XPathContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XPathContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XPathContext, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("FallbackElementClassLookup(self, fallback=None)\n\n Superclass of Element class lookups with additional fallback.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__XPathContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_FallbackElementClassLookup, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_FallbackElementClassLookup, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_13_XPathContext_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XPathContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
#endif
};
-static PyObject *__pyx_tp_new_4lxml_5etree__ParseEventsIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementDefaultClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_ElementClassLookup(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o);
- p->_events = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_20_ParseEventsIterator_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o);
+ p->element_class = Py_None; Py_INCREF(Py_None);
+ p->comment_class = Py_None; Py_INCREF(Py_None);
+ p->pi_class = Py_None; Py_INCREF(Py_None);
+ p->entity_class = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ParseEventsIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p = (struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_ElementDefaultClassLookup(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_events);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->element_class);
+ Py_CLEAR(p->comment_class);
+ Py_CLEAR(p->pi_class);
+ Py_CLEAR(p->entity_class);
+ #if CYTHON_COMPILING_IN_CPYTHON
+ if (PyType_IS_GC(Py_TYPE(o)->tp_base))
+ #endif
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__ParseEventsIterator(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_ElementDefaultClassLookup(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p = (struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o;
- if (p->_events) {
- e = (*v)(p->_events, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o;
+ e = ((likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) ? ((__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse) ? __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree_ElementDefaultClassLookup)); if (e) return e;
+ if (p->element_class) {
+ e = (*v)(p->element_class, a); if (e) return e;
+ }
+ if (p->comment_class) {
+ e = (*v)(p->comment_class, a); if (e) return e;
+ }
+ if (p->pi_class) {
+ e = (*v)(p->pi_class, a); if (e) return e;
+ }
+ if (p->entity_class) {
+ e = (*v)(p->entity_class, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__ParseEventsIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p = (struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o;
- Py_CLEAR(p->_events);
+static int __pyx_tp_clear_4lxml_5etree_ElementDefaultClassLookup(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o;
+ if (likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) { if (__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear) __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree_ElementDefaultClassLookup);
+ Py_CLEAR(p->element_class);
+ Py_CLEAR(p->comment_class);
+ Py_CLEAR(p->pi_class);
+ Py_CLEAR(p->entity_class);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ParseEventsIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_element_class(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_13element_class_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_comment_class(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_13comment_class_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_pi_class(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_8pi_class_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_entity_class(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_12entity_class_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_ElementDefaultClassLookup[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ParseEventsIterator = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_ElementDefaultClassLookup[] = {
+ {(char *)"element_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_element_class, 0, 0, 0},
+ {(char *)"comment_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_comment_class, 0, 0, 0},
+ {(char *)"pi_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_pi_class, 0, 0, 0},
+ {(char *)"entity_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_entity_class, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_ElementDefaultClassLookup = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ParseEventsIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ParseEventsIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ElementDefaultClassLookup"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ParseEventsIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_ElementDefaultClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A reusable parse events iterator"), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ParseEventsIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ParseEventsIterator, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("ElementDefaultClassLookup(self, element=None, comment=None, pi=None, entity=None)\n Element class lookup scheme that always returns the default Element\n class.\n\n The keyword arguments ``element``, ``comment``, ``pi`` and ``entity``\n accept the respective Element classes.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_ElementDefaultClassLookup, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_ElementDefaultClassLookup, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_20_ParseEventsIterator_3__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ParseEventsIterator, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_ElementDefaultClassLookup, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_ElementDefaultClassLookup, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ParseEventsIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ElementDefaultClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__Entity __pyx_vtable_4lxml_5etree__Entity;
+static struct __pyx_vtabstruct_4lxml_5etree_AttributeBasedElementClassLookup __pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree__Entity(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__Entity *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree___ContentOnlyElement(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_AttributeBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__Entity *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__Entity;
+ p = ((struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup;
+ p->_class_mapping = Py_None; Py_INCREF(Py_None);
+ p->_pytag = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_32AttributeBasedElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_7_Entity_tag(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7_Entity_3tag_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7_Entity_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7_Entity_4name_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree_AttributeBasedElementClassLookup(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p = (struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_class_mapping);
+ Py_CLEAR(p->_pytag);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup(o);
}
-static int __pyx_setprop_4lxml_5etree_7_Entity_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_7_Entity_4name_3__set__(o, v);
+static int __pyx_tp_traverse_4lxml_5etree_AttributeBasedElementClassLookup(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p = (struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o;
+ e = __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup(o, v, a); if (e) return e;
+ if (p->_class_mapping) {
+ e = (*v)(p->_class_mapping, a); if (e) return e;
}
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
+ if (p->_pytag) {
+ e = (*v)(p->_pytag, a); if (e) return e;
}
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_7_Entity_text(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7_Entity_4text_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree_AttributeBasedElementClassLookup(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p = (struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o;
+ __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup(o);
+ Py_CLEAR(p->_class_mapping);
+ Py_CLEAR(p->_pytag);
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__Entity[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_AttributeBasedElementClassLookup[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__Entity[] = {
- {(char *)"tag", __pyx_getprop_4lxml_5etree_7_Entity_tag, 0, 0, 0},
- {(char *)"name", __pyx_getprop_4lxml_5etree_7_Entity_name, __pyx_setprop_4lxml_5etree_7_Entity_name, 0, 0},
- {(char *)"text", __pyx_getprop_4lxml_5etree_7_Entity_text, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__Entity = {
+static PyTypeObject __pyx_type_4lxml_5etree_AttributeBasedElementClassLookup = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._Entity"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__Entity), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.AttributeBasedElementClassLookup"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_7_Entity_1__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
+ __Pyx_DOCSTR("AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None)\n Checks an attribute of an Element and looks up the value in a\n class dictionary.\n\n Arguments:\n - attribute name - '{ns}name' style string\n - class mapping - Python dict mapping attribute values to Element classes\n - fallback - optional fallback lookup mechanism\n\n A None key in the class mapping will be checked if the attribute is\n missing.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__Entity, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__Entity, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_32AttributeBasedElementClassLookup_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__Entity, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_EntityBase __pyx_vtable_4lxml_5etree_EntityBase;
+static struct __pyx_vtabstruct_4lxml_5etree_ParserBasedElementClassLookup __pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree_EntityBase(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_EntityBase *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__Entity(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_ParserBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_EntityBase *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree_EntityBase;
+ p = ((struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup;
+ if (unlikely(__pyx_pw_4lxml_5etree_29ParserBasedElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_EntityBase[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_ParserBasedElementClassLookup[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_EntityBase = {
+static PyTypeObject __pyx_type_4lxml_5etree_ParserBasedElementClassLookup = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.EntityBase"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_EntityBase), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ParserBasedElementClassLookup"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_7_Entity_1__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("All custom Entity classes must inherit from this one.\n\n To create an XML Entity instance, use the ``Entity()`` factory.\n\n Subclasses *must not* override __init__ or __new__ as it is\n absolutely undefined when these objects will be created or\n destroyed. All persistent state of Entities must be stored in the\n underlying XML. If you really need to initialize the object after\n creation, you can implement an ``_init(self)`` method that will be\n called after object creation.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
+ __Pyx_DOCSTR("ParserBasedElementClassLookup(self, fallback=None)\n Element class lookup based on the XML parser.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_EntityBase, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_ParserBasedElementClassLookup, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_10EntityBase_1__init__, /*tp_init*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
+ #else
+ 0, /*tp_init*/
+ #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_EntityBase, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ParserBasedElementClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__Document __pyx_vtable_4lxml_5etree__Document;
-
-static struct LxmlDocument *__pyx_freelist_4lxml_5etree__Document[8];
-static int __pyx_freecount_4lxml_5etree__Document = 0;
+static struct __pyx_vtabstruct_4lxml_5etree_CustomElementClassLookup __pyx_vtable_4lxml_5etree_CustomElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree__Document(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct LxmlDocument *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__Document > 0) & (t->tp_basicsize == sizeof(struct LxmlDocument)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__Document[--__pyx_freecount_4lxml_5etree__Document];
- memset(o, 0, sizeof(struct LxmlDocument));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+static PyObject *__pyx_tp_new_4lxml_5etree_CustomElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_CustomElementClassLookup *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_CustomElementClassLookup *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_CustomElementClassLookup;
+ if (unlikely(__pyx_pw_4lxml_5etree_24CustomElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct LxmlDocument *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__Document;
- p->_prefix_tail = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__Document(PyObject *o) {
- struct LxmlDocument *p = (struct LxmlDocument *)o;
- PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_9_Document_1__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_CLEAR(p->_prefix_tail);
- Py_CLEAR(p->_parser);
- if ((__pyx_freecount_4lxml_5etree__Document < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct LxmlDocument))) {
- __pyx_freelist_4lxml_5etree__Document[__pyx_freecount_4lxml_5etree__Document++] = ((struct LxmlDocument *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__Document(PyObject *o, visitproc v, void *a) {
- int e;
- struct LxmlDocument *p = (struct LxmlDocument *)o;
- if (p->_parser) {
- e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__Document(PyObject *o) {
- struct LxmlDocument *p = (struct LxmlDocument *)o;
- Py_CLEAR(p->_parser);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__Document[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_CustomElementClassLookup[] = {
+ {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_4lxml_5etree_24CustomElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_24CustomElementClassLookup_2lookup)},
{0, 0, 0, 0}
};
-DL_EXPORT(PyTypeObject) LxmlDocumentType = {
+static PyTypeObject __pyx_type_4lxml_5etree_CustomElementClassLookup = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._Document"), /*tp_name*/
- sizeof(struct LxmlDocument), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.CustomElementClassLookup"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_CustomElementClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Document, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Internal base class to reference a libxml document.\n\n When instances of this class are garbage collected, the libxml\n document is cleaned up.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Document, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__Document, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("CustomElementClassLookup(self, fallback=None)\n Element class lookup based on a subclass method.\n\n You can inherit from this class and override the method::\n\n lookup(self, type, doc, namespace, name)\n\n to lookup the element class for a node. Arguments of the method:\n * type: one of 'element', 'comment', 'PI', 'entity'\n * doc: document that the node is in\n * namespace: namespace URI of the node (or None for comments/PIs/entities)\n * name: name of the element/entity, None for comments, target for PIs\n\n If you return None from this method, the fallback will be called.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__Document, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_CustomElementClassLookup, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
+ #else
0, /*tp_init*/
+ #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__Document, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_CustomElementClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_PythonElementClassLookup __pyx_vtable_4lxml_5etree_PythonElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree__InputDocument(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__InputDocument *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree_PythonElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_PythonElementClassLookup *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__InputDocument *)o);
- p->_data_bytes = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_filename = Py_None; Py_INCREF(Py_None);
- p->_file = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_14_InputDocument_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_PythonElementClassLookup *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_PythonElementClassLookup;
+ if (unlikely(__pyx_pw_4lxml_5etree_24PythonElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__InputDocument(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__InputDocument *p = (struct __pyx_obj_4lxml_5etree__InputDocument *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_data_bytes);
- Py_CLEAR(p->_filename);
- Py_CLEAR(p->_file);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__InputDocument(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__InputDocument *p = (struct __pyx_obj_4lxml_5etree__InputDocument *)o;
- if (p->_filename) {
- e = (*v)(p->_filename, a); if (e) return e;
- }
- if (p->_file) {
- e = (*v)(p->_file, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__InputDocument(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__InputDocument *p = (struct __pyx_obj_4lxml_5etree__InputDocument *)o;
- Py_CLEAR(p->_filename);
- Py_CLEAR(p->_file);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__InputDocument[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_PythonElementClassLookup[] = {
+ {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_24PythonElementClassLookup_2lookup)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__InputDocument = {
+static PyTypeObject __pyx_type_4lxml_5etree_PythonElementClassLookup = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._InputDocument"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__InputDocument), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.PythonElementClassLookup"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_PythonElementClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__InputDocument, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__InputDocument, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__InputDocument, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("PythonElementClassLookup(self, fallback=None)\n Element class lookup based on a subclass method.\n\n This class lookup scheme allows access to the entire XML tree in\n read-only mode. To use it, re-implement the ``lookup(self, doc,\n root)`` method in a subclass::\n\n from lxml import etree, pyclasslookup\n\n class MyElementClass(etree.ElementBase):\n honkey = True\n\n class MyLookup(pyclasslookup.PythonElementClassLookup):\n def lookup(self, doc, root):\n if root.tag == \"sometag\":\n return MyElementClass\n else:\n for child in root:\n if child.tag == \"someothertag\":\n return MyElementClass\n # delegate to default\n return None\n\n If you return None from this method, the fallback will be called.\n\n The first argument is the opaque document instance that contains\n the Element. The second argument is a lightweight Element proxy\n implementation that is only valid during the lookup. Do not try\n to keep a reference to it. Once the lookup is done, the proxy\n will be invalid.\n\n Also, you cannot wrap such a read-only Element in an ElementTree,\n and you must take care not to keep a reference to them outside of\n the `lookup()` method.\n\n Note that the API of the Element objects is not complete. It is\n purely read-only and does not support all features of the normal\n `lxml.etree` API (such as XPath, extended slicing or some\n iteration methods).\n\n See http://codespeak.net/lxml/element_classes.html\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__InputDocument, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_PythonElementClassLookup, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
+ #else
0, /*tp_init*/
+ #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__InputDocument, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_PythonElementClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementTree __pyx_vtable_4lxml_5etree__ElementTree;
-
-static struct LxmlElementTree *__pyx_freelist_4lxml_5etree__ElementTree[8];
-static int __pyx_freecount_4lxml_5etree__ElementTree = 0;
+static struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry __pyx_vtable_4lxml_5etree__NamespaceRegistry;
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementTree(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct LxmlElementTree *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__NamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p;
PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__ElementTree > 0) & (t->tp_basicsize == sizeof(struct LxmlElementTree)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__ElementTree[--__pyx_freecount_4lxml_5etree__ElementTree];
- memset(o, 0, sizeof(struct LxmlElementTree));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
} else {
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__NamespaceRegistry;
+ p->_ns_uri = Py_None; Py_INCREF(Py_None);
+ p->_ns_uri_utf = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_entries = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_18_NamespaceRegistry_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct LxmlElementTree *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ElementTree;
- p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
- p->_context_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ElementTree(PyObject *o) {
- struct LxmlElementTree *p = (struct LxmlElementTree *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_doc);
- Py_CLEAR(p->_context_node);
- if ((__pyx_freecount_4lxml_5etree__ElementTree < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct LxmlElementTree))) {
- __pyx_freelist_4lxml_5etree__ElementTree[__pyx_freecount_4lxml_5etree__ElementTree++] = ((struct LxmlElementTree *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ElementTree(PyObject *o, visitproc v, void *a) {
- int e;
- struct LxmlElementTree *p = (struct LxmlElementTree *)o;
- if (p->_doc) {
- e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
- }
- if (p->_context_node) {
- e = (*v)(((PyObject*)p->_context_node), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ElementTree(PyObject *o) {
- struct LxmlElementTree *p = (struct LxmlElementTree *)o;
- Py_CLEAR(p->_doc);
- Py_CLEAR(p->_context_node);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_12_ElementTree_docinfo(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_12_ElementTree_7docinfo_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_12_ElementTree_parser(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_12_ElementTree_6parser_1__get__(o);
+ Py_CLEAR(p->_ns_uri);
+ Py_CLEAR(p->_ns_uri_utf);
+ Py_CLEAR(p->_entries);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ElementTree[] = {
- {__Pyx_NAMESTR("parse"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_1parse, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_parse)},
- {__Pyx_NAMESTR("_setroot"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_3_setroot, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_2_setroot)},
- {__Pyx_NAMESTR("getroot"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_5getroot, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_4getroot)},
- {__Pyx_NAMESTR("__copy__"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_7__copy__, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("__deepcopy__"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_9__deepcopy__, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_11write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_10write)},
- {__Pyx_NAMESTR("getpath"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_13getpath, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_12getpath)},
- {__Pyx_NAMESTR("getiterator"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_15getiterator, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_14getiterator)},
- {__Pyx_NAMESTR("iter"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_17iter, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_16iter)},
- {__Pyx_NAMESTR("find"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_19find, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_18find)},
- {__Pyx_NAMESTR("findtext"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_21findtext, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_20findtext)},
- {__Pyx_NAMESTR("findall"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_23findall, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_22findall)},
- {__Pyx_NAMESTR("iterfind"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_25iterfind, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_24iterfind)},
- {__Pyx_NAMESTR("xpath"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_27xpath, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_26xpath)},
- {__Pyx_NAMESTR("xslt"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_29xslt, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_28xslt)},
- {__Pyx_NAMESTR("relaxng"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_31relaxng, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_30relaxng)},
- {__Pyx_NAMESTR("xmlschema"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_33xmlschema, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_32xmlschema)},
- {__Pyx_NAMESTR("xinclude"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_35xinclude, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_34xinclude)},
- {__Pyx_NAMESTR("write_c14n"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ElementTree_37write_c14n, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_12_ElementTree_36write_c14n)},
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ElementTree[] = {
- {(char *)"docinfo", __pyx_getprop_4lxml_5etree_12_ElementTree_docinfo, 0, __Pyx_DOCSTR(__pyx_k_Information_about_the_document_p), 0},
- {(char *)"parser", __pyx_getprop_4lxml_5etree_12_ElementTree_parser, 0, __Pyx_DOCSTR(__pyx_k_The_parser_that_was_used_to_pars), 0},
- {0, 0, 0, 0, 0}
-};
-
-DL_EXPORT(PyTypeObject) LxmlElementTreeType = {
- PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ElementTree"), /*tp_name*/
- sizeof(struct LxmlElementTree), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementTree, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- #if PY_MAJOR_VERSION < 3
- 0, /*tp_compare*/
- #else
- 0, /*reserved*/
- #endif
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementTree, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementTree, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ElementTree, /*tp_methods*/
- 0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ElementTree, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- 0, /*tp_init*/
- 0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ElementTree, /*tp_new*/
- 0, /*tp_free*/
- 0, /*tp_is_gc*/
- 0, /*tp_bases*/
- 0, /*tp_mro*/
- 0, /*tp_cache*/
- 0, /*tp_subclasses*/
- 0, /*tp_weaklist*/
- 0, /*tp_del*/
- #if PY_VERSION_HEX >= 0x02060000
- 0, /*tp_version_tag*/
- #endif
- #if PY_VERSION_HEX >= 0x030400a1
- 0, /*tp_finalize*/
- #endif
-};
-static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy __pyx_vtable_4lxml_5etree__ModifyContentOnlyProxy;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyProxy(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
- return o;
+static int __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o;
+ if (p->_ns_uri) {
+ e = (*v)(p->_ns_uri, a); if (e) return e;
+ }
+ if (p->_entries) {
+ e = (*v)(p->_entries, a); if (e) return e;
+ }
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_23_ModifyContentOnlyProxy_text(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_23_ModifyContentOnlyProxy_4text_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree__NamespaceRegistry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__NamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__NamespaceRegistry *)o;
+ Py_CLEAR(p->_ns_uri);
+ Py_CLEAR(p->_entries);
+ return 0;
+}
+static PyObject *__pyx_sq_item_4lxml_5etree__NamespaceRegistry(PyObject *o, Py_ssize_t i) {
+ PyObject *r;
+ PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
+ r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
+ Py_DECREF(x);
+ return r;
}
-static int __pyx_setprop_4lxml_5etree_23_ModifyContentOnlyProxy_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+static int __pyx_mp_ass_subscript_4lxml_5etree__NamespaceRegistry(PyObject *o, PyObject *i, PyObject *v) {
if (v) {
- return __pyx_pw_4lxml_5etree_23_ModifyContentOnlyProxy_4text_3__set__(o, v);
+ PyErr_Format(PyExc_NotImplementedError,
+ "Subscript assignment not supported by %.200s", Py_TYPE(o)->tp_name);
+ return -1;
}
else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
+ return __pyx_pw_4lxml_5etree_18_NamespaceRegistry_7__delitem__(o, i);
}
}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ModifyContentOnlyProxy[] = {
- {(char *)"text", __pyx_getprop_4lxml_5etree_23_ModifyContentOnlyProxy_text, __pyx_setprop_4lxml_5etree_23_ModifyContentOnlyProxy_text, 0, 0},
- {0, 0, 0, 0, 0}
+static PyMethodDef __pyx_methods_4lxml_5etree__NamespaceRegistry[] = {
+ {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_3update, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_18_NamespaceRegistry_2update)},
+ {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_11items, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("iteritems"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_13iteritems, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pw_4lxml_5etree_18_NamespaceRegistry_15clear, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ModifyContentOnlyProxy = {
+static PySequenceMethods __pyx_tp_as_sequence__NamespaceRegistry = {
+ 0, /*sq_length*/
+ 0, /*sq_concat*/
+ 0, /*sq_repeat*/
+ __pyx_sq_item_4lxml_5etree__NamespaceRegistry, /*sq_item*/
+ 0, /*sq_slice*/
+ 0, /*sq_ass_item*/
+ 0, /*sq_ass_slice*/
+ 0, /*sq_contains*/
+ 0, /*sq_inplace_concat*/
+ 0, /*sq_inplace_repeat*/
+};
+
+static PyMappingMethods __pyx_tp_as_mapping__NamespaceRegistry = {
+ 0, /*mp_length*/
+ __pyx_pw_4lxml_5etree_18_NamespaceRegistry_5__getitem__, /*mp_subscript*/
+ __pyx_mp_ass_subscript_4lxml_5etree__NamespaceRegistry, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__NamespaceRegistry = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ModifyContentOnlyProxy"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._NamespaceRegistry"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__NamespaceRegistry), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ &__pyx_tp_as_sequence__NamespaceRegistry, /*tp_as_sequence*/
+ &__pyx_tp_as_mapping__NamespaceRegistry, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A read-only proxy that allows changing the text content.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
+ __Pyx_DOCSTR("Dictionary-like namespace registry"), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__NamespaceRegistry, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
- #else
- 0, /*tp_iter*/
- #endif
+ __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__NamespaceRegistry, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ModifyContentOnlyProxy, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__NamespaceRegistry, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_ParserBasedElementClassLookup __pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup;
+static struct __pyx_vtabstruct_4lxml_5etree__ClassNamespaceRegistry __pyx_vtable_4lxml_5etree__ClassNamespaceRegistry;
-static PyObject *__pyx_tp_new_4lxml_5etree_ParserBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ClassNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__NamespaceRegistry(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup;
- if (unlikely(__pyx_pw_4lxml_5etree_29ParserBasedElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry*)__pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry;
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ParserBasedElementClassLookup[] = {
+static int __pyx_mp_ass_subscript_4lxml_5etree__ClassNamespaceRegistry(PyObject *o, PyObject *i, PyObject *v) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_23_ClassNamespaceRegistry_1__setitem__(o, i, v);
+ }
+ else {
+ if (__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping && __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript)
+ return __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript(o, i, v);
+ PyErr_Format(PyExc_NotImplementedError,
+ "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
+ return -1;
+ }
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__ClassNamespaceRegistry[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_ParserBasedElementClassLookup = {
+static PyMappingMethods __pyx_tp_as_mapping__ClassNamespaceRegistry = {
+ 0, /*mp_length*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_18_NamespaceRegistry_5__getitem__, /*mp_subscript*/
+ #else
+ 0, /*mp_subscript*/
+ #endif
+ __pyx_mp_ass_subscript_4lxml_5etree__ClassNamespaceRegistry, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__ClassNamespaceRegistry = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ParserBasedElementClassLookup"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ClassNamespaceRegistry"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_23_ClassNamespaceRegistry_3__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ &__pyx_tp_as_mapping__ClassNamespaceRegistry, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ParserBasedElementClassLookup(self, fallback=None)\n Element class lookup based on the XML parser.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("Dictionary-like registry for namespace implementation classes"), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__NamespaceRegistry, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ParserBasedElementClassLookup, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ClassNamespaceRegistry, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
- #else
0, /*tp_init*/
- #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ParserBasedElementClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ClassNamespaceRegistry, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_vtable_4lxml_5etree__Validator;
+static struct __pyx_vtabstruct_4lxml_5etree_ElementNamespaceClassLookup __pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree__Validator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__Validator *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree_ElementNamespaceClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__Validator *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__Validator;
- p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_10_Validator_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup;
+ p->_namespace_registries = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__Validator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__Validator *p = (struct __pyx_obj_4lxml_5etree__Validator *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_ElementNamespaceClassLookup(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_error_log);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->_namespace_registries);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__Validator(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_ElementNamespaceClassLookup(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__Validator *p = (struct __pyx_obj_4lxml_5etree__Validator *)o;
- if (p->_error_log) {
- e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o;
+ e = __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup(o, v, a); if (e) return e;
+ if (p->_namespace_registries) {
+ e = (*v)(p->_namespace_registries, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__Validator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__Validator *p = (struct __pyx_obj_4lxml_5etree__Validator *)o;
- Py_CLEAR(p->_error_log);
+static int __pyx_tp_clear_4lxml_5etree_ElementNamespaceClassLookup(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o;
+ __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup(o);
+ Py_CLEAR(p->_namespace_registries);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_10_Validator_error_log(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_10_Validator_9error_log_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__Validator[] = {
- {__Pyx_NAMESTR("validate"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_3validate, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10_Validator_2validate)},
- {__Pyx_NAMESTR("assertValid"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_5assertValid, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10_Validator_4assertValid)},
- {__Pyx_NAMESTR("assert_"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_7assert_, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10_Validator_6assert_)},
- {__Pyx_NAMESTR("_append_log_message"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("_clear_error_log"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_11_clear_error_log, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree_ElementNamespaceClassLookup[] = {
+ {__Pyx_NAMESTR("get_namespace"), (PyCFunction)__pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_5get_namespace, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_27ElementNamespaceClassLookup_4get_namespace)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__Validator[] = {
- {(char *)"error_log", __pyx_getprop_4lxml_5etree_10_Validator_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_log_of_validation_errors_and), 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__Validator = {
+static PyTypeObject __pyx_type_4lxml_5etree_ElementNamespaceClassLookup = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._Validator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__Validator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ElementNamespaceClassLookup"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Validator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_ElementNamespaceClassLookup, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Base class for XML validators."), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
+ __Pyx_DOCSTR("ElementNamespaceClassLookup(self, fallback=None)\n\n Element class lookup scheme that searches the Element class in the\n Namespace registry.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_ElementNamespaceClassLookup, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_ElementNamespaceClassLookup, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__Validator, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_ElementNamespaceClassLookup, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__Validator, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__Validator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ElementNamespaceClassLookup, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_RelaxNG __pyx_vtable_4lxml_5etree_RelaxNG;
+static struct __pyx_vtabstruct_4lxml_5etree__FunctionNamespaceRegistry __pyx_vtable_4lxml_5etree__FunctionNamespaceRegistry;
-static PyObject *__pyx_tp_new_4lxml_5etree_RelaxNG(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_RelaxNG *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__NamespaceRegistry(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_RelaxNG *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_RelaxNG;
- if (unlikely(__pyx_pw_4lxml_5etree_7RelaxNG_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry*)__pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_RelaxNG(PyObject *o) {
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
+static int __pyx_mp_ass_subscript_4lxml_5etree__FunctionNamespaceRegistry(PyObject *o, PyObject *i, PyObject *v) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_1__setitem__(o, i, v);
}
- #endif
- PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_7RelaxNG_5__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
+ else {
+ if (__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping && __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript)
+ return __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript(o, i, v);
+ PyErr_Format(PyExc_NotImplementedError,
+ "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
+ return -1;
}
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__Validator(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_RelaxNG[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__FunctionNamespaceRegistry[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_RelaxNG = {
+static PyMappingMethods __pyx_tp_as_mapping__FunctionNamespaceRegistry = {
+ 0, /*mp_length*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_18_NamespaceRegistry_5__getitem__, /*mp_subscript*/
+ #else
+ 0, /*mp_subscript*/
+ #endif
+ __pyx_mp_ass_subscript_4lxml_5etree__FunctionNamespaceRegistry, /*mp_ass_subscript*/
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__FunctionNamespaceRegistry = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.RelaxNG"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_RelaxNG), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._FunctionNamespaceRegistry"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__FunctionNamespaceRegistry), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_RelaxNG, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_3__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
+ &__pyx_tp_as_mapping__FunctionNamespaceRegistry, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_7RelaxNG_7__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("RelaxNG(self, etree=None, file=None)\n Turn a document into a Relax NG validator.\n\n Either pass a schema as Element or ElementTree, or pass a file or\n filename through the ``file`` keyword argument.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__NamespaceRegistry, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_RelaxNG, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__FunctionNamespaceRegistry, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_7RelaxNG_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_RelaxNG, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__LogEntry __pyx_vtable_4lxml_5etree__LogEntry;
-
-static struct __pyx_obj_4lxml_5etree__LogEntry *__pyx_freelist_4lxml_5etree__LogEntry[16];
-static int __pyx_freecount_4lxml_5etree__LogEntry = 0;
+static struct __pyx_vtabstruct_4lxml_5etree__XPathFunctionNamespaceRegistry __pyx_vtable_4lxml_5etree__XPathFunctionNamespaceRegistry;
-static PyObject *__pyx_tp_new_4lxml_5etree__LogEntry(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__LogEntry *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__LogEntry > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__LogEntry)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__LogEntry[--__pyx_freecount_4lxml_5etree__LogEntry];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__LogEntry));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree__LogEntry *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__LogEntry;
- p->_message = Py_None; Py_INCREF(Py_None);
- p->_filename = Py_None; Py_INCREF(Py_None);
+static PyObject *__pyx_tp_new_4lxml_5etree__XPathFunctionNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__FunctionNamespaceRegistry(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry*)__pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry;
+ p->_prefix = Py_None; Py_INCREF(Py_None);
+ p->_prefix_utf = ((PyObject*)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__LogEntry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__LogEntry *p = (struct __pyx_obj_4lxml_5etree__LogEntry *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__XPathFunctionNamespaceRegistry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o;
PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_9_LogEntry_1__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_CLEAR(p->_message);
- Py_CLEAR(p->_filename);
- if ((__pyx_freecount_4lxml_5etree__LogEntry < 16) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__LogEntry))) {
- __pyx_freelist_4lxml_5etree__LogEntry[__pyx_freecount_4lxml_5etree__LogEntry++] = ((struct __pyx_obj_4lxml_5etree__LogEntry *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->_prefix);
+ Py_CLEAR(p->_prefix_utf);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__LogEntry(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__XPathFunctionNamespaceRegistry(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__LogEntry *p = (struct __pyx_obj_4lxml_5etree__LogEntry *)o;
- if (p->_message) {
- e = (*v)(p->_message, a); if (e) return e;
- }
- if (p->_filename) {
- e = (*v)(p->_filename, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry(o, v, a); if (e) return e;
+ if (p->_prefix) {
+ e = (*v)(p->_prefix, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__LogEntry(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__LogEntry *p = (struct __pyx_obj_4lxml_5etree__LogEntry *)o;
- Py_CLEAR(p->_message);
- Py_CLEAR(p->_filename);
+static int __pyx_tp_clear_4lxml_5etree__XPathFunctionNamespaceRegistry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *p = (struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry *)o;
+ __pyx_tp_clear_4lxml_5etree__NamespaceRegistry(o);
+ Py_CLEAR(p->_prefix);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_domain_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_11domain_name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_type_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_9type_name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_level_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_10level_name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_message(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_7message_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_filename(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_8filename_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_domain(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_6domain_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_type(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_4type_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_level(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_5level_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_line(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_4line_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_3__get__(o);
}
-static PyObject *__pyx_getprop_4lxml_5etree_9_LogEntry_column(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9_LogEntry_6column_1__get__(o);
+static int __pyx_setprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ return __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_5__set__(o, v);
+ }
+ else {
+ return __pyx_pw_4lxml_5etree_31_XPathFunctionNamespaceRegistry_6prefix_1__del__(o);
+ }
}
-static PyMethodDef __pyx_methods_4lxml_5etree__LogEntry[] = {
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__LogEntry[] = {
- {(char *)"domain_name", __pyx_getprop_4lxml_5etree_9_LogEntry_domain_name, 0, __Pyx_DOCSTR(__pyx_k_The_name_of_the_error_domain_See), 0},
- {(char *)"type_name", __pyx_getprop_4lxml_5etree_9_LogEntry_type_name, 0, __Pyx_DOCSTR(__pyx_k_The_name_of_the_error_type_See_l), 0},
- {(char *)"level_name", __pyx_getprop_4lxml_5etree_9_LogEntry_level_name, 0, __Pyx_DOCSTR(__pyx_k_The_name_of_the_error_level_See), 0},
- {(char *)"message", __pyx_getprop_4lxml_5etree_9_LogEntry_message, 0, 0, 0},
- {(char *)"filename", __pyx_getprop_4lxml_5etree_9_LogEntry_filename, 0, 0, 0},
- {(char *)"domain", __pyx_getprop_4lxml_5etree_9_LogEntry_domain, 0, 0, 0},
- {(char *)"type", __pyx_getprop_4lxml_5etree_9_LogEntry_type, 0, 0, 0},
- {(char *)"level", __pyx_getprop_4lxml_5etree_9_LogEntry_level, 0, 0, 0},
- {(char *)"line", __pyx_getprop_4lxml_5etree_9_LogEntry_line, 0, 0, 0},
- {(char *)"column", __pyx_getprop_4lxml_5etree_9_LogEntry_column, 0, 0, 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__XPathFunctionNamespaceRegistry[] = {
+ {(char *)"prefix", __pyx_getprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix, __pyx_setprop_4lxml_5etree_31_XPathFunctionNamespaceRegistry_prefix, __Pyx_DOCSTR(__pyx_k_Namespace_prefix_for_extension_f), 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__LogEntry = {
+static PyTypeObject __pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._LogEntry"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__LogEntry), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XPathFunctionNamespaceRegistry"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XPathFunctionNamespaceRegistry), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__LogEntry, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_9_LogEntry_3__repr__, /*tp_repr*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_26_FunctionNamespaceRegistry_3__repr__, /*tp_repr*/
+ #else
+ 0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A log message entry from an error log.\n\n Attributes:\n\n - message: the message text\n - domain: the domain ID (see lxml.etree.ErrorDomains)\n - type: the message type ID (see lxml.etree.ErrorTypes)\n - level: the log level ID (see lxml.etree.ErrorLevels)\n - line: the line at which the message originated (if applicable)\n - column: the character column at which the message originated (if applicable)\n - filename: the name of the file in which the message originated (if applicable)\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__LogEntry, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__LogEntry, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__LogEntry, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__LogEntry, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__LogEntry, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XPathFunctionNamespaceRegistry, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__PythonSaxParserTarget __pyx_vtable_4lxml_5etree__PythonSaxParserTarget;
-static PyObject *__pyx_tp_new_4lxml_5etree__PythonSaxParserTarget(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__SaxParserTarget(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__InputDocument(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__InputDocument *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget*)__pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget;
- p->_target_start = Py_None; Py_INCREF(Py_None);
- p->_target_end = Py_None; Py_INCREF(Py_None);
- p->_target_data = Py_None; Py_INCREF(Py_None);
- p->_target_doctype = Py_None; Py_INCREF(Py_None);
- p->_target_pi = Py_None; Py_INCREF(Py_None);
- p->_target_comment = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_22_PythonSaxParserTarget_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree__InputDocument *)o);
+ p->_data_bytes = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_filename = Py_None; Py_INCREF(Py_None);
+ p->_file = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_14_InputDocument_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__PythonSaxParserTarget(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p = (struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__InputDocument(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__InputDocument *p = (struct __pyx_obj_4lxml_5etree__InputDocument *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_target_start);
- Py_CLEAR(p->_target_end);
- Py_CLEAR(p->_target_data);
- Py_CLEAR(p->_target_doctype);
- Py_CLEAR(p->_target_pi);
- Py_CLEAR(p->_target_comment);
- #if CYTHON_COMPILING_IN_CPYTHON
- if (PyType_IS_GC(Py_TYPE(o)->tp_base))
- #endif
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget(o);
+ Py_CLEAR(p->_data_bytes);
+ Py_CLEAR(p->_filename);
+ Py_CLEAR(p->_file);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__PythonSaxParserTarget(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__InputDocument(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p = (struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o;
- e = ((likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) ? ((__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse) ? __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree__PythonSaxParserTarget)); if (e) return e;
- if (p->_target_start) {
- e = (*v)(p->_target_start, a); if (e) return e;
- }
- if (p->_target_end) {
- e = (*v)(p->_target_end, a); if (e) return e;
- }
- if (p->_target_data) {
- e = (*v)(p->_target_data, a); if (e) return e;
- }
- if (p->_target_doctype) {
- e = (*v)(p->_target_doctype, a); if (e) return e;
- }
- if (p->_target_pi) {
- e = (*v)(p->_target_pi, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__InputDocument *p = (struct __pyx_obj_4lxml_5etree__InputDocument *)o;
+ if (p->_filename) {
+ e = (*v)(p->_filename, a); if (e) return e;
}
- if (p->_target_comment) {
- e = (*v)(p->_target_comment, a); if (e) return e;
+ if (p->_file) {
+ e = (*v)(p->_file, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__PythonSaxParserTarget(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p = (struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o;
- if (likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) { if (__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear) __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree__PythonSaxParserTarget);
- Py_CLEAR(p->_target_start);
- Py_CLEAR(p->_target_end);
- Py_CLEAR(p->_target_data);
- Py_CLEAR(p->_target_doctype);
- Py_CLEAR(p->_target_pi);
- Py_CLEAR(p->_target_comment);
+static int __pyx_tp_clear_4lxml_5etree__InputDocument(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__InputDocument *p = (struct __pyx_obj_4lxml_5etree__InputDocument *)o;
+ Py_CLEAR(p->_filename);
+ Py_CLEAR(p->_file);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__PythonSaxParserTarget[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__InputDocument[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__PythonSaxParserTarget = {
+static PyTypeObject __pyx_type_4lxml_5etree__InputDocument = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._PythonSaxParserTarget"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._InputDocument"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__InputDocument), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__PythonSaxParserTarget, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__InputDocument, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__PythonSaxParserTarget, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__PythonSaxParserTarget, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__InputDocument, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__InputDocument, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__PythonSaxParserTarget, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__InputDocument, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__PythonSaxParserTarget, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__InputDocument, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
#endif
};
-static struct __pyx_obj_4lxml_5etree_CDATA *__pyx_freelist_4lxml_5etree_CDATA[8];
-static int __pyx_freecount_4lxml_5etree_CDATA = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree_CDATA(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_CDATA *p;
+static PyObject *__pyx_tp_new_4lxml_5etree_Resolver(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree_CDATA > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_CDATA)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree_CDATA[--__pyx_freecount_4lxml_5etree_CDATA];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree_CDATA));
- (void) PyObject_INIT(o, t);
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
} else {
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree_CDATA *)o);
- p->_utf8_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_5CDATA_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
+ if (unlikely(!o)) return 0;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_CDATA(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_CDATA *p = (struct __pyx_obj_4lxml_5etree_CDATA *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_Resolver(PyObject *o) {
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
- Py_CLEAR(p->_utf8_data);
- if ((__pyx_freecount_4lxml_5etree_CDATA < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_CDATA))) {
- __pyx_freelist_4lxml_5etree_CDATA[__pyx_freecount_4lxml_5etree_CDATA++] = ((struct __pyx_obj_4lxml_5etree_CDATA *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_CDATA[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_Resolver[] = {
+ {__Pyx_NAMESTR("resolve"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_1resolve, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_resolve)},
+ {__Pyx_NAMESTR("resolve_empty"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_3resolve_empty, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_2resolve_empty)},
+ {__Pyx_NAMESTR("resolve_string"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_5resolve_string, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_4resolve_string)},
+ {__Pyx_NAMESTR("resolve_filename"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_7resolve_filename, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_6resolve_filename)},
+ {__Pyx_NAMESTR("resolve_file"), (PyCFunction)__pyx_pw_4lxml_5etree_8Resolver_9resolve_file, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_8Resolver_8resolve_file)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_CDATA = {
+static PyTypeObject __pyx_type_4lxml_5etree_Resolver = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.CDATA"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_CDATA), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.Resolver"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_Resolver), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_CDATA, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_Resolver, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("CDATA(data)\n\n CDATA factory. This factory creates an opaque data object that\n can be used to set Element text. The usual way to use it is::\n\n >>> el = Element('content')\n >>> el.text = CDATA('a string')\n\n >>> print(el.text)\n a string\n >>> print(tostring(el, encoding=\"unicode\"))\n <content><![CDATA[a string]]></content>\n "), /*tp_doc*/
+ __Pyx_DOCSTR("This is the base class of all resolvers."), /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_CDATA, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_Resolver, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_CDATA, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_Resolver, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__ResolverRegistry __pyx_vtable_4lxml_5etree__ResolverRegistry;
-static PyObject *__pyx_tp_new_4lxml_5etree_xmlfile(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_xmlfile *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__ResolverRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ResolverRegistry *p;
PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_xmlfile *)o);
- p->output_file = Py_None; Py_INCREF(Py_None);
- p->encoding = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->writer = ((struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ResolverRegistry;
+ p->_resolvers = Py_None; Py_INCREF(Py_None);
+ p->_default_resolver = ((struct __pyx_obj_4lxml_5etree_Resolver *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_17_ResolverRegistry_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_xmlfile(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_xmlfile *p = (struct __pyx_obj_4lxml_5etree_xmlfile *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__ResolverRegistry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ResolverRegistry *p = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->output_file);
- Py_CLEAR(p->encoding);
- Py_CLEAR(p->writer);
+ Py_CLEAR(p->_resolvers);
+ Py_CLEAR(p->_default_resolver);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_xmlfile(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ResolverRegistry(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_xmlfile *p = (struct __pyx_obj_4lxml_5etree_xmlfile *)o;
- if (p->output_file) {
- e = (*v)(p->output_file, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__ResolverRegistry *p = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o;
+ if (p->_resolvers) {
+ e = (*v)(p->_resolvers, a); if (e) return e;
}
- if (p->writer) {
- e = (*v)(((PyObject*)p->writer), a); if (e) return e;
+ if (p->_default_resolver) {
+ e = (*v)(((PyObject*)p->_default_resolver), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_xmlfile(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_xmlfile *p = (struct __pyx_obj_4lxml_5etree_xmlfile *)o;
- Py_CLEAR(p->output_file);
- Py_CLEAR(p->writer);
+static int __pyx_tp_clear_4lxml_5etree__ResolverRegistry(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ResolverRegistry *p = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *)o;
+ Py_CLEAR(p->_resolvers);
+ Py_CLEAR(p->_default_resolver);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_xmlfile[] = {
- {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_3__enter__, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__ResolverRegistry[] = {
+ {__Pyx_NAMESTR("add"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_3add, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_2add)},
+ {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_5remove, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_4remove)},
+ {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_7copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_6copy)},
+ {__Pyx_NAMESTR("resolve"), (PyCFunction)__pyx_pw_4lxml_5etree_17_ResolverRegistry_9resolve, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_17_ResolverRegistry_8resolve)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_xmlfile = {
+static PyTypeObject __pyx_type_4lxml_5etree__ResolverRegistry = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.xmlfile"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_xmlfile), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ResolverRegistry"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ResolverRegistry), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_xmlfile, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ResolverRegistry, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_17_ResolverRegistry_11__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("xmlfile(self, output_file, encoding=None, compression=None)\n\n A simple mechanism for incremental XML serialisation.\n\n Usage example::\n\n with xmlfile(\"somefile.xml\", encoding='utf-8') as xf:\n xf.write_declaration(standalone=True)\n xf.write_doctype('<!DOCTYPE root SYSTEM \"some.dtd\">')\n\n # generate an element (the root element)\n with xf.element('root'):\n # write a complete Element into the open root element\n xf.write(etree.Element('test'))\n\n # generate and write more Elements, e.g. through iterparse\n for element in generate_some_elements():\n # serialise generated elements into the XML file\n xf.write(element)\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_xmlfile, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_xmlfile, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ResolverRegistry, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ResolverRegistry, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_xmlfile, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ResolverRegistry, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_7xmlfile_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_xmlfile, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ResolverRegistry, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__ResolverContext __pyx_vtable_4lxml_5etree__ResolverContext;
-static struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_freelist_4lxml_5etree__DTDElementContentDecl[8];
-static int __pyx_freecount_4lxml_5etree__DTDElementContentDecl = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementContentDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__DTDElementContentDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementContentDecl[--__pyx_freecount_4lxml_5etree__DTDElementContentDecl];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o);
- p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
+static PyObject *__pyx_tp_new_4lxml_5etree__ResolverContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ResolverContext *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ExceptionContext(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__ResolverContext *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__ResolverContext;
+ p->_resolvers = ((struct __pyx_obj_4lxml_5etree__ResolverRegistry *)Py_None); Py_INCREF(Py_None);
+ p->_storage = ((struct __pyx_obj_4lxml_5etree__TempStore *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__DTDElementContentDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_dtd);
- if ((__pyx_freecount_4lxml_5etree__DTDElementContentDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl))) {
- __pyx_freelist_4lxml_5etree__DTDElementContentDecl[__pyx_freecount_4lxml_5etree__DTDElementContentDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
+static void __pyx_tp_dealloc_4lxml_5etree__ResolverContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ResolverContext *p = (struct __pyx_obj_4lxml_5etree__ResolverContext *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
}
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_resolvers);
+ Py_CLEAR(p->_storage);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__ExceptionContext(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__DTDElementContentDecl(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ResolverContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o;
- if (p->_dtd) {
- e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__ResolverContext *p = (struct __pyx_obj_4lxml_5etree__ResolverContext *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__ExceptionContext(o, v, a); if (e) return e;
+ if (p->_resolvers) {
+ e = (*v)(((PyObject*)p->_resolvers), a); if (e) return e;
+ }
+ if (p->_storage) {
+ e = (*v)(((PyObject*)p->_storage), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__DTDElementContentDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o;
- Py_CLEAR(p->_dtd);
+static int __pyx_tp_clear_4lxml_5etree__ResolverContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ResolverContext *p = (struct __pyx_obj_4lxml_5etree__ResolverContext *)o;
+ __pyx_tp_clear_4lxml_5etree__ExceptionContext(o);
+ Py_CLEAR(p->_resolvers);
+ Py_CLEAR(p->_storage);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_type(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4type_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_occur(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_5occur_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_left(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4left_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_right(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_5right_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__DTDElementContentDecl[] = {
- {0, 0, 0, 0}
-};
-
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDElementContentDecl[] = {
- {(char *)"name", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_name, 0, 0, 0},
- {(char *)"type", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_type, 0, 0, 0},
- {(char *)"occur", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_occur, 0, 0, 0},
- {(char *)"left", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_left, 0, 0, 0},
- {(char *)"right", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_right, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__DTDElementContentDecl = {
+static PyTypeObject __pyx_type_4lxml_5etree__ResolverContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._DTDElementContentDecl"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ResolverContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ResolverContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__DTDElementContentDecl, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ResolverContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_1__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__DTDElementContentDecl, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__DTDElementContentDecl, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__ResolverContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ResolverContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__DTDElementContentDecl, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__DTDElementContentDecl, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__DTDElementContentDecl, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ResolverContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog __pyx_vtable_4lxml_5etree__ListErrorLog;
+static struct __pyx_vtabstruct_4lxml_5etree__ParserContext __pyx_vtable_4lxml_5etree__ParserContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__ListErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ListErrorLog *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__BaseErrorLog(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ParserContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ParserContext *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ResolverContext(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ListErrorLog *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__ListErrorLog;
- p->_entries = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__ParserContext *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__ParserContext;
+ p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
+ p->_validator = ((struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)Py_None); Py_INCREF(Py_None);
+ p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_14_ParserContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ListErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ListErrorLog *p = (struct __pyx_obj_4lxml_5etree__ListErrorLog *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__ParserContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParserContext *p = (struct __pyx_obj_4lxml_5etree__ParserContext *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_entries);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_14_ParserContext_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_error_log);
+ Py_CLEAR(p->_validator);
+ Py_CLEAR(p->_doc);
PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog(o);
+ __pyx_tp_dealloc_4lxml_5etree__ResolverContext(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__ListErrorLog(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ParserContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__ListErrorLog *p = (struct __pyx_obj_4lxml_5etree__ListErrorLog *)o;
- e = __pyx_tp_traverse_4lxml_5etree__BaseErrorLog(o, v, a); if (e) return e;
- if (p->_entries) {
- e = (*v)(p->_entries, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__ParserContext *p = (struct __pyx_obj_4lxml_5etree__ParserContext *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__ResolverContext(o, v, a); if (e) return e;
+ if (p->_error_log) {
+ e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ }
+ if (p->_validator) {
+ e = (*v)(((PyObject*)p->_validator), a); if (e) return e;
+ }
+ if (p->_doc) {
+ e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__ListErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ListErrorLog *p = (struct __pyx_obj_4lxml_5etree__ListErrorLog *)o;
- __pyx_tp_clear_4lxml_5etree__BaseErrorLog(o);
- Py_CLEAR(p->_entries);
- return 0;
-}
-static PyObject *__pyx_sq_item_4lxml_5etree__ListErrorLog(PyObject *o, Py_ssize_t i) {
- PyObject *r;
- PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
- r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
- Py_DECREF(x);
- return r;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__ListErrorLog[] = {
- {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_3copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_2copy)},
- {__Pyx_NAMESTR("filter_domains"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_17filter_domains, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_16filter_domains)},
- {__Pyx_NAMESTR("filter_types"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_19filter_types, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_18filter_types)},
- {__Pyx_NAMESTR("filter_levels"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_21filter_levels, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_20filter_levels)},
- {__Pyx_NAMESTR("filter_from_level"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_23filter_from_level, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_22filter_from_level)},
- {__Pyx_NAMESTR("filter_from_fatals"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_25filter_from_fatals, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_24filter_from_fatals)},
- {__Pyx_NAMESTR("filter_from_errors"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_27filter_from_errors, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_26filter_from_errors)},
- {__Pyx_NAMESTR("filter_from_warnings"), (PyCFunction)__pyx_pw_4lxml_5etree_13_ListErrorLog_29filter_from_warnings, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13_ListErrorLog_28filter_from_warnings)},
- {0, 0, 0, 0}
-};
-
-static PyNumberMethods __pyx_tp_as_number__ListErrorLog = {
- 0, /*nb_add*/
- 0, /*nb_subtract*/
- 0, /*nb_multiply*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_divide*/
- #endif
- 0, /*nb_remainder*/
- 0, /*nb_divmod*/
- 0, /*nb_power*/
- 0, /*nb_negative*/
- 0, /*nb_positive*/
- 0, /*nb_absolute*/
- __pyx_pw_4lxml_5etree_13_ListErrorLog_15__nonzero__, /*nb_nonzero*/
- 0, /*nb_invert*/
- 0, /*nb_lshift*/
- 0, /*nb_rshift*/
- 0, /*nb_and*/
- 0, /*nb_xor*/
- 0, /*nb_or*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_coerce*/
- #endif
- 0, /*nb_int*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_long*/
- #else
- 0, /*reserved*/
- #endif
- 0, /*nb_float*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_oct*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_hex*/
- #endif
- 0, /*nb_inplace_add*/
- 0, /*nb_inplace_subtract*/
- 0, /*nb_inplace_multiply*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_inplace_divide*/
- #endif
- 0, /*nb_inplace_remainder*/
- 0, /*nb_inplace_power*/
- 0, /*nb_inplace_lshift*/
- 0, /*nb_inplace_rshift*/
- 0, /*nb_inplace_and*/
- 0, /*nb_inplace_xor*/
- 0, /*nb_inplace_or*/
- 0, /*nb_floor_divide*/
- 0, /*nb_true_divide*/
- 0, /*nb_inplace_floor_divide*/
- 0, /*nb_inplace_true_divide*/
- #if PY_VERSION_HEX >= 0x02050000
- 0, /*nb_index*/
- #endif
-};
-
-static PySequenceMethods __pyx_tp_as_sequence__ListErrorLog = {
- __pyx_pw_4lxml_5etree_13_ListErrorLog_11__len__, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- __pyx_sq_item_4lxml_5etree__ListErrorLog, /*sq_item*/
- 0, /*sq_slice*/
- 0, /*sq_ass_item*/
- 0, /*sq_ass_slice*/
- __pyx_pw_4lxml_5etree_13_ListErrorLog_13__contains__, /*sq_contains*/
- 0, /*sq_inplace_concat*/
- 0, /*sq_inplace_repeat*/
-};
+static int __pyx_tp_clear_4lxml_5etree__ParserContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParserContext *p = (struct __pyx_obj_4lxml_5etree__ParserContext *)o;
+ __pyx_tp_clear_4lxml_5etree__ResolverContext(o);
+ Py_CLEAR(p->_error_log);
+ Py_CLEAR(p->_validator);
+ Py_CLEAR(p->_doc);
+ return 0;
+}
-static PyMappingMethods __pyx_tp_as_mapping__ListErrorLog = {
- __pyx_pw_4lxml_5etree_13_ListErrorLog_11__len__, /*mp_length*/
- __pyx_pw_4lxml_5etree_13_ListErrorLog_9__getitem__, /*mp_subscript*/
- 0, /*mp_ass_subscript*/
+static PyMethodDef __pyx_methods_4lxml_5etree__ParserContext[] = {
+ {0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ListErrorLog = {
+static PyTypeObject __pyx_type_4lxml_5etree__ParserContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ListErrorLog"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ListErrorLog), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ParserContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ParserContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ListErrorLog, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ParserContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
- &__pyx_tp_as_number__ListErrorLog, /*tp_as_number*/
- &__pyx_tp_as_sequence__ListErrorLog, /*tp_as_sequence*/
- &__pyx_tp_as_mapping__ListErrorLog, /*tp_as_mapping*/
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Immutable base version of a list based error log."), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ListErrorLog, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ListErrorLog, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ParserContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ParserContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_13_ListErrorLog_5__iter__, /*tp_iter*/
+ 0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ListErrorLog, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ParserContext, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_13_ListErrorLog_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ListErrorLog, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ParserContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ErrorLog __pyx_vtable_4lxml_5etree__ErrorLog;
+static struct __pyx_vtabstruct_4lxml_5etree__SaxParserContext __pyx_vtable_4lxml_5etree__SaxParserContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ErrorLog *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ListErrorLog(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__SaxParserContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__SaxParserContext *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ParserContext(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__ErrorLog;
- p->_logContexts = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_9_ErrorLog_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree__SaxParserContext *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__SaxParserContext;
+ p->_target = ((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)Py_None); Py_INCREF(Py_None);
+ p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
+ p->_ns_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_node_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->events_iterator = ((struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)Py_None); Py_INCREF(Py_None);
+ p->_root = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_17_SaxParserContext_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ErrorLog *p = (struct __pyx_obj_4lxml_5etree__ErrorLog *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__SaxParserContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__SaxParserContext *p = (struct __pyx_obj_4lxml_5etree__SaxParserContext *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_logContexts);
+ Py_CLEAR(p->_target);
+ Py_CLEAR(p->_parser);
+ Py_CLEAR(p->_ns_stack);
+ Py_CLEAR(p->_node_stack);
+ Py_CLEAR(p->events_iterator);
+ Py_CLEAR(p->_root);
+ Py_CLEAR(p->_matcher);
PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__ListErrorLog(o);
+ __pyx_tp_dealloc_4lxml_5etree__ParserContext(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__ErrorLog(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__SaxParserContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__ErrorLog *p = (struct __pyx_obj_4lxml_5etree__ErrorLog *)o;
- e = __pyx_tp_traverse_4lxml_5etree__ListErrorLog(o, v, a); if (e) return e;
- if (p->_logContexts) {
- e = (*v)(p->_logContexts, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__SaxParserContext *p = (struct __pyx_obj_4lxml_5etree__SaxParserContext *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__ParserContext(o, v, a); if (e) return e;
+ if (p->_target) {
+ e = (*v)(((PyObject*)p->_target), a); if (e) return e;
+ }
+ if (p->_parser) {
+ e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
+ }
+ if (p->_ns_stack) {
+ e = (*v)(p->_ns_stack, a); if (e) return e;
+ }
+ if (p->_node_stack) {
+ e = (*v)(p->_node_stack, a); if (e) return e;
+ }
+ if (p->events_iterator) {
+ e = (*v)(((PyObject*)p->events_iterator), a); if (e) return e;
+ }
+ if (p->_root) {
+ e = (*v)(((PyObject*)p->_root), a); if (e) return e;
+ }
+ if (p->_matcher) {
+ e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__ErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ErrorLog *p = (struct __pyx_obj_4lxml_5etree__ErrorLog *)o;
- __pyx_tp_clear_4lxml_5etree__ListErrorLog(o);
- Py_CLEAR(p->_logContexts);
+static int __pyx_tp_clear_4lxml_5etree__SaxParserContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__SaxParserContext *p = (struct __pyx_obj_4lxml_5etree__SaxParserContext *)o;
+ __pyx_tp_clear_4lxml_5etree__ParserContext(o);
+ Py_CLEAR(p->_target);
+ Py_CLEAR(p->_parser);
+ Py_CLEAR(p->_ns_stack);
+ Py_CLEAR(p->_node_stack);
+ Py_CLEAR(p->events_iterator);
+ Py_CLEAR(p->_root);
+ Py_CLEAR(p->_matcher);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ErrorLog[] = {
- {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_7clear, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_9copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_ErrorLog_8copy)},
- {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_9_ErrorLog_13receive, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__SaxParserContext[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ErrorLog = {
+static PyTypeObject __pyx_type_4lxml_5etree__SaxParserContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ErrorLog"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ErrorLog), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._SaxParserContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__SaxParserContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ErrorLog, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__SaxParserContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ErrorLog, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ErrorLog, /*tp_clear*/
+ __Pyx_DOCSTR("This class maps SAX2 events to parser target events.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__SaxParserContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__SaxParserContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_9_ErrorLog_11__iter__, /*tp_iter*/
+ 0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ErrorLog, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__SaxParserContext, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_9_ErrorLog_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ErrorLog, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__SaxParserContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy __pyx_vtable_4lxml_5etree__ReadOnlyPIProxy;
+static struct __pyx_vtabstruct_4lxml_5etree__TargetParserContext __pyx_vtable_4lxml_5etree__TargetParserContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyProxy(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__TargetParserContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__TargetParserContext *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__SaxParserContext(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy;
+ p = ((struct __pyx_obj_4lxml_5etree__TargetParserContext *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__TargetParserContext;
+ p->_python_target = Py_None; Py_INCREF(Py_None);
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_16_ReadOnlyPIProxy_target(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_16_ReadOnlyPIProxy_6target_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree__TargetParserContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__TargetParserContext *p = (struct __pyx_obj_4lxml_5etree__TargetParserContext *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_python_target);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__SaxParserContext(o);
}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ReadOnlyPIProxy[] = {
- {(char *)"target", __pyx_getprop_4lxml_5etree_16_ReadOnlyPIProxy_target, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
+static int __pyx_tp_traverse_4lxml_5etree__TargetParserContext(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__TargetParserContext *p = (struct __pyx_obj_4lxml_5etree__TargetParserContext *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__SaxParserContext(o, v, a); if (e) return e;
+ if (p->_python_target) {
+ e = (*v)(p->_python_target, a); if (e) return e;
+ }
+ return 0;
+}
-static PyTypeObject __pyx_type_4lxml_5etree__ReadOnlyPIProxy = {
+static int __pyx_tp_clear_4lxml_5etree__TargetParserContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__TargetParserContext *p = (struct __pyx_obj_4lxml_5etree__TargetParserContext *)o;
+ __pyx_tp_clear_4lxml_5etree__SaxParserContext(o);
+ Py_CLEAR(p->_python_target);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_4lxml_5etree__TargetParserContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ReadOnlyPIProxy"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._TargetParserContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__TargetParserContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__TargetParserContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A read-only proxy for processing instructions (for internal use only!)"), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
+ __Pyx_DOCSTR("This class maps SAX2 events to the ET parser target interface.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__TargetParserContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__TargetParserContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
0, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ReadOnlyPIProxy, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ReadOnlyPIProxy, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__TargetParserContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__XSLTResultTree __pyx_vtable_4lxml_5etree__XSLTResultTree;
+static struct __pyx_vtabstruct_4lxml_5etree__ParserSchemaValidationContext __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResultTree(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XSLTResultTree *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ElementTree(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementTree*)__pyx_vtabptr_4lxml_5etree__XSLTResultTree;
- p->_xslt = ((struct __pyx_obj_4lxml_5etree_XSLT *)Py_None); Py_INCREF(Py_None);
- p->_profile = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_15_XSLTResultTree_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext;
+ p->_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_30_ParserSchemaValidationContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__XSLTResultTree(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XSLTResultTree *p = (struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__ParserSchemaValidationContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_xslt);
- Py_CLEAR(p->_profile);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__ElementTree(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_30_ParserSchemaValidationContext_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_schema);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__XSLTResultTree(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ParserSchemaValidationContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__XSLTResultTree *p = (struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o;
- e = __pyx_tp_traverse_4lxml_5etree__ElementTree(o, v, a); if (e) return e;
- if (p->_xslt) {
- e = (*v)(((PyObject*)p->_xslt), a); if (e) return e;
- }
- if (p->_profile) {
- e = (*v)(((PyObject*)p->_profile), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o;
+ if (p->_schema) {
+ e = (*v)(((PyObject*)p->_schema), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__XSLTResultTree(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XSLTResultTree *p = (struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o;
- __pyx_tp_clear_4lxml_5etree__ElementTree(o);
- Py_CLEAR(p->_xslt);
- Py_CLEAR(p->_profile);
+static int __pyx_tp_clear_4lxml_5etree__ParserSchemaValidationContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o;
+ Py_CLEAR(p->_schema);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_15_XSLTResultTree_xslt_profile(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_15_XSLTResultTree_12xslt_profile_1__get__(o);
-}
-
-static int __pyx_setprop_4lxml_5etree_15_XSLTResultTree_xslt_profile(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- PyErr_SetString(PyExc_NotImplementedError, "__set__");
- return -1;
- }
- else {
- return __pyx_pw_4lxml_5etree_15_XSLTResultTree_12xslt_profile_3__del__(o);
- }
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__XSLTResultTree[] = {
- {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_4lxml_5etree_15_XSLTResultTree_5__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__ParserSchemaValidationContext[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__XSLTResultTree[] = {
- {(char *)"xslt_profile", __pyx_getprop_4lxml_5etree_15_XSLTResultTree_xslt_profile, __pyx_setprop_4lxml_5etree_15_XSLTResultTree_xslt_profile, __Pyx_DOCSTR(__pyx_k_Return_an_ElementTree_with_profi), 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyBufferProcs __pyx_tp_as_buffer__XSLTResultTree = {
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getreadbuffer*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getwritebuffer*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getsegcount*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*bf_getcharbuffer*/
- #endif
- #if PY_VERSION_HEX >= 0x02060000
- __pyx_pw_4lxml_5etree_15_XSLTResultTree_7__getbuffer__, /*bf_getbuffer*/
- #endif
- #if PY_VERSION_HEX >= 0x02060000
- __pyx_pw_4lxml_5etree_15_XSLTResultTree_9__releasebuffer__, /*bf_releasebuffer*/
- #endif
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__XSLTResultTree = {
+static PyTypeObject __pyx_type_4lxml_5etree__ParserSchemaValidationContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XSLTResultTree"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XSLTResultTree), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ParserSchemaValidationContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__XSLTResultTree, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ParserSchemaValidationContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
- __pyx_pw_4lxml_5etree_15_XSLTResultTree_3__str__, /*tp_str*/
+ 0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- &__pyx_tp_as_buffer__XSLTResultTree, /*tp_as_buffer*/
+ 0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XSLTResultTree, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XSLTResultTree, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__ParserSchemaValidationContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ParserSchemaValidationContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__XSLTResultTree, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ParserSchemaValidationContext, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__XSLTResultTree, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XSLTResultTree, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__Validator __pyx_vtable_4lxml_5etree__Validator;
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementTextIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ElementTextIterator *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__Validator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__Validator *p;
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o);
- p->_nextEvent = Py_None; Py_INCREF(Py_None);
- p->_start_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_19ElementTextIterator_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree__Validator *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__Validator;
+ p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_10_Validator_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_ElementTextIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementTextIterator *p = (struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__Validator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__Validator *p = (struct __pyx_obj_4lxml_5etree__Validator *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_nextEvent);
- Py_CLEAR(p->_start_element);
+ Py_CLEAR(p->_error_log);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_ElementTextIterator(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__Validator(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_ElementTextIterator *p = (struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o;
- if (p->_nextEvent) {
- e = (*v)(p->_nextEvent, a); if (e) return e;
- }
- if (p->_start_element) {
- e = (*v)(((PyObject*)p->_start_element), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__Validator *p = (struct __pyx_obj_4lxml_5etree__Validator *)o;
+ if (p->_error_log) {
+ e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_ElementTextIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementTextIterator *p = (struct __pyx_obj_4lxml_5etree_ElementTextIterator *)o;
- Py_CLEAR(p->_nextEvent);
- Py_CLEAR(p->_start_element);
+static int __pyx_tp_clear_4lxml_5etree__Validator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__Validator *p = (struct __pyx_obj_4lxml_5etree__Validator *)o;
+ Py_CLEAR(p->_error_log);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ElementTextIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyObject *__pyx_getprop_4lxml_5etree_10_Validator_error_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_10_Validator_9error_log_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__Validator[] = {
+ {__Pyx_NAMESTR("validate"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_3validate, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10_Validator_2validate)},
+ {__Pyx_NAMESTR("assertValid"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_5assertValid, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10_Validator_4assertValid)},
+ {__Pyx_NAMESTR("assert_"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_7assert_, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10_Validator_6assert_)},
+ {__Pyx_NAMESTR("_append_log_message"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("_clear_error_log"), (PyCFunction)__pyx_pw_4lxml_5etree_10_Validator_11_clear_error_log, METH_NOARGS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_ElementTextIterator = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__Validator[] = {
+ {(char *)"error_log", __pyx_getprop_4lxml_5etree_10_Validator_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_log_of_validation_errors_and), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__Validator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ElementTextIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ElementTextIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._Validator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__Validator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_ElementTextIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Validator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ElementTextIterator(self, element, tag=None, with_tail=True)\n Iterates over the text content of a subtree.\n\n You can pass the ``tag`` keyword argument to restrict text content to a\n specific tag name.\n\n You can set the ``with_tail`` keyword argument to ``False`` to skip over\n tail text (e.g. if you know that it's only whitespace from pretty-printing).\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_ElementTextIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_ElementTextIterator, /*tp_clear*/
+ __Pyx_DOCSTR("Base class for XML validators."), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_19ElementTextIterator_3__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_19ElementTextIterator_5__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ElementTextIterator, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree__Validator, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__Validator, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ElementTextIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__Validator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementIterator __pyx_vtable_4lxml_5etree__ElementIterator;
+static struct __pyx_vtabstruct_4lxml_5etree_XMLSchema __pyx_vtable_4lxml_5etree_XMLSchema;
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct LxmlElementIterator *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ElementTagMatcher(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_XMLSchema(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XMLSchema *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct LxmlElementIterator *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher*)__pyx_vtabptr_4lxml_5etree__ElementIterator;
- p->_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_XMLSchema;
+ if (unlikely(__pyx_pw_4lxml_5etree_9XMLSchema_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ElementIterator(PyObject *o) {
- struct LxmlElementIterator *p = (struct LxmlElementIterator *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_XMLSchema(PyObject *o) {
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_node);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__ElementTagMatcher(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ElementIterator(PyObject *o, visitproc v, void *a) {
- int e;
- struct LxmlElementIterator *p = (struct LxmlElementIterator *)o;
- e = __pyx_tp_traverse_4lxml_5etree__ElementTagMatcher(o, v, a); if (e) return e;
- if (p->_node) {
- e = (*v)(((PyObject*)p->_node), a); if (e) return e;
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_9XMLSchema_5__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
}
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ElementIterator(PyObject *o) {
- struct LxmlElementIterator *p = (struct LxmlElementIterator *)o;
- __pyx_tp_clear_4lxml_5etree__ElementTagMatcher(o);
- Py_CLEAR(p->_node);
- return 0;
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__Validator(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ElementIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_16_ElementIterator_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree_XMLSchema[] = {
{0, 0, 0, 0}
};
-DL_EXPORT(PyTypeObject) LxmlElementIteratorType = {
+static PyTypeObject __pyx_type_4lxml_5etree_XMLSchema = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ElementIterator"), /*tp_name*/
- sizeof(struct LxmlElementIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XMLSchema"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XMLSchema), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_XMLSchema, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_9XMLSchema_7__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("\n Dead but public. :)\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementIterator, /*tp_clear*/
+ __Pyx_DOCSTR("XMLSchema(self, etree=None, file=None)\n Turn a document into an XML Schema validator.\n\n Either pass a schema as Element or ElementTree, or pass a file or\n filename through the ``file`` keyword argument.\n\n Passing the ``attribute_defaults`` boolean option will make the\n schema insert default/fixed attributes into validated documents.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_16_ElementIterator_1__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_16_ElementIterator_3__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ElementIterator, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_XMLSchema, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_9XMLSchema_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ElementIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XMLSchema, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext __pyx_vtable_4lxml_5etree__ParserDictionaryContext;
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementBase(PyTypeObject *t, PyObject *a, PyObject *k) {
- PyObject *o = __pyx_tp_new_4lxml_5etree__Element(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ParserDictionaryContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ParserDictionaryContext;
+ p->_default_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
+ p->_implied_parser_contexts = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_24_ParserDictionaryContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ElementBase[] = {
+static void __pyx_tp_dealloc_4lxml_5etree__ParserDictionaryContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o;
+ PyObject_GC_UnTrack(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_24_ParserDictionaryContext_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_default_parser);
+ Py_CLEAR(p->_implied_parser_contexts);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree__ParserDictionaryContext(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o;
+ if (p->_default_parser) {
+ e = (*v)(((PyObject*)p->_default_parser), a); if (e) return e;
+ }
+ if (p->_implied_parser_contexts) {
+ e = (*v)(p->_implied_parser_contexts, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__ParserDictionaryContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o;
+ Py_CLEAR(p->_default_parser);
+ Py_CLEAR(p->_implied_parser_contexts);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__ParserDictionaryContext[] = {
{0, 0, 0, 0}
};
-DL_EXPORT(PyTypeObject) LxmlElementBaseType = {
+static PyTypeObject __pyx_type_4lxml_5etree__ParserDictionaryContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ElementBase"), /*tp_name*/
- sizeof(struct LxmlElementBase), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ParserDictionaryContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ParserDictionaryContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_31__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ElementBase(*children, attrib=None, nsmap=None, **_extra)\n\n The public Element class. All custom Element classes must inherit\n from this one. To create an Element, use the `Element()` factory.\n\n BIG FAT WARNING: Subclasses *must not* override __init__ or\n __new__ as it is absolutely undefined when these objects will be\n created or destroyed. All persistent state of Elements must be\n stored in the underlying XML. If you really need to initialize\n the object after creation, you can implement an ``_init(self)``\n method that will be called directly after object creation.\n\n Subclasses of this class can be instantiated to create a new\n Element. By default, the tag name will be the class name and the\n namespace will be empty. You can modify this with the following\n class attributes:\n\n * TAG - the tag name, possibly containing a namespace in Clark\n notation\n\n * NAMESPACE - the default namespace URI, unless provided as part\n of the TAG attribute.\n\n * HTML - flag if the class is an HTML tag, as opposed to an XML\n tag. This only applies to un-namespaced tags and defaults to\n false (i.e. XML).\n\n * PARSER - the parser that provides the configuration for the\n newly created document. Providing an HTML parser here will\n default to creating an HTML element.\n\n In user code, the latter three are commonly inherited in class\n hierarchies that implement a common namespace.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ParserDictionaryContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ParserDictionaryContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ElementBase, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ParserDictionaryContext, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_11ElementBase_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ElementBase, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ParserDictionaryContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_PyErrorLog __pyx_vtable_4lxml_5etree_PyErrorLog;
+static struct __pyx_vtabstruct_4lxml_5etree__FileReaderContext __pyx_vtable_4lxml_5etree__FileReaderContext;
-static PyObject *__pyx_tp_new_4lxml_5etree_PyErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_PyErrorLog *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__BaseErrorLog(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__FileReaderContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__FileReaderContext *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_PyErrorLog *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree_PyErrorLog;
- p->level_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_map_level = Py_None; Py_INCREF(Py_None);
- p->_log = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__FileReaderContext *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__FileReaderContext;
+ p->_filelike = Py_None; Py_INCREF(Py_None);
+ p->_encoding = Py_None; Py_INCREF(Py_None);
+ p->_url = Py_None; Py_INCREF(Py_None);
+ p->_bytes = Py_None; Py_INCREF(Py_None);
+ p->_exc_context = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_18_FileReaderContext_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_PyErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_PyErrorLog *p = (struct __pyx_obj_4lxml_5etree_PyErrorLog *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__FileReaderContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__FileReaderContext *p = (struct __pyx_obj_4lxml_5etree__FileReaderContext *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->level_map);
- Py_CLEAR(p->_map_level);
- Py_CLEAR(p->_log);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__BaseErrorLog(o);
+ Py_CLEAR(p->_filelike);
+ Py_CLEAR(p->_encoding);
+ Py_CLEAR(p->_url);
+ Py_CLEAR(p->_bytes);
+ Py_CLEAR(p->_exc_context);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_PyErrorLog(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__FileReaderContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_PyErrorLog *p = (struct __pyx_obj_4lxml_5etree_PyErrorLog *)o;
- e = __pyx_tp_traverse_4lxml_5etree__BaseErrorLog(o, v, a); if (e) return e;
- if (p->level_map) {
- e = (*v)(p->level_map, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__FileReaderContext *p = (struct __pyx_obj_4lxml_5etree__FileReaderContext *)o;
+ if (p->_filelike) {
+ e = (*v)(p->_filelike, a); if (e) return e;
}
- if (p->_map_level) {
- e = (*v)(p->_map_level, a); if (e) return e;
+ if (p->_encoding) {
+ e = (*v)(p->_encoding, a); if (e) return e;
}
- if (p->_log) {
- e = (*v)(p->_log, a); if (e) return e;
+ if (p->_url) {
+ e = (*v)(p->_url, a); if (e) return e;
+ }
+ if (p->_bytes) {
+ e = (*v)(p->_bytes, a); if (e) return e;
+ }
+ if (p->_exc_context) {
+ e = (*v)(((PyObject*)p->_exc_context), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_PyErrorLog(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_PyErrorLog *p = (struct __pyx_obj_4lxml_5etree_PyErrorLog *)o;
- __pyx_tp_clear_4lxml_5etree__BaseErrorLog(o);
- Py_CLEAR(p->level_map);
- Py_CLEAR(p->_map_level);
- Py_CLEAR(p->_log);
+static int __pyx_tp_clear_4lxml_5etree__FileReaderContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__FileReaderContext *p = (struct __pyx_obj_4lxml_5etree__FileReaderContext *)o;
+ Py_CLEAR(p->_filelike);
+ Py_CLEAR(p->_encoding);
+ Py_CLEAR(p->_url);
+ Py_CLEAR(p->_bytes);
+ Py_CLEAR(p->_exc_context);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_10PyErrorLog_level_map(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_10PyErrorLog_9level_map_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree_PyErrorLog[] = {
- {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_3copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10PyErrorLog_2copy)},
- {__Pyx_NAMESTR("log"), (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_5log, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10PyErrorLog_4log)},
- {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_10PyErrorLog_7receive, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_10PyErrorLog_6receive)},
+static PyMethodDef __pyx_methods_4lxml_5etree__FileReaderContext[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_PyErrorLog[] = {
- {(char *)"level_map", __pyx_getprop_4lxml_5etree_10PyErrorLog_level_map, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree_PyErrorLog = {
+static PyTypeObject __pyx_type_4lxml_5etree__FileReaderContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.PyErrorLog"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_PyErrorLog), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._FileReaderContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__FileReaderContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_PyErrorLog, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__FileReaderContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_13_BaseErrorLog_5__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("PyErrorLog(self, logger_name=None, logger=None)\n A global error log that connects to the Python stdlib logging package.\n\n The constructor accepts an optional logger name or a readily\n instantiated logger instance.\n\n If you want to change the mapping between libxml2's ErrorLevels and Python\n logging levels, you can modify the level_map dictionary from a subclass.\n\n The default mapping is::\n\n ErrorLevels.WARNING = logging.WARNING\n ErrorLevels.ERROR = logging.ERROR\n ErrorLevels.FATAL = logging.CRITICAL\n\n You can also override the method ``receive()`` that takes a LogEntry\n object and calls ``self.log(log_entry, format_string, arg1, arg2, ...)``\n with appropriate data.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_PyErrorLog, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_PyErrorLog, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__FileReaderContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__FileReaderContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_PyErrorLog, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__FileReaderContext, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_PyErrorLog, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_10PyErrorLog_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_PyErrorLog, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__FileReaderContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_DTD __pyx_vtable_4lxml_5etree_DTD;
+static struct __pyx_vtabstruct_4lxml_5etree__FeedParser __pyx_vtable_4lxml_5etree__FeedParser;
-static PyObject *__pyx_tp_new_4lxml_5etree_DTD(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_DTD *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__FeedParser(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__FeedParser *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__BaseParser(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_DTD *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_DTD;
+ p = ((struct __pyx_obj_4lxml_5etree__FeedParser *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree__FeedParser;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_DTD(PyObject *o) {
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_3DTD_13__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__Validator(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_3DTD_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_3DTD_4name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_3DTD_external_id(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_3DTD_11external_id_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_3DTD_system_url(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_3DTD_10system_url_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_11_FeedParser_feed_error_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_11_FeedParser_14feed_error_log_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_DTD[] = {
- {__Pyx_NAMESTR("iterelements"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_3iterelements, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("elements"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_6elements, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("iterentities"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_8iterentities, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("entities"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_11entities, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__FeedParser[] = {
+ {__Pyx_NAMESTR("feed"), (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_1feed, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_FeedParser_feed)},
+ {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_4lxml_5etree_11_FeedParser_3close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11_FeedParser_2close)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_DTD[] = {
- {(char *)"name", __pyx_getprop_4lxml_5etree_3DTD_name, 0, 0, 0},
- {(char *)"external_id", __pyx_getprop_4lxml_5etree_3DTD_external_id, 0, 0, 0},
- {(char *)"system_url", __pyx_getprop_4lxml_5etree_3DTD_system_url, 0, 0, 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__FeedParser[] = {
+ {(char *)"feed_error_log", __pyx_getprop_4lxml_5etree_11_FeedParser_feed_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_error_log_of_the_last_or_cur), 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_DTD = {
+static PyTypeObject __pyx_type_4lxml_5etree__FeedParser = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.DTD"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_DTD), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._FeedParser"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__FeedParser), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_DTD, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_3DTD_15__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("DTD(self, file=None, external_id=None)\n A DTD validator.\n\n Can load from filesystem directly given a filename or file-like object.\n Alternatively, pass the keyword parameter ``external_id`` to load from a\n catalog.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_DTD, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__FeedParser, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_DTD, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__FeedParser, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_3DTD_1__init__, /*tp_init*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_11_BaseParser_1__init__, /*tp_init*/
+ #else
+ 0, /*tp_init*/
+ #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_DTD, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__FeedParser, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_iterparse __pyx_vtable_4lxml_5etree_iterparse;
+static struct __pyx_vtabstruct_4lxml_5etree_XMLParser __pyx_vtable_4lxml_5etree_XMLParser;
-static PyObject *__pyx_tp_new_4lxml_5etree_iterparse(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_iterparse *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree_XMLParser(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XMLParser *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__FeedParser(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_iterparse *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_iterparse;
- p->_parser = ((struct __pyx_obj_4lxml_5etree__FeedParser *)Py_None); Py_INCREF(Py_None);
- p->_tag = Py_None; Py_INCREF(Py_None);
- p->_events = Py_None; Py_INCREF(Py_None);
- p->root = Py_None; Py_INCREF(Py_None);
- p->_source = Py_None; Py_INCREF(Py_None);
- p->_filename = Py_None; Py_INCREF(Py_None);
- p->_error = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree_XMLParser *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_XMLParser;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_iterparse(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_iterparse *p = (struct __pyx_obj_4lxml_5etree_iterparse *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_parser);
- Py_CLEAR(p->_tag);
- Py_CLEAR(p->_events);
- Py_CLEAR(p->root);
- Py_CLEAR(p->_source);
- Py_CLEAR(p->_filename);
- Py_CLEAR(p->_error);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree_iterparse(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree_iterparse *p = (struct __pyx_obj_4lxml_5etree_iterparse *)o;
- if (p->_parser) {
- e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
- }
- if (p->_tag) {
- e = (*v)(p->_tag, a); if (e) return e;
- }
- if (p->_events) {
- e = (*v)(p->_events, a); if (e) return e;
- }
- if (p->root) {
- e = (*v)(p->root, a); if (e) return e;
- }
- if (p->_source) {
- e = (*v)(p->_source, a); if (e) return e;
- }
- if (p->_filename) {
- e = (*v)(p->_filename, a); if (e) return e;
- }
- if (p->_error) {
- e = (*v)(p->_error, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree_iterparse(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_iterparse *p = (struct __pyx_obj_4lxml_5etree_iterparse *)o;
- Py_CLEAR(p->_parser);
- Py_CLEAR(p->_tag);
- Py_CLEAR(p->_events);
- Py_CLEAR(p->root);
- Py_CLEAR(p->_source);
- Py_CLEAR(p->_filename);
- Py_CLEAR(p->_error);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9iterparse_error_log(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9iterparse_9error_log_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_9iterparse_root(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_9iterparse_4root_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree_iterparse[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_9iterparse_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree_XMLParser[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_iterparse[] = {
- {(char *)"error_log", __pyx_getprop_4lxml_5etree_9iterparse_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_error_log_of_the_last_or_cur_2), 0},
- {(char *)"root", __pyx_getprop_4lxml_5etree_9iterparse_root, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree_iterparse = {
+static PyTypeObject __pyx_type_4lxml_5etree_XMLParser = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.iterparse"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_iterparse), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XMLParser"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XMLParser), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_iterparse, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("iterparse(self, source, events=(\"end\",), tag=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, remove_blank_text=False, remove_comments=False, remove_pis=False, encoding=None, html=False, recover=None, huge_tree=False, schema=None)\n\n Incremental parser.\n\n Parses XML into a tree and generates tuples (event, element) in a\n SAX-like fashion. ``event`` is any of 'start', 'end', 'start-ns',\n 'end-ns'.\n\n For 'start' and 'end', ``element`` is the Element that the parser just\n found opening or closing. For 'start-ns', it is a tuple (prefix, URI) of\n a new namespace declaration. For 'end-ns', it is simply None. Note that\n all start and end events are guaranteed to be properly nested.\n\n The keyword argument ``events`` specifies a sequence of event type names\n that should be generated. By default, only 'end' events will be\n generated.\n\n The additional ``tag`` argument restricts the 'start' and 'end' events to\n those elements that match the given tag. By default, events are generated\n for all elements. Note that the 'start-ns' and 'end-ns' events are not\n impacted by this restriction.\n\n The other keyword arguments in the constructor are mainly based on the\n libxml2 parser configuration. A DTD will also be loaded if validation or\n attribute default values are requested.\n\n Available boolean keyword arguments:\n - attribute_defaults: read default attributes from DTD\n - dtd_validation: validate (if DTD is available)\n - load_dtd: use DTD for parsing\n - no_network: prevent network access for related files\n - remove_blank_text: discard blank text nodes\n - remove_comments: discard comments\n - remove_pis: discard processing instructions\n - strip_cdata: replace CDATA sections by normal text content (default: True)\n - compact: safe memory for short text content (default: True)\n - resolve_entities: replace entities by their text value (default: True)\n - huge_tree: disable security restrictions and support very deep trees\n and very long text content (only affects libxml2 2.7+)\n - html: parse input as HTML (default: XML)\n - recover: try hard to parse through broken input (default: True for HTML,\n False otherwise)\n\n Other keyword arguments:\n - encoding: override the document encoding\n - schema: an XMLSchema to validate against\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_iterparse, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_iterparse, /*tp_clear*/
+ __Pyx_DOCSTR("XMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, XMLSchema schema=None, remove_blank_text=False, resolve_entities=True, remove_comments=False, remove_pis=False, strip_cdata=True, target=None, compact=True)\n\n The XML parser.\n\n Parsers can be supplied as additional argument to various parse\n functions of the lxml API. A default parser is always available\n and can be replaced by a call to the global function\n 'set_default_parser'. New parsers can be created at any time\n without a major run-time overhead.\n\n The keyword arguments in the constructor are mainly based on the\n libxml2 parser configuration. A DTD will also be loaded if DTD\n validation or attribute default values are requested (unless you\n additionally provide an XMLSchema from which the default\n attributes can be read).\n\n Available boolean keyword arguments:\n\n - attribute_defaults - inject default attributes from DTD or XMLSchema\n - dtd_validation - validate against a DTD referenced by the document\n - load_dtd - use DTD for parsing\n - no_network - prevent network access for related files (default: True)\n - ns_clean - clean up redundant namespace declarations\n - recover - try hard to parse through broken XML\n - remove_blank_text - discard blank text nodes\n - remove_comments - discard comments\n - remove_pis - discard processing instructions\n - strip_cdata - replace CDATA sections by normal text content (default: True)\n - compact - safe memory for short text content (default: True)\n - resolve_entities - replace entities by their text value (default: True)\n - huge_tree - disable security restrictions and support very deep trees\n and very long text content (only affects libxml2 2.7+)\n\n Other keyword arguments:\n\n - encoding - override the document encoding\n - target - a parser target object that will receive the parse events\n - schema - an XMLSchema to validate against\n\n Note that you should avoid sharing parsers between threads. While this is\n not harmful, it is more efficient to use separate parsers. This does not\n apply to the default parser.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_9iterparse_3__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_9iterparse_5__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_iterparse, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_XMLParser, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_iterparse, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_9iterparse_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_9XMLParser_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_iterparse, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XMLParser, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_XMLPullParser __pyx_vtable_4lxml_5etree_XMLPullParser;
-static struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *__pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[8];
-static int __pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_2_iterelements(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
+static PyObject *__pyx_tp_new_4lxml_5etree_XMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XMLPullParser *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_XMLParser(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_XMLPullParser *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_XMLPullParser;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_2_iterelements(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements))) {
- __pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
-}
-
-static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_2_iterelements(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o;
- if (p->__pyx_v_node) {
- e = (*v)(((PyObject*)p->__pyx_v_node), a); if (e) return e;
- }
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_2_iterelements(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o;
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_self);
- return 0;
-}
+static PyMethodDef __pyx_methods_4lxml_5etree_XMLPullParser[] = {
+ {__Pyx_NAMESTR("read_events"), (PyCFunction)__pyx_pw_4lxml_5etree_13XMLPullParser_3read_events, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
-static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements = {
+static PyTypeObject __pyx_type_4lxml_5etree_XMLPullParser = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct_2_iterelements"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XMLPullParser"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XMLPullParser), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("XMLPullParser(self, events=None, *, tag=None, **kwargs)\n\n XML parser that collects parse events in an iterator.\n\n The collected events are the same as for iterparse(), but the\n parser itself is non-blocking in the sense that it receives\n data chunks incrementally through its .feed() method, instead\n of reading them directly from a file(-like) object all by itself.\n\n By default, it collects Element end events. To change that,\n pass any subset of the available events into the ``events``\n argument: ``'start'``, ``'end'``, ``'start-ns'``,\n ``'end-ns'``, ``'comment'``, ``'pi'``.\n\n To support loading external dependencies relative to the input\n source, you can pass the ``base_url``.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_XMLPullParser, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_13XMLPullParser_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XMLPullParser, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext __pyx_vtable_4lxml_5etree__XSLTResolverContext;
+static struct __pyx_vtabstruct_4lxml_5etree_ETCompatXMLParser __pyx_vtable_4lxml_5etree_ETCompatXMLParser;
-static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResolverContext(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ResolverContext(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_ETCompatXMLParser(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ETCompatXMLParser *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_XMLParser(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__XSLTResolverContext;
- p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree_ETCompatXMLParser *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_ETCompatXMLParser;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__XSLTResolverContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p = (struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_parser);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__ResolverContext(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__XSLTResolverContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p = (struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o;
- e = __pyx_tp_traverse_4lxml_5etree__ResolverContext(o, v, a); if (e) return e;
- if (p->_parser) {
- e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__XSLTResolverContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p = (struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o;
- __pyx_tp_clear_4lxml_5etree__ResolverContext(o);
- Py_CLEAR(p->_parser);
- return 0;
-}
+static PyMethodDef __pyx_methods_4lxml_5etree_ETCompatXMLParser[] = {
+ {0, 0, 0, 0}
+};
-static PyTypeObject __pyx_type_4lxml_5etree__XSLTResolverContext = {
+static PyTypeObject __pyx_type_4lxml_5etree_ETCompatXMLParser = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._XSLTResolverContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__XSLTResolverContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ETCompatXMLParser"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ETCompatXMLParser), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__XSLTResolverContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__XSLTResolverContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__XSLTResolverContext, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("ETCompatXMLParser(self, encoding=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, ns_clean=False, recover=False, schema=None, huge_tree=False, remove_blank_text=False, resolve_entities=True, remove_comments=True, remove_pis=True, strip_cdata=True, target=None, compact=True)\n\n An XML parser with an ElementTree compatible default setup.\n\n See the XMLParser class for details.\n\n This parser has ``remove_comments`` and ``remove_pis`` enabled by default\n and thus ignores comments and processing instructions.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_ETCompatXMLParser, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_17ETCompatXMLParser_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__XSLTResolverContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ETCompatXMLParser, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ParserDictionaryContext __pyx_vtable_4lxml_5etree__ParserDictionaryContext;
+static struct __pyx_vtabstruct_4lxml_5etree_HTMLParser __pyx_vtable_4lxml_5etree_HTMLParser;
-static PyObject *__pyx_tp_new_4lxml_5etree__ParserDictionaryContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree_HTMLParser(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_HTMLParser *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__FeedParser(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ParserDictionaryContext;
- p->_default_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
- p->_implied_parser_contexts = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_24_ParserDictionaryContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree_HTMLParser *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_HTMLParser;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ParserDictionaryContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o;
- PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_24_ParserDictionaryContext_3__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
- }
- Py_CLEAR(p->_default_parser);
- Py_CLEAR(p->_implied_parser_contexts);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ParserDictionaryContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o;
- if (p->_default_parser) {
- e = (*v)(((PyObject*)p->_default_parser), a); if (e) return e;
- }
- if (p->_implied_parser_contexts) {
- e = (*v)(p->_implied_parser_contexts, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ParserDictionaryContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *p = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)o;
- Py_CLEAR(p->_default_parser);
- Py_CLEAR(p->_implied_parser_contexts);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__ParserDictionaryContext[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_HTMLParser[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ParserDictionaryContext = {
+static PyTypeObject __pyx_type_4lxml_5etree_HTMLParser = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ParserDictionaryContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.HTMLParser"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_HTMLParser), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ParserDictionaryContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ParserDictionaryContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ParserDictionaryContext, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("HTMLParser(self, encoding=None, remove_blank_text=False, remove_comments=False, remove_pis=False, strip_cdata=True, no_network=True, target=None, XMLSchema schema=None, recover=True, compact=True)\n\n The HTML parser.\n\n This parser allows reading HTML into a normal XML tree. By\n default, it can read broken (non well-formed) HTML, depending on\n the capabilities of libxml2. Use the 'recover' option to switch\n this off.\n\n Available boolean keyword arguments:\n\n - recover - try hard to parse through broken HTML (default: True)\n - no_network - prevent network access for related files (default: True)\n - remove_blank_text - discard empty text nodes\n - remove_comments - discard comments\n - remove_pis - discard processing instructions\n - strip_cdata - replace CDATA sections by normal text content (default: True)\n - compact - safe memory for short text content (default: True)\n\n Other keyword arguments:\n\n - encoding - override the document encoding\n - target - a parser target object that will receive the parse events\n - schema - an XMLSchema to validate against\n\n Note that you should avoid sharing parsers between threads for performance\n reasons.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ParserDictionaryContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_HTMLParser, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_10HTMLParser_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ParserDictionaryContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_HTMLParser, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_iterwalk __pyx_vtable_4lxml_5etree_iterwalk;
+static struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser __pyx_vtable_4lxml_5etree_HTMLPullParser;
-static PyObject *__pyx_tp_new_4lxml_5etree_iterwalk(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_iterwalk *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree_HTMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_HTMLPullParser *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_HTMLParser(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_iterwalk *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_iterwalk;
- p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
- p->_node_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_events = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->_pop_event = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree_HTMLPullParser *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_HTMLPullParser;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_iterwalk(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_iterwalk *p = (struct __pyx_obj_4lxml_5etree_iterwalk *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_matcher);
- Py_CLEAR(p->_node_stack);
- Py_CLEAR(p->_events);
- Py_CLEAR(p->_pop_event);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree_iterwalk(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree_iterwalk *p = (struct __pyx_obj_4lxml_5etree_iterwalk *)o;
- if (p->_matcher) {
- e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
- }
- if (p->_node_stack) {
- e = (*v)(p->_node_stack, a); if (e) return e;
- }
- if (p->_events) {
- e = (*v)(p->_events, a); if (e) return e;
- }
- if (p->_pop_event) {
- e = (*v)(p->_pop_event, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree_iterwalk(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_iterwalk *p = (struct __pyx_obj_4lxml_5etree_iterwalk *)o;
- Py_CLEAR(p->_matcher);
- Py_CLEAR(p->_node_stack);
- Py_CLEAR(p->_events);
- Py_CLEAR(p->_pop_event);
- return 0;
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree_iterwalk[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_8iterwalk_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree_HTMLPullParser[] = {
+ {__Pyx_NAMESTR("read_events"), (PyCFunction)__pyx_pw_4lxml_5etree_14HTMLPullParser_3read_events, METH_NOARGS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_iterwalk = {
+static PyTypeObject __pyx_type_4lxml_5etree_HTMLPullParser = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.iterwalk"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_iterwalk), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.HTMLPullParser"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_HTMLPullParser), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_iterwalk, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("iterwalk(self, element_or_tree, events=(\"end\",), tag=None)\n\n A tree walker that generates events from an existing tree as if it\n was parsing XML data with ``iterparse()``.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_iterwalk, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_iterwalk, /*tp_clear*/
+ __Pyx_DOCSTR("HTMLPullParser(self, events=None, *, tag=None, base_url=None, **kwargs)\n\n HTML parser that collects parse events in an iterator.\n\n The collected events are the same as for iterparse(), but the\n parser itself is non-blocking in the sense that it receives\n data chunks incrementally through its .feed() method, instead\n of reading them directly from a file(-like) object all by itself.\n\n By default, it collects Element end events. To change that,\n pass any subset of the available events into the ``events``\n argument: ``'start'``, ``'end'``, ``'start-ns'``,\n ``'end-ns'``, ``'comment'``, ``'pi'``.\n\n To support loading external dependencies relative to the input\n source, you can pass the ``base_url``.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_8iterwalk_3__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_8iterwalk_5__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_iterwalk, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_HTMLPullParser, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_8iterwalk_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_14HTMLPullParser_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_iterwalk, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_HTMLPullParser, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog __pyx_vtable_4lxml_5etree__DomainErrorLog;
+static struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget __pyx_vtable_4lxml_5etree__SaxParserTarget;
-static PyObject *__pyx_tp_new_4lxml_5etree__DomainErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__DomainErrorLog *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ErrorLog(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__SaxParserTarget(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__SaxParserTarget *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__DomainErrorLog *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__DomainErrorLog;
+ p = ((struct __pyx_obj_4lxml_5etree__SaxParserTarget *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__SaxParserTarget;
+ if (unlikely(__pyx_pw_4lxml_5etree_16_SaxParserTarget_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__DomainErrorLog[] = {
- {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_15_DomainErrorLog_3receive, METH_O, __Pyx_DOCSTR(0)},
+static void __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget(PyObject *o) {
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__SaxParserTarget[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__DomainErrorLog = {
+static PyTypeObject __pyx_type_4lxml_5etree__SaxParserTarget = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._DomainErrorLog"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__DomainErrorLog), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._SaxParserTarget"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__SaxParserTarget), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ErrorLog, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ErrorLog, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ErrorLog, /*tp_clear*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_9_ErrorLog_11__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__DomainErrorLog, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__SaxParserTarget, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_15_DomainErrorLog_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__DomainErrorLog, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__SaxParserTarget, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_AttributeBasedElementClassLookup __pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree_AttributeBasedElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ParseEventsIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup;
- p->_class_mapping = Py_None; Py_INCREF(Py_None);
- p->_pytag = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_32AttributeBasedElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o);
+ p->_events = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_20_ParseEventsIterator_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_AttributeBasedElementClassLookup(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p = (struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__ParseEventsIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p = (struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_class_mapping);
- Py_CLEAR(p->_pytag);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup(o);
+ Py_CLEAR(p->_events);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_AttributeBasedElementClassLookup(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__ParseEventsIterator(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p = (struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o;
- e = __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup(o, v, a); if (e) return e;
- if (p->_class_mapping) {
- e = (*v)(p->_class_mapping, a); if (e) return e;
- }
- if (p->_pytag) {
- e = (*v)(p->_pytag, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p = (struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o;
+ if (p->_events) {
+ e = (*v)(p->_events, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_AttributeBasedElementClassLookup(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *p = (struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup *)o;
- __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup(o);
- Py_CLEAR(p->_class_mapping);
- Py_CLEAR(p->_pytag);
+static int __pyx_tp_clear_4lxml_5etree__ParseEventsIterator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ParseEventsIterator *p = (struct __pyx_obj_4lxml_5etree__ParseEventsIterator *)o;
+ Py_CLEAR(p->_events);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_AttributeBasedElementClassLookup[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__ParseEventsIterator[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_AttributeBasedElementClassLookup = {
+static PyTypeObject __pyx_type_4lxml_5etree__ParseEventsIterator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.AttributeBasedElementClassLookup"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_AttributeBasedElementClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ParseEventsIterator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ParseEventsIterator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ParseEventsIterator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("AttributeBasedElementClassLookup(self, attribute_name, class_mapping, fallback=None)\n Checks an attribute of an Element and looks up the value in a\n class dictionary.\n\n Arguments:\n - attribute name - '{ns}name' style string\n - class mapping - Python dict mapping attribute values to Element classes\n - fallback - optional fallback lookup mechanism\n\n A None key in the class mapping will be checked if the attribute is\n missing.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("A reusable parse events iterator"), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ParseEventsIterator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ParseEventsIterator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_methods*/
+ __pyx_pw_4lxml_5etree_20_ParseEventsIterator_3__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_20_ParseEventsIterator_5__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree__ParseEventsIterator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_32AttributeBasedElementClassLookup_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_AttributeBasedElementClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ParseEventsIterator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_TreeBuilder __pyx_vtable_4lxml_5etree_TreeBuilder;
-static struct __pyx_obj_4lxml_5etree_DocInfo *__pyx_freelist_4lxml_5etree_DocInfo[4];
-static int __pyx_freecount_4lxml_5etree_DocInfo = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree_DocInfo(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_DocInfo *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree_DocInfo > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_DocInfo)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree_DocInfo[--__pyx_freecount_4lxml_5etree_DocInfo];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree_DocInfo));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree_DocInfo *)o);
- p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_7DocInfo_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
+static PyObject *__pyx_tp_new_4lxml_5etree_TreeBuilder(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_TreeBuilder *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__SaxParserTarget(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_TreeBuilder *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget*)__pyx_vtabptr_4lxml_5etree_TreeBuilder;
+ p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
+ p->_factory = Py_None; Py_INCREF(Py_None);
+ p->_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_element_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_element_stack_pop = Py_None; Py_INCREF(Py_None);
+ p->_last = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_DocInfo(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_DocInfo *p = (struct __pyx_obj_4lxml_5etree_DocInfo *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_TreeBuilder(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_TreeBuilder *p = (struct __pyx_obj_4lxml_5etree_TreeBuilder *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_doc);
- if ((__pyx_freecount_4lxml_5etree_DocInfo < 4) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_DocInfo))) {
- __pyx_freelist_4lxml_5etree_DocInfo[__pyx_freecount_4lxml_5etree_DocInfo++] = ((struct __pyx_obj_4lxml_5etree_DocInfo *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->_parser);
+ Py_CLEAR(p->_factory);
+ Py_CLEAR(p->_data);
+ Py_CLEAR(p->_element_stack);
+ Py_CLEAR(p->_element_stack_pop);
+ Py_CLEAR(p->_last);
+ #if CYTHON_COMPILING_IN_CPYTHON
+ if (PyType_IS_GC(Py_TYPE(o)->tp_base))
+ #endif
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_DocInfo(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_TreeBuilder(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_DocInfo *p = (struct __pyx_obj_4lxml_5etree_DocInfo *)o;
- if (p->_doc) {
- e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree_TreeBuilder *p = (struct __pyx_obj_4lxml_5etree_TreeBuilder *)o;
+ e = ((likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) ? ((__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse) ? __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree_TreeBuilder)); if (e) return e;
+ if (p->_parser) {
+ e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
}
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree_DocInfo(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_DocInfo *p = (struct __pyx_obj_4lxml_5etree_DocInfo *)o;
- Py_CLEAR(p->_doc);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_root_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_9root_name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_public_id(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_9public_id_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_system_url(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_10system_url_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_xml_version(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_11xml_version_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_encoding(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_8encoding_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_standalone(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_10standalone_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_URL(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_3URL_1__get__(o);
-}
-
-static int __pyx_setprop_4lxml_5etree_7DocInfo_URL(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_7DocInfo_3URL_3__set__(o, v);
+ if (p->_factory) {
+ e = (*v)(p->_factory, a); if (e) return e;
}
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
+ if (p->_data) {
+ e = (*v)(p->_data, a); if (e) return e;
}
+ if (p->_element_stack) {
+ e = (*v)(p->_element_stack, a); if (e) return e;
+ }
+ if (p->_element_stack_pop) {
+ e = (*v)(p->_element_stack_pop, a); if (e) return e;
+ }
+ if (p->_last) {
+ e = (*v)(((PyObject*)p->_last), a); if (e) return e;
+ }
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_doctype(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_7doctype_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_internalDTD(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_11internalDTD_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_7DocInfo_externalDTD(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_7DocInfo_11externalDTD_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree_TreeBuilder(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_TreeBuilder *p = (struct __pyx_obj_4lxml_5etree_TreeBuilder *)o;
+ if (likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) { if (__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear) __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree_TreeBuilder);
+ Py_CLEAR(p->_parser);
+ Py_CLEAR(p->_factory);
+ Py_CLEAR(p->_data);
+ Py_CLEAR(p->_element_stack);
+ Py_CLEAR(p->_element_stack_pop);
+ Py_CLEAR(p->_last);
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_DocInfo[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_TreeBuilder[] = {
+ {__Pyx_NAMESTR("close"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_3close, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_2close)},
+ {__Pyx_NAMESTR("data"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_5data, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_4data)},
+ {__Pyx_NAMESTR("start"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_7start, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_6start)},
+ {__Pyx_NAMESTR("end"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_9end, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_8end)},
+ {__Pyx_NAMESTR("pi"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_11pi, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_10pi)},
+ {__Pyx_NAMESTR("comment"), (PyCFunction)__pyx_pw_4lxml_5etree_11TreeBuilder_13comment, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_11TreeBuilder_12comment)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_DocInfo[] = {
- {(char *)"root_name", __pyx_getprop_4lxml_5etree_7DocInfo_root_name, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_name_of_the_root_nod), 0},
- {(char *)"public_id", __pyx_getprop_4lxml_5etree_7DocInfo_public_id, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_public_ID_of_the_DOC), 0},
- {(char *)"system_url", __pyx_getprop_4lxml_5etree_7DocInfo_system_url, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_system_ID_of_the_DOC), 0},
- {(char *)"xml_version", __pyx_getprop_4lxml_5etree_7DocInfo_xml_version, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_XML_version_as_decla), 0},
- {(char *)"encoding", __pyx_getprop_4lxml_5etree_7DocInfo_encoding, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_encoding_name_as_dec), 0},
- {(char *)"standalone", __pyx_getprop_4lxml_5etree_7DocInfo_standalone, 0, __Pyx_DOCSTR(__pyx_k_Returns_the_standalone_flag_as_d), 0},
- {(char *)"URL", __pyx_getprop_4lxml_5etree_7DocInfo_URL, __pyx_setprop_4lxml_5etree_7DocInfo_URL, __Pyx_DOCSTR(__pyx_k_The_source_URL_of_the_document_o), 0},
- {(char *)"doctype", __pyx_getprop_4lxml_5etree_7DocInfo_doctype, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_DOCTYPE_declaration_st), 0},
- {(char *)"internalDTD", __pyx_getprop_4lxml_5etree_7DocInfo_internalDTD, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_DTD_validator_based_on), 0},
- {(char *)"externalDTD", __pyx_getprop_4lxml_5etree_7DocInfo_externalDTD, 0, __Pyx_DOCSTR(__pyx_k_Returns_a_DTD_validator_based_on_2), 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree_DocInfo = {
+static PyTypeObject __pyx_type_4lxml_5etree_TreeBuilder = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.DocInfo"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_DocInfo), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.TreeBuilder"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_TreeBuilder), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_DocInfo, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_TreeBuilder, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Document information provided by parser and DTD."), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_DocInfo, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_DocInfo, /*tp_clear*/
+ __Pyx_DOCSTR("TreeBuilder(self, element_factory=None, parser=None)\n Parser target that builds a tree.\n\n The final tree is returned by the ``close()`` method.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_TreeBuilder, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_TreeBuilder, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_DocInfo, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_TreeBuilder, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_DocInfo, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_11TreeBuilder_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_DocInfo, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_TreeBuilder, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__PythonSaxParserTarget __pyx_vtable_4lxml_5etree__PythonSaxParserTarget;
-static PyObject *__pyx_tp_new_4lxml_5etree_XInclude(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XInclude *p;
- PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__PythonSaxParserTarget(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__SaxParserTarget(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XInclude *)o);
- p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__SaxParserTarget*)__pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget;
+ p->_target_start = Py_None; Py_INCREF(Py_None);
+ p->_target_end = Py_None; Py_INCREF(Py_None);
+ p->_target_data = Py_None; Py_INCREF(Py_None);
+ p->_target_doctype = Py_None; Py_INCREF(Py_None);
+ p->_target_pi = Py_None; Py_INCREF(Py_None);
+ p->_target_comment = Py_None; Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_22_PythonSaxParserTarget_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_XInclude(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_XInclude *p = (struct __pyx_obj_4lxml_5etree_XInclude *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__PythonSaxParserTarget(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p = (struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_error_log);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->_target_start);
+ Py_CLEAR(p->_target_end);
+ Py_CLEAR(p->_target_data);
+ Py_CLEAR(p->_target_doctype);
+ Py_CLEAR(p->_target_pi);
+ Py_CLEAR(p->_target_comment);
+ #if CYTHON_COMPILING_IN_CPYTHON
+ if (PyType_IS_GC(Py_TYPE(o)->tp_base))
+ #endif
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__SaxParserTarget(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_XInclude(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__PythonSaxParserTarget(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_XInclude *p = (struct __pyx_obj_4lxml_5etree_XInclude *)o;
- if (p->_error_log) {
- e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p = (struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o;
+ e = ((likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) ? ((__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse) ? __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree__PythonSaxParserTarget)); if (e) return e;
+ if (p->_target_start) {
+ e = (*v)(p->_target_start, a); if (e) return e;
+ }
+ if (p->_target_end) {
+ e = (*v)(p->_target_end, a); if (e) return e;
+ }
+ if (p->_target_data) {
+ e = (*v)(p->_target_data, a); if (e) return e;
+ }
+ if (p->_target_doctype) {
+ e = (*v)(p->_target_doctype, a); if (e) return e;
+ }
+ if (p->_target_pi) {
+ e = (*v)(p->_target_pi, a); if (e) return e;
+ }
+ if (p->_target_comment) {
+ e = (*v)(p->_target_comment, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_XInclude(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_XInclude *p = (struct __pyx_obj_4lxml_5etree_XInclude *)o;
- Py_CLEAR(p->_error_log);
+static int __pyx_tp_clear_4lxml_5etree__PythonSaxParserTarget(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *p = (struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget *)o;
+ if (likely(__pyx_ptype_4lxml_5etree__SaxParserTarget)) { if (__pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear) __pyx_ptype_4lxml_5etree__SaxParserTarget->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree__PythonSaxParserTarget);
+ Py_CLEAR(p->_target_start);
+ Py_CLEAR(p->_target_end);
+ Py_CLEAR(p->_target_data);
+ Py_CLEAR(p->_target_doctype);
+ Py_CLEAR(p->_target_pi);
+ Py_CLEAR(p->_target_comment);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_8XInclude_error_log(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_8XInclude_9error_log_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree_XInclude[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__PythonSaxParserTarget[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XInclude[] = {
- {(char *)"error_log", __pyx_getprop_4lxml_5etree_8XInclude_error_log, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree_XInclude = {
+static PyTypeObject __pyx_type_4lxml_5etree__PythonSaxParserTarget = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XInclude"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XInclude), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._PythonSaxParserTarget"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__PythonSaxParserTarget), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XInclude, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__PythonSaxParserTarget, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_8XInclude_3__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XInclude(self)\n XInclude processor.\n\n Create an instance and call it on an Element to run XInclude\n processing.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_XInclude, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_XInclude, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__PythonSaxParserTarget, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__PythonSaxParserTarget, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XInclude, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__PythonSaxParserTarget, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_XInclude, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_8XInclude_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XInclude, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__PythonSaxParserTarget, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter __pyx_vtable_4lxml_5etree__FilelikeWriter;
-static struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_freelist_4lxml_5etree__DTDAttributeDecl[8];
-static int __pyx_freecount_4lxml_5etree__DTDAttributeDecl = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__DTDAttributeDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__FilelikeWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__FilelikeWriter *p;
PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__DTDAttributeDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDAttributeDecl[--__pyx_freecount_4lxml_5etree__DTDAttributeDecl];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__FilelikeWriter;
+ p->_filelike = Py_None; Py_INCREF(Py_None);
+ p->_close_filelike = Py_None; Py_INCREF(Py_None);
+ p->_exc_context = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)Py_None); Py_INCREF(Py_None);
+ p->error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_15_FilelikeWriter_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o);
- p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__DTDAttributeDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p = (struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__FilelikeWriter(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__FilelikeWriter *p = (struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_dtd);
- if ((__pyx_freecount_4lxml_5etree__DTDAttributeDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl))) {
- __pyx_freelist_4lxml_5etree__DTDAttributeDecl[__pyx_freecount_4lxml_5etree__DTDAttributeDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->_filelike);
+ Py_CLEAR(p->_close_filelike);
+ Py_CLEAR(p->_exc_context);
+ Py_CLEAR(p->error_log);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__DTDAttributeDecl(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__FilelikeWriter(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p = (struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o;
- if (p->_dtd) {
- e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__FilelikeWriter *p = (struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o;
+ if (p->_filelike) {
+ e = (*v)(p->_filelike, a); if (e) return e;
+ }
+ if (p->_close_filelike) {
+ e = (*v)(p->_close_filelike, a); if (e) return e;
+ }
+ if (p->_exc_context) {
+ e = (*v)(((PyObject*)p->_exc_context), a); if (e) return e;
+ }
+ if (p->error_log) {
+ e = (*v)(((PyObject*)p->error_log), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__DTDAttributeDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p = (struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o;
- Py_CLEAR(p->_dtd);
+static int __pyx_tp_clear_4lxml_5etree__FilelikeWriter(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__FilelikeWriter *p = (struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o;
+ Py_CLEAR(p->_filelike);
+ Py_CLEAR(p->_close_filelike);
+ Py_CLEAR(p->_exc_context);
+ Py_CLEAR(p->error_log);
return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_4name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_elemname(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_8elemname_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_prefix(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_6prefix_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_type(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_4type_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_7default_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default_value(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_13default_value_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__DTDAttributeDecl[] = {
- {__Pyx_NAMESTR("itervalues"), (PyCFunction)__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_3itervalues, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_6values, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__FilelikeWriter[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDAttributeDecl[] = {
- {(char *)"name", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_name, 0, 0, 0},
- {(char *)"elemname", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_elemname, 0, 0, 0},
- {(char *)"prefix", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_prefix, 0, 0, 0},
- {(char *)"type", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_type, 0, 0, 0},
- {(char *)"default", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default, 0, 0, 0},
- {(char *)"default_value", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default_value, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__DTDAttributeDecl = {
+static PyTypeObject __pyx_type_4lxml_5etree__FilelikeWriter = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._DTDAttributeDecl"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._FilelikeWriter"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__FilelikeWriter), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__DTDAttributeDecl, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__FilelikeWriter, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_1__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__DTDAttributeDecl, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__DTDAttributeDecl, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__FilelikeWriter, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__FilelikeWriter, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__DTDAttributeDecl, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__FilelikeWriter, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__DTDAttributeDecl, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__DTDAttributeDecl, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__FilelikeWriter, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_XMLSchema __pyx_vtable_4lxml_5etree_XMLSchema;
-static PyObject *__pyx_tp_new_4lxml_5etree_XMLSchema(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XMLSchema *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_XMLSchema;
- if (unlikely(__pyx_pw_4lxml_5etree_9XMLSchema_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+static PyObject *__pyx_tp_new_4lxml_5etree_xmlfile(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_xmlfile *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_xmlfile *)o);
+ p->output_file = Py_None; Py_INCREF(Py_None);
+ p->encoding = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->writer = ((struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_XMLSchema(PyObject *o) {
+static void __pyx_tp_dealloc_4lxml_5etree_xmlfile(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_xmlfile *p = (struct __pyx_obj_4lxml_5etree_xmlfile *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_9XMLSchema_5__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
+ Py_CLEAR(p->output_file);
+ Py_CLEAR(p->encoding);
+ Py_CLEAR(p->writer);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree_xmlfile(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree_xmlfile *p = (struct __pyx_obj_4lxml_5etree_xmlfile *)o;
+ if (p->output_file) {
+ e = (*v)(p->output_file, a); if (e) return e;
}
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__Validator(o);
+ if (p->writer) {
+ e = (*v)(((PyObject*)p->writer), a); if (e) return e;
+ }
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XMLSchema[] = {
+static int __pyx_tp_clear_4lxml_5etree_xmlfile(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_xmlfile *p = (struct __pyx_obj_4lxml_5etree_xmlfile *)o;
+ Py_CLEAR(p->output_file);
+ Py_CLEAR(p->writer);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_xmlfile[] = {
+ {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_3__enter__, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_4lxml_5etree_7xmlfile_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_XMLSchema = {
+static PyTypeObject __pyx_type_4lxml_5etree_xmlfile = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XMLSchema"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XMLSchema), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.xmlfile"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_xmlfile), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XMLSchema, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_xmlfile, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_9XMLSchema_7__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("XMLSchema(self, etree=None, file=None)\n Turn a document into an XML Schema validator.\n\n Either pass a schema as Element or ElementTree, or pass a file or\n filename through the ``file`` keyword argument.\n\n Passing the ``attribute_defaults`` boolean option will make the\n schema insert default/fixed attributes into validated documents.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
+ __Pyx_DOCSTR("xmlfile(self, output_file, encoding=None, compression=None)\n\n A simple mechanism for incremental XML serialisation.\n\n Usage example::\n\n with xmlfile(\"somefile.xml\", encoding='utf-8') as xf:\n xf.write_declaration(standalone=True)\n xf.write_doctype('<!DOCTYPE root SYSTEM \"some.dtd\">')\n\n # generate an element (the root element)\n with xf.element('root'):\n # write a complete Element into the open root element\n xf.write(etree.Element('test'))\n\n # generate and write more Elements, e.g. through iterparse\n for element in generate_some_elements():\n # serialise generated elements into the XML file\n xf.write(element)\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_xmlfile, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_xmlfile, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XMLSchema, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_xmlfile, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_9XMLSchema_3__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_7xmlfile_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XMLSchema, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_xmlfile, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator __pyx_vtable_4lxml_5etree__ElementMatchIterator;
+static struct __pyx_vtabstruct_4lxml_5etree__IncrementalFileWriter __pyx_vtable_4lxml_5etree__IncrementalFileWriter;
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementMatchIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__IncrementalFileWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p;
PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
- p->_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
- p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__IncrementalFileWriter;
+ p->_encoding = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_target = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)Py_None); Py_INCREF(Py_None);
+ p->_element_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p = (struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o;
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
- }
- #endif
+static void __pyx_tp_dealloc_4lxml_5etree__IncrementalFileWriter(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p = (struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_node);
- Py_CLEAR(p->_matcher);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_22_IncrementalFileWriter_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_encoding);
+ Py_CLEAR(p->_target);
+ Py_CLEAR(p->_element_stack);
(*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__IncrementalFileWriter(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p = (struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o;
- if (p->_node) {
- e = (*v)(((PyObject*)p->_node), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p = (struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o;
+ if (p->_target) {
+ e = (*v)(((PyObject*)p->_target), a); if (e) return e;
}
- if (p->_matcher) {
- e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
+ if (p->_element_stack) {
+ e = (*v)(p->_element_stack, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__ElementMatchIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ElementMatchIterator *p = (struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)o;
- Py_CLEAR(p->_node);
- Py_CLEAR(p->_matcher);
+static int __pyx_tp_clear_4lxml_5etree__IncrementalFileWriter(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *p = (struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)o;
+ Py_CLEAR(p->_target);
+ Py_CLEAR(p->_element_stack);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ElementMatchIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__IncrementalFileWriter[] = {
+ {__Pyx_NAMESTR("write_declaration"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_5write_declaration, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_4write_declaration)},
+ {__Pyx_NAMESTR("write_doctype"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_7write_doctype, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_6write_doctype)},
+ {__Pyx_NAMESTR("element"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_9element, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_8element)},
+ {__Pyx_NAMESTR("write"), (PyCFunction)__pyx_pw_4lxml_5etree_22_IncrementalFileWriter_11write, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_IncrementalFileWriter_10write)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ElementMatchIterator = {
+static PyTypeObject __pyx_type_4lxml_5etree__IncrementalFileWriter = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ElementMatchIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ElementMatchIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._IncrementalFileWriter"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__IncrementalFileWriter, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__IncrementalFileWriter, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__IncrementalFileWriter, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ElementMatchIterator, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree__IncrementalFileWriter, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ElementMatchIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__IncrementalFileWriter, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator __pyx_vtable_4lxml_5etree_AncestorsIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree_AncestorsIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_AncestorsIterator *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ElementMatchIterator(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_AncestorsIterator *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator*)__pyx_vtabptr_4lxml_5etree_AncestorsIterator;
- if (unlikely(__pyx_pw_4lxml_5etree_17AncestorsIterator_1__cinit__(o, a, k) < 0)) {
+static struct __pyx_obj_4lxml_5etree__FileWriterElement *__pyx_freelist_4lxml_5etree__FileWriterElement[8];
+static int __pyx_freecount_4lxml_5etree__FileWriterElement = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__FileWriterElement(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__FileWriterElement *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree__FileWriterElement > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__FileWriterElement[--__pyx_freecount_4lxml_5etree__FileWriterElement];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree__FileWriterElement *)o);
+ p->_element = Py_None; Py_INCREF(Py_None);
+ p->_writer = ((struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_18_FileWriterElement_1__cinit__(o, a, k) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_AncestorsIterator[] = {
+static void __pyx_tp_dealloc_4lxml_5etree__FileWriterElement(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__FileWriterElement *p = (struct __pyx_obj_4lxml_5etree__FileWriterElement *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_element);
+ Py_CLEAR(p->_writer);
+ if ((__pyx_freecount_4lxml_5etree__FileWriterElement < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement))) {
+ __pyx_freelist_4lxml_5etree__FileWriterElement[__pyx_freecount_4lxml_5etree__FileWriterElement++] = ((struct __pyx_obj_4lxml_5etree__FileWriterElement *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_4lxml_5etree__FileWriterElement(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__FileWriterElement *p = (struct __pyx_obj_4lxml_5etree__FileWriterElement *)o;
+ if (p->_element) {
+ e = (*v)(p->_element, a); if (e) return e;
+ }
+ if (p->_writer) {
+ e = (*v)(((PyObject*)p->_writer), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__FileWriterElement(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__FileWriterElement *p = (struct __pyx_obj_4lxml_5etree__FileWriterElement *)o;
+ Py_CLEAR(p->_element);
+ Py_CLEAR(p->_writer);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__FileWriterElement[] = {
+ {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_4lxml_5etree_18_FileWriterElement_3__enter__, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_AncestorsIterator = {
+static PyTypeObject __pyx_type_4lxml_5etree__FileWriterElement = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.AncestorsIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_AncestorsIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._FileWriterElement"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__FileWriterElement, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("AncestorsIterator(self, node, tag=None)\n Iterates over the ancestors of an element (from parent to parent).\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__FileWriterElement, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__FileWriterElement, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
- #else
0, /*tp_iternext*/
- #endif
- __pyx_methods_4lxml_5etree_AncestorsIterator, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__FileWriterElement, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_AncestorsIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__FileWriterElement, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_HTMLParser __pyx_vtable_4lxml_5etree_HTMLParser;
+static struct __pyx_vtabstruct_4lxml_5etree_iterparse __pyx_vtable_4lxml_5etree_iterparse;
-static PyObject *__pyx_tp_new_4lxml_5etree_HTMLParser(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_HTMLParser *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__FeedParser(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_iterparse(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_iterparse *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_HTMLParser *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_HTMLParser;
+ p = ((struct __pyx_obj_4lxml_5etree_iterparse *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_iterparse;
+ p->_parser = ((struct __pyx_obj_4lxml_5etree__FeedParser *)Py_None); Py_INCREF(Py_None);
+ p->_tag = Py_None; Py_INCREF(Py_None);
+ p->_events = Py_None; Py_INCREF(Py_None);
+ p->root = Py_None; Py_INCREF(Py_None);
+ p->_source = Py_None; Py_INCREF(Py_None);
+ p->_filename = Py_None; Py_INCREF(Py_None);
+ p->_error = Py_None; Py_INCREF(Py_None);
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_HTMLParser[] = {
+static void __pyx_tp_dealloc_4lxml_5etree_iterparse(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_iterparse *p = (struct __pyx_obj_4lxml_5etree_iterparse *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_parser);
+ Py_CLEAR(p->_tag);
+ Py_CLEAR(p->_events);
+ Py_CLEAR(p->root);
+ Py_CLEAR(p->_source);
+ Py_CLEAR(p->_filename);
+ Py_CLEAR(p->_error);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree_iterparse(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree_iterparse *p = (struct __pyx_obj_4lxml_5etree_iterparse *)o;
+ if (p->_parser) {
+ e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
+ }
+ if (p->_tag) {
+ e = (*v)(p->_tag, a); if (e) return e;
+ }
+ if (p->_events) {
+ e = (*v)(p->_events, a); if (e) return e;
+ }
+ if (p->root) {
+ e = (*v)(p->root, a); if (e) return e;
+ }
+ if (p->_source) {
+ e = (*v)(p->_source, a); if (e) return e;
+ }
+ if (p->_filename) {
+ e = (*v)(p->_filename, a); if (e) return e;
+ }
+ if (p->_error) {
+ e = (*v)(p->_error, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree_iterparse(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_iterparse *p = (struct __pyx_obj_4lxml_5etree_iterparse *)o;
+ Py_CLEAR(p->_parser);
+ Py_CLEAR(p->_tag);
+ Py_CLEAR(p->_events);
+ Py_CLEAR(p->root);
+ Py_CLEAR(p->_source);
+ Py_CLEAR(p->_filename);
+ Py_CLEAR(p->_error);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9iterparse_error_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9iterparse_9error_log_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_9iterparse_root(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_9iterparse_4root_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_iterparse[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_9iterparse_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_HTMLParser = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_iterparse[] = {
+ {(char *)"error_log", __pyx_getprop_4lxml_5etree_9iterparse_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_error_log_of_the_last_or_cur_2), 0},
+ {(char *)"root", __pyx_getprop_4lxml_5etree_9iterparse_root, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_iterparse = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.HTMLParser"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_HTMLParser), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.iterparse"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_iterparse), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_iterparse, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("HTMLParser(self, encoding=None, remove_blank_text=False, remove_comments=False, remove_pis=False, strip_cdata=True, no_network=True, target=None, XMLSchema schema=None, recover=True, compact=True)\n\n The HTML parser.\n\n This parser allows reading HTML into a normal XML tree. By\n default, it can read broken (non well-formed) HTML, depending on\n the capabilities of libxml2. Use the 'recover' option to switch\n this off.\n\n Available boolean keyword arguments:\n\n - recover - try hard to parse through broken HTML (default: True)\n - no_network - prevent network access for related files (default: True)\n - remove_blank_text - discard empty text nodes\n - remove_comments - discard comments\n - remove_pis - discard processing instructions\n - strip_cdata - replace CDATA sections by normal text content (default: True)\n - compact - safe memory for short text content (default: True)\n\n Other keyword arguments:\n\n - encoding - override the document encoding\n - target - a parser target object that will receive the parse events\n - schema - an XMLSchema to validate against\n\n Note that you should avoid sharing parsers between threads for performance\n reasons.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
+ __Pyx_DOCSTR("iterparse(self, source, events=(\"end\",), tag=None, attribute_defaults=False, dtd_validation=False, load_dtd=False, no_network=True, remove_blank_text=False, remove_comments=False, remove_pis=False, encoding=None, html=False, recover=None, huge_tree=False, schema=None)\n\n Incremental parser.\n\n Parses XML into a tree and generates tuples (event, element) in a\n SAX-like fashion. ``event`` is any of 'start', 'end', 'start-ns',\n 'end-ns'.\n\n For 'start' and 'end', ``element`` is the Element that the parser just\n found opening or closing. For 'start-ns', it is a tuple (prefix, URI) of\n a new namespace declaration. For 'end-ns', it is simply None. Note that\n all start and end events are guaranteed to be properly nested.\n\n The keyword argument ``events`` specifies a sequence of event type names\n that should be generated. By default, only 'end' events will be\n generated.\n\n The additional ``tag`` argument restricts the 'start' and 'end' events to\n those elements that match the given tag. By default, events are generated\n for all elements. Note that the 'start-ns' and 'end-ns' events are not\n impacted by this restriction.\n\n The other keyword arguments in the constructor are mainly based on the\n libxml2 parser configuration. A DTD will also be loaded if validation or\n attribute default values are requested.\n\n Available boolean keyword arguments:\n - attribute_defaults: read default attributes from DTD\n - dtd_validation: validate (if DTD is available)\n - load_dtd: use DTD for parsing\n - no_network: prevent network access for related files\n - remove_blank_text: discard blank text nodes\n - remove_comments: discard comments\n - remove_pis: discard processing instructions\n - strip_cdata: replace CDATA sections by normal text content (default: True)\n - compact: safe memory for short text content (default: True)\n - resolve_entities: replace entities by their text value (default: True)\n - huge_tree: disable security restrictions and support very deep trees\n and very long text content (only affects libxml2 2.7+)\n - html: parse input as HTML (default: XML)\n - recover: try hard to parse through broken input (default: True for HTML,\n False otherwise)\n\n Other keyword arguments:\n - encoding: override the document encoding\n - schema: an XMLSchema to validate against\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_iterparse, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_iterparse, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_HTMLParser, /*tp_methods*/
+ __pyx_pw_4lxml_5etree_9iterparse_3__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_9iterparse_5__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_iterparse, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_iterparse, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_10HTMLParser_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_9iterparse_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_HTMLParser, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_iterparse, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_HTMLPullParser __pyx_vtable_4lxml_5etree_HTMLPullParser;
+static struct __pyx_vtabstruct_4lxml_5etree_iterwalk __pyx_vtable_4lxml_5etree_iterwalk;
-static PyObject *__pyx_tp_new_4lxml_5etree_HTMLPullParser(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_HTMLPullParser *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_HTMLParser(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_iterwalk(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_iterwalk *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_HTMLPullParser *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseParser*)__pyx_vtabptr_4lxml_5etree_HTMLPullParser;
+ p = ((struct __pyx_obj_4lxml_5etree_iterwalk *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_iterwalk;
+ p->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)Py_None); Py_INCREF(Py_None);
+ p->_node_stack = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_events = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_pop_event = Py_None; Py_INCREF(Py_None);
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_HTMLPullParser[] = {
- {__Pyx_NAMESTR("read_events"), (PyCFunction)__pyx_pw_4lxml_5etree_14HTMLPullParser_3read_events, METH_NOARGS, __Pyx_DOCSTR(0)},
+static void __pyx_tp_dealloc_4lxml_5etree_iterwalk(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_iterwalk *p = (struct __pyx_obj_4lxml_5etree_iterwalk *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_matcher);
+ Py_CLEAR(p->_node_stack);
+ Py_CLEAR(p->_events);
+ Py_CLEAR(p->_pop_event);
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree_iterwalk(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree_iterwalk *p = (struct __pyx_obj_4lxml_5etree_iterwalk *)o;
+ if (p->_matcher) {
+ e = (*v)(((PyObject*)p->_matcher), a); if (e) return e;
+ }
+ if (p->_node_stack) {
+ e = (*v)(p->_node_stack, a); if (e) return e;
+ }
+ if (p->_events) {
+ e = (*v)(p->_events, a); if (e) return e;
+ }
+ if (p->_pop_event) {
+ e = (*v)(p->_pop_event, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree_iterwalk(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_iterwalk *p = (struct __pyx_obj_4lxml_5etree_iterwalk *)o;
+ Py_CLEAR(p->_matcher);
+ Py_CLEAR(p->_node_stack);
+ Py_CLEAR(p->_events);
+ Py_CLEAR(p->_pop_event);
+ return 0;
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_iterwalk[] = {
+ {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_8iterwalk_5__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_HTMLPullParser = {
+static PyTypeObject __pyx_type_4lxml_5etree_iterwalk = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.HTMLPullParser"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_HTMLPullParser), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.iterwalk"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_iterwalk), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__BaseParser, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_iterwalk, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("HTMLPullParser(self, events=None, *, tag=None, base_url=None, **kwargs)\n\n HTML parser that collects parse events in an iterator.\n\n The collected events are the same as for iterparse(), but the\n parser itself is non-blocking in the sense that it receives\n data chunks incrementally through its .feed() method, instead\n of reading them directly from a file(-like) object all by itself.\n\n By default, it collects Element end events. To change that,\n pass any subset of the available events into the ``events``\n argument: ``'start'``, ``'end'``, ``'start-ns'``,\n ``'end-ns'``, ``'comment'``, ``'pi'``.\n\n To support loading external dependencies relative to the input\n source, you can pass the ``base_url``.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__BaseParser, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__BaseParser, /*tp_clear*/
+ __Pyx_DOCSTR("iterwalk(self, element_or_tree, events=(\"end\",), tag=None)\n\n A tree walker that generates events from an existing tree as if it\n was parsing XML data with ``iterparse()``.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_iterwalk, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_iterwalk, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_HTMLPullParser, /*tp_methods*/
+ __pyx_pw_4lxml_5etree_8iterwalk_3__iter__, /*tp_iter*/
+ __pyx_pw_4lxml_5etree_8iterwalk_5__next__, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_iterwalk, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_14HTMLPullParser_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_8iterwalk_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_HTMLPullParser, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_iterwalk, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_ElementNamespaceClassLookup __pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementNamespaceClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup;
- p->_namespace_registries = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+static PyObject *__pyx_tp_new_4lxml_5etree_XInclude(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XInclude *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_XInclude *)o);
+ p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_ElementNamespaceClassLookup(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_XInclude(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_XInclude *p = (struct __pyx_obj_4lxml_5etree_XInclude *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_namespace_registries);
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup(o);
+ Py_CLEAR(p->_error_log);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_tp_traverse_4lxml_5etree_ElementNamespaceClassLookup(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_XInclude(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o;
- e = __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup(o, v, a); if (e) return e;
- if (p->_namespace_registries) {
- e = (*v)(p->_namespace_registries, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree_XInclude *p = (struct __pyx_obj_4lxml_5etree_XInclude *)o;
+ if (p->_error_log) {
+ e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree_ElementNamespaceClassLookup(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup *)o;
- __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup(o);
- Py_CLEAR(p->_namespace_registries);
+static int __pyx_tp_clear_4lxml_5etree_XInclude(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_XInclude *p = (struct __pyx_obj_4lxml_5etree_XInclude *)o;
+ Py_CLEAR(p->_error_log);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ElementNamespaceClassLookup[] = {
- {__Pyx_NAMESTR("get_namespace"), (PyCFunction)__pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_5get_namespace, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_27ElementNamespaceClassLookup_4get_namespace)},
+static PyObject *__pyx_getprop_4lxml_5etree_8XInclude_error_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_8XInclude_9error_log_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_XInclude[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_ElementNamespaceClassLookup = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XInclude[] = {
+ {(char *)"error_log", __pyx_getprop_4lxml_5etree_8XInclude_error_log, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_XInclude = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ElementNamespaceClassLookup"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ElementNamespaceClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XInclude"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XInclude), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_ElementNamespaceClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_XInclude, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_8XInclude_3__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ElementNamespaceClassLookup(self, fallback=None)\n\n Element class lookup scheme that searches the Element class in the\n Namespace registry.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_ElementNamespaceClassLookup, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_ElementNamespaceClassLookup, /*tp_clear*/
+ __Pyx_DOCSTR("XInclude(self)\n XInclude processor.\n\n Create an instance and call it on an Element to run XInclude\n processing.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_XInclude, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_XInclude, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ElementNamespaceClassLookup, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_XInclude, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_XInclude, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_27ElementNamespaceClassLookup_3__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_8XInclude_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ElementNamespaceClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XInclude, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__AppendOnlyElementProxy __pyx_vtable_4lxml_5etree__AppendOnlyElementProxy;
+static struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp __pyx_vtable_4lxml_5etree__ExsltRegExp;
-static PyObject *__pyx_tp_new_4lxml_5etree__AppendOnlyElementProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyElementProxy(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ExsltRegExp(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ExsltRegExp *p;
+ PyObject *o;
+ o = (*t->tp_alloc)(t, 0);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy;
+ p = ((struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ExsltRegExp;
+ p->_compile_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_12_ExsltRegExp_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_23_AppendOnlyElementProxy_text(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_4text_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree__ExsltRegExp(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ExsltRegExp *p = (struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_compile_map);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_setprop_4lxml_5etree_23_AppendOnlyElementProxy_text(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_4text_3__set__(o, v);
- }
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
+static int __pyx_tp_traverse_4lxml_5etree__ExsltRegExp(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__ExsltRegExp *p = (struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o;
+ if (p->_compile_map) {
+ e = (*v)(p->_compile_map, a); if (e) return e;
}
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__AppendOnlyElementProxy[] = {
- {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_1append, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_23_AppendOnlyElementProxy_append)},
- {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pw_4lxml_5etree_23_AppendOnlyElementProxy_3extend, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_23_AppendOnlyElementProxy_2extend)},
- {0, 0, 0, 0}
-};
+static int __pyx_tp_clear_4lxml_5etree__ExsltRegExp(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ExsltRegExp *p = (struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o;
+ Py_CLEAR(p->_compile_map);
+ return 0;
+}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__AppendOnlyElementProxy[] = {
- {(char *)"text", __pyx_getprop_4lxml_5etree_23_AppendOnlyElementProxy_text, __pyx_setprop_4lxml_5etree_23_AppendOnlyElementProxy_text, __Pyx_DOCSTR(__pyx_k_Text_before_the_first_subelement_2), 0},
- {0, 0, 0, 0, 0}
+static PyMethodDef __pyx_methods_4lxml_5etree__ExsltRegExp[] = {
+ {__Pyx_NAMESTR("test"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("match"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("replace"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__AppendOnlyElementProxy = {
+static PyTypeObject __pyx_type_4lxml_5etree__ExsltRegExp = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._AppendOnlyElementProxy"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ExsltRegExp"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ExsltRegExp), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ExsltRegExp, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A read-only element that allows adding children and changing the\n text content (i.e. everything that adds to the subtree).\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ExsltRegExp, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ExsltRegExp, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__AppendOnlyElementProxy, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ExsltRegExp, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__AppendOnlyElementProxy, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__AppendOnlyElementProxy, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ExsltRegExp, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyEntityProxy __pyx_vtable_4lxml_5etree__ModifyContentOnlyEntityProxy;
+static struct __pyx_vtabstruct_4lxml_5etree__BaseContext __pyx_vtable_4lxml_5etree__BaseContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__BaseContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__BaseContext *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy;
+ p = ((struct __pyx_obj_4lxml_5etree__BaseContext *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__BaseContext;
+ p->_doc = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
+ p->_extensions = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_namespaces = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_global_namespaces = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_utf_refs = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_function_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_eval_context_dict = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_temp_refs = ((struct __pyx_obj_4lxml_5etree__TempStore *)Py_None); Py_INCREF(Py_None);
+ p->_temp_documents = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ p->_exc = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)Py_None); Py_INCREF(Py_None);
+ p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_12_BaseContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree__BaseContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__BaseContext *p = (struct __pyx_obj_4lxml_5etree__BaseContext *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_doc);
+ Py_CLEAR(p->_extensions);
+ Py_CLEAR(p->_namespaces);
+ Py_CLEAR(p->_global_namespaces);
+ Py_CLEAR(p->_utf_refs);
+ Py_CLEAR(p->_function_cache);
+ Py_CLEAR(p->_eval_context_dict);
+ Py_CLEAR(p->_temp_refs);
+ Py_CLEAR(p->_temp_documents);
+ Py_CLEAR(p->_exc);
+ Py_CLEAR(p->_error_log);
+ (*Py_TYPE(o)->tp_free)(o);
}
-static int __pyx_setprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name_3__set__(o, v);
+static int __pyx_tp_traverse_4lxml_5etree__BaseContext(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__BaseContext *p = (struct __pyx_obj_4lxml_5etree__BaseContext *)o;
+ if (p->_doc) {
+ e = (*v)(((PyObject*)p->_doc), a); if (e) return e;
}
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
+ if (p->_extensions) {
+ e = (*v)(p->_extensions, a); if (e) return e;
}
+ if (p->_namespaces) {
+ e = (*v)(p->_namespaces, a); if (e) return e;
+ }
+ if (p->_global_namespaces) {
+ e = (*v)(p->_global_namespaces, a); if (e) return e;
+ }
+ if (p->_utf_refs) {
+ e = (*v)(p->_utf_refs, a); if (e) return e;
+ }
+ if (p->_function_cache) {
+ e = (*v)(p->_function_cache, a); if (e) return e;
+ }
+ if (p->_eval_context_dict) {
+ e = (*v)(p->_eval_context_dict, a); if (e) return e;
+ }
+ if (p->_temp_refs) {
+ e = (*v)(((PyObject*)p->_temp_refs), a); if (e) return e;
+ }
+ if (p->_temp_documents) {
+ e = (*v)(p->_temp_documents, a); if (e) return e;
+ }
+ if (p->_exc) {
+ e = (*v)(((PyObject*)p->_exc), a); if (e) return e;
+ }
+ if (p->_error_log) {
+ e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ }
+ return 0;
}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ModifyContentOnlyEntityProxy[] = {
- {(char *)"name", __pyx_getprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name, __pyx_setprop_4lxml_5etree_29_ModifyContentOnlyEntityProxy_name, 0, 0},
+static int __pyx_tp_clear_4lxml_5etree__BaseContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__BaseContext *p = (struct __pyx_obj_4lxml_5etree__BaseContext *)o;
+ Py_CLEAR(p->_doc);
+ Py_CLEAR(p->_extensions);
+ Py_CLEAR(p->_namespaces);
+ Py_CLEAR(p->_global_namespaces);
+ Py_CLEAR(p->_utf_refs);
+ Py_CLEAR(p->_function_cache);
+ Py_CLEAR(p->_eval_context_dict);
+ Py_CLEAR(p->_temp_refs);
+ Py_CLEAR(p->_temp_documents);
+ Py_CLEAR(p->_exc);
+ Py_CLEAR(p->_error_log);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_12_BaseContext_context_node(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_12_BaseContext_12context_node_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_12_BaseContext_eval_context(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_12_BaseContext_12eval_context_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__BaseContext[] = {
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__BaseContext[] = {
+ {(char *)"context_node", __pyx_getprop_4lxml_5etree_12_BaseContext_context_node, 0, 0, 0},
+ {(char *)"eval_context", __pyx_getprop_4lxml_5etree_12_BaseContext_eval_context, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy = {
+static PyTypeObject __pyx_type_4lxml_5etree__BaseContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ModifyContentOnlyEntityProxy"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._BaseContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__BaseContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__BaseContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A read-only proxy for entity references (for internal use only!)"), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__BaseContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__BaseContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__BaseContext, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ModifyContentOnlyEntityProxy, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__BaseContext, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_12_BaseContext_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ModifyContentOnlyEntityProxy, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__BaseContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyEntityProxy __pyx_vtable_4lxml_5etree__ReadOnlyEntityProxy;
-static PyObject *__pyx_tp_new_4lxml_5etree__ReadOnlyEntityProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ReadOnlyProxy(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__ElementUnicodeResult(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p;
+ PyObject *o = (&PyUnicode_Type)->tp_new(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy;
+ p = ((struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o);
+ p->_parent = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ p->attrname = Py_None; Py_INCREF(Py_None);
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4name_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree__ElementUnicodeResult(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p = (struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_parent);
+ Py_CLEAR(p->attrname);
+ #if CYTHON_COMPILING_IN_CPYTHON
+ if (PyType_IS_GC(Py_TYPE(o)->tp_base))
+ #endif
+ PyObject_GC_Track(o);
+ (&PyUnicode_Type)->tp_dealloc(o);
}
-static int __pyx_setprop_4lxml_5etree_20_ReadOnlyEntityProxy_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4name_3__set__(o, v);
+static int __pyx_tp_traverse_4lxml_5etree__ElementUnicodeResult(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p = (struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o;
+ if (!(&PyUnicode_Type)->tp_traverse); else { e = (&PyUnicode_Type)->tp_traverse(o,v,a); if (e) return e; }
+ if (p->_parent) {
+ e = (*v)(((PyObject*)p->_parent), a); if (e) return e;
}
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
+ if (p->attrname) {
+ e = (*v)(p->attrname, a); if (e) return e;
}
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_text(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_20_ReadOnlyEntityProxy_4text_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree__ElementUnicodeResult(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p = (struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o;
+ if (!(&PyUnicode_Type)->tp_clear); else (&PyUnicode_Type)->tp_clear(o);
+ Py_CLEAR(p->_parent);
+ Py_CLEAR(p->attrname);
+ return 0;
}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ReadOnlyEntityProxy[] = {
- {(char *)"name", __pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_name, __pyx_setprop_4lxml_5etree_20_ReadOnlyEntityProxy_name, 0, 0},
- {(char *)"text", __pyx_getprop_4lxml_5etree_20_ReadOnlyEntityProxy_text, 0, 0, 0},
+static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_attrname(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_8attrname_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_tail(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_7is_tail_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_text(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_7is_text_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_attribute(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_12is_attribute_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__ElementUnicodeResult[] = {
+ {__Pyx_NAMESTR("getparent"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ElementUnicodeResult_1getparent, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ElementUnicodeResult[] = {
+ {(char *)"attrname", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_attrname, 0, 0, 0},
+ {(char *)"is_tail", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_tail, 0, 0, 0},
+ {(char *)"is_text", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_text, 0, 0, 0},
+ {(char *)"is_attribute", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_attribute, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ReadOnlyEntityProxy = {
+static PyTypeObject __pyx_type_4lxml_5etree__ElementUnicodeResult = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ReadOnlyEntityProxy"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._ElementUnicodeResult"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__ElementUnicodeResult), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__ElementUnicodeResult, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A read-only proxy for entity references (for internal use only!)"), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__ElementUnicodeResult, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__ElementUnicodeResult, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__ElementUnicodeResult, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ReadOnlyEntityProxy, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__ElementUnicodeResult, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ReadOnlyEntityProxy, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__ElementUnicodeResult, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__XPathContext __pyx_vtable_4lxml_5etree__XPathContext;
-static struct __pyx_obj_4lxml_5etree__FileWriterElement *__pyx_freelist_4lxml_5etree__FileWriterElement[8];
-static int __pyx_freecount_4lxml_5etree__FileWriterElement = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__FileWriterElement(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__FileWriterElement *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__FileWriterElement > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__FileWriterElement[--__pyx_freecount_4lxml_5etree__FileWriterElement];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree__FileWriterElement *)o);
- p->_element = Py_None; Py_INCREF(Py_None);
- p->_writer = ((struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_18_FileWriterElement_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
+static PyObject *__pyx_tp_new_4lxml_5etree__XPathContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XPathContext *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__BaseContext(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__XPathContext *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseContext*)__pyx_vtabptr_4lxml_5etree__XPathContext;
+ p->_variables = Py_None; Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__FileWriterElement(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__FileWriterElement *p = (struct __pyx_obj_4lxml_5etree__FileWriterElement *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__XPathContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XPathContext *p = (struct __pyx_obj_4lxml_5etree__XPathContext *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_element);
- Py_CLEAR(p->_writer);
- if ((__pyx_freecount_4lxml_5etree__FileWriterElement < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement))) {
- __pyx_freelist_4lxml_5etree__FileWriterElement[__pyx_freecount_4lxml_5etree__FileWriterElement++] = ((struct __pyx_obj_4lxml_5etree__FileWriterElement *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->_variables);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__BaseContext(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__FileWriterElement(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__XPathContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__FileWriterElement *p = (struct __pyx_obj_4lxml_5etree__FileWriterElement *)o;
- if (p->_element) {
- e = (*v)(p->_element, a); if (e) return e;
- }
- if (p->_writer) {
- e = (*v)(((PyObject*)p->_writer), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__XPathContext *p = (struct __pyx_obj_4lxml_5etree__XPathContext *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__BaseContext(o, v, a); if (e) return e;
+ if (p->_variables) {
+ e = (*v)(p->_variables, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__FileWriterElement(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__FileWriterElement *p = (struct __pyx_obj_4lxml_5etree__FileWriterElement *)o;
- Py_CLEAR(p->_element);
- Py_CLEAR(p->_writer);
+static int __pyx_tp_clear_4lxml_5etree__XPathContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XPathContext *p = (struct __pyx_obj_4lxml_5etree__XPathContext *)o;
+ __pyx_tp_clear_4lxml_5etree__BaseContext(o);
+ Py_CLEAR(p->_variables);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__FileWriterElement[] = {
- {__Pyx_NAMESTR("__enter__"), (PyCFunction)__pyx_pw_4lxml_5etree_18_FileWriterElement_3__enter__, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("__exit__"), (PyCFunction)__pyx_pw_4lxml_5etree_18_FileWriterElement_5__exit__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree__XPathContext[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__FileWriterElement = {
+static PyTypeObject __pyx_type_4lxml_5etree__XPathContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._FileWriterElement"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__FileWriterElement), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XPathContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XPathContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__FileWriterElement, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__XPathContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__FileWriterElement, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__FileWriterElement, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__XPathContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XPathContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__FileWriterElement, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__XPathContext, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_13_XPathContext_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__FileWriterElement, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XPathContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase __pyx_vtable_4lxml_5etree__XPathEvaluatorBase;
-static PyObject *__pyx_tp_new_4lxml_5etree__MemDebug(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
+ p->_context = ((struct __pyx_obj_4lxml_5etree__XPathContext *)Py_None); Py_INCREF(Py_None);
+ p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__MemDebug(PyObject *o) {
+static void __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p = (struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o;
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ PyObject_GC_UnTrack(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_5__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_context);
+ Py_CLEAR(p->_error_log);
(*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__MemDebug[] = {
- {__Pyx_NAMESTR("bytes_used"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_1bytes_used, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_bytes_used)},
- {__Pyx_NAMESTR("blocks_used"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_3blocks_used, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_2blocks_used)},
- {__Pyx_NAMESTR("dict_size"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_5dict_size, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_4dict_size)},
- {__Pyx_NAMESTR("dump"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_7dump, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_6dump)},
- {__Pyx_NAMESTR("show"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_9show, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_8show)},
+static int __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p = (struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o;
+ if (p->_context) {
+ e = (*v)(((PyObject*)p->_context), a); if (e) return e;
+ }
+ if (p->_error_log) {
+ e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *p = (struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *)o;
+ Py_CLEAR(p->_context);
+ Py_CLEAR(p->_error_log);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_19_XPathEvaluatorBase_error_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_9error_log_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__XPathEvaluatorBase[] = {
+ {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_19_XPathEvaluatorBase_6evaluate)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__MemDebug = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__XPathEvaluatorBase[] = {
+ {(char *)"error_log", __pyx_getprop_4lxml_5etree_19_XPathEvaluatorBase_error_log, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__XPathEvaluatorBase = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._MemDebug"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__MemDebug), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XPathEvaluatorBase"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__MemDebug, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
- __Pyx_DOCSTR("Debugging support for the memory allocation in libxml2.\n "), /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__MemDebug, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__XPathEvaluatorBase, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__XPathEvaluatorBase, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_19_XPathEvaluatorBase_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__MemDebug, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XPathEvaluatorBase, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_XPathElementEvaluator __pyx_vtable_4lxml_5etree_XPathElementEvaluator;
-static struct __pyx_obj_4lxml_5etree__Attrib *__pyx_freelist_4lxml_5etree__Attrib[16];
-static int __pyx_freecount_4lxml_5etree__Attrib = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__Attrib(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__Attrib *p;
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__Attrib > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__Attrib)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__Attrib[--__pyx_freecount_4lxml_5etree__Attrib];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__Attrib));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree__Attrib *)o);
+static PyObject *__pyx_tp_new_4lxml_5etree_XPathElementEvaluator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_XPathElementEvaluator;
p->_element = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_7_Attrib_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
- }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__Attrib(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__Attrib *p = (struct __pyx_obj_4lxml_5etree__Attrib *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_XPathElementEvaluator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p = (struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
#endif
PyObject_GC_UnTrack(o);
Py_CLEAR(p->_element);
- if ((__pyx_freecount_4lxml_5etree__Attrib < 16) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__Attrib))) {
- __pyx_freelist_4lxml_5etree__Attrib[__pyx_freecount_4lxml_5etree__Attrib++] = ((struct __pyx_obj_4lxml_5etree__Attrib *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__Attrib(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree_XPathElementEvaluator(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__Attrib *p = (struct __pyx_obj_4lxml_5etree__Attrib *)o;
+ struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p = (struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase(o, v, a); if (e) return e;
if (p->_element) {
e = (*v)(((PyObject*)p->_element), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__Attrib(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__Attrib *p = (struct __pyx_obj_4lxml_5etree__Attrib *)o;
+static int __pyx_tp_clear_4lxml_5etree_XPathElementEvaluator(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *p = (struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)o;
+ __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase(o);
Py_CLEAR(p->_element);
return 0;
}
-static PyObject *__pyx_sq_item_4lxml_5etree__Attrib(PyObject *o, Py_ssize_t i) {
- PyObject *r;
- PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
- r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
- Py_DECREF(x);
- return r;
-}
-
-static int __pyx_mp_ass_subscript_4lxml_5etree__Attrib(PyObject *o, PyObject *i, PyObject *v) {
- if (v) {
- return __pyx_pw_4lxml_5etree_7_Attrib_3__setitem__(o, i, v);
- }
- else {
- return __pyx_pw_4lxml_5etree_7_Attrib_5__delitem__(o, i);
- }
-}
-static PyMethodDef __pyx_methods_4lxml_5etree__Attrib[] = {
- {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_7update, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("pop"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_9pop, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_11clear, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("__copy__"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_15__copy__, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("__deepcopy__"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_17__deepcopy__, METH_O, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_25get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_27keys, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("iterkeys"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_31iterkeys, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_33values, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("itervalues"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_35itervalues, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_37items, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("iteritems"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_39iteritems, METH_NOARGS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("has_key"), (PyCFunction)__pyx_pw_4lxml_5etree_7_Attrib_41has_key, METH_O, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree_XPathElementEvaluator[] = {
+ {__Pyx_NAMESTR("register_namespace"), (PyCFunction)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_3register_namespace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21XPathElementEvaluator_2register_namespace)},
+ {__Pyx_NAMESTR("register_namespaces"), (PyCFunction)__pyx_pw_4lxml_5etree_21XPathElementEvaluator_5register_namespaces, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_21XPathElementEvaluator_4register_namespaces)},
{0, 0, 0, 0}
};
-static PyNumberMethods __pyx_tp_as_number__Attrib = {
- 0, /*nb_add*/
- 0, /*nb_subtract*/
- 0, /*nb_multiply*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_divide*/
- #endif
- 0, /*nb_remainder*/
- 0, /*nb_divmod*/
- 0, /*nb_power*/
- 0, /*nb_negative*/
- 0, /*nb_positive*/
- 0, /*nb_absolute*/
- __pyx_pw_4lxml_5etree_7_Attrib_21__bool__, /*nb_nonzero*/
- 0, /*nb_invert*/
- 0, /*nb_lshift*/
- 0, /*nb_rshift*/
- 0, /*nb_and*/
- 0, /*nb_xor*/
- 0, /*nb_or*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_coerce*/
- #endif
- 0, /*nb_int*/
+static PyTypeObject __pyx_type_4lxml_5etree_XPathElementEvaluator = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("lxml.etree.XPathElementEvaluator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XPathElementEvaluator), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_4lxml_5etree_XPathElementEvaluator, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
#if PY_MAJOR_VERSION < 3
- 0, /*nb_long*/
+ 0, /*tp_compare*/
#else
0, /*reserved*/
#endif
- 0, /*nb_float*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_oct*/
- #endif
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_hex*/
- #endif
- 0, /*nb_inplace_add*/
- 0, /*nb_inplace_subtract*/
- 0, /*nb_inplace_multiply*/
- #if PY_MAJOR_VERSION < 3
- 0, /*nb_inplace_divide*/
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ __pyx_pw_4lxml_5etree_21XPathElementEvaluator_7__call__, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("XPathElementEvaluator(self, element, namespaces=None, extensions=None, regexp=True, smart_strings=True)\n Create an XPath evaluator for an element.\n\n Absolute XPath expressions (starting with '/') will be evaluated against\n the ElementTree as returned by getroottree().\n\n Additional namespace declarations can be passed with the\n 'namespace' keyword argument. EXSLT regular expression support\n can be disabled with the 'regexp' boolean keyword (defaults to\n True). Smart strings will be returned for string results unless\n you pass ``smart_strings=False``.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_XPathElementEvaluator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_XPathElementEvaluator, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_XPathElementEvaluator, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ __pyx_pw_4lxml_5etree_21XPathElementEvaluator_1__init__, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_4lxml_5etree_XPathElementEvaluator, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
#endif
- 0, /*nb_inplace_remainder*/
- 0, /*nb_inplace_power*/
- 0, /*nb_inplace_lshift*/
- 0, /*nb_inplace_rshift*/
- 0, /*nb_inplace_and*/
- 0, /*nb_inplace_xor*/
- 0, /*nb_inplace_or*/
- 0, /*nb_floor_divide*/
- 0, /*nb_true_divide*/
- 0, /*nb_inplace_floor_divide*/
- 0, /*nb_inplace_true_divide*/
- #if PY_VERSION_HEX >= 0x02050000
- 0, /*nb_index*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_XPathDocumentEvaluator __pyx_vtable_4lxml_5etree_XPathDocumentEvaluator;
-static PySequenceMethods __pyx_tp_as_sequence__Attrib = {
- __pyx_pw_4lxml_5etree_7_Attrib_23__len__, /*sq_length*/
- 0, /*sq_concat*/
- 0, /*sq_repeat*/
- __pyx_sq_item_4lxml_5etree__Attrib, /*sq_item*/
- 0, /*sq_slice*/
- 0, /*sq_ass_item*/
- 0, /*sq_ass_slice*/
- __pyx_pw_4lxml_5etree_7_Attrib_43__contains__, /*sq_contains*/
- 0, /*sq_inplace_concat*/
- 0, /*sq_inplace_repeat*/
-};
+static PyObject *__pyx_tp_new_4lxml_5etree_XPathDocumentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_XPathElementEvaluator(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator;
+ return o;
+}
-static PyMappingMethods __pyx_tp_as_mapping__Attrib = {
- __pyx_pw_4lxml_5etree_7_Attrib_23__len__, /*mp_length*/
- __pyx_pw_4lxml_5etree_7_Attrib_19__getitem__, /*mp_subscript*/
- __pyx_mp_ass_subscript_4lxml_5etree__Attrib, /*mp_ass_subscript*/
+static PyMethodDef __pyx_methods_4lxml_5etree_XPathDocumentEvaluator[] = {
+ {0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__Attrib = {
+static PyTypeObject __pyx_type_4lxml_5etree_XPathDocumentEvaluator = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._Attrib"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__Attrib), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XPathDocumentEvaluator"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__Attrib, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_XPathElementEvaluator, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_7_Attrib_13__repr__, /*tp_repr*/
- &__pyx_tp_as_number__Attrib, /*tp_as_number*/
- &__pyx_tp_as_sequence__Attrib, /*tp_as_sequence*/
- &__pyx_tp_as_mapping__Attrib, /*tp_as_mapping*/
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_22XPathDocumentEvaluator_3__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A dict-like proxy for the ``Element.attrib`` property.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Attrib, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__Attrib, /*tp_clear*/
- __pyx_pw_4lxml_5etree_7_Attrib_45__richcmp__, /*tp_richcompare*/
+ __Pyx_DOCSTR("XPathDocumentEvaluator(self, etree, namespaces=None, extensions=None, regexp=True, smart_strings=True)\n Create an XPath evaluator for an ElementTree.\n\n Additional namespace declarations can be passed with the\n 'namespace' keyword argument. EXSLT regular expression support\n can be disabled with the 'regexp' boolean keyword (defaults to\n True). Smart strings will be returned for string results unless\n you pass ``smart_strings=False``.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_XPathElementEvaluator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree_XPathElementEvaluator, /*tp_clear*/
+ 0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_7_Attrib_29__iter__, /*tp_iter*/
+ 0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__Attrib, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_XPathDocumentEvaluator, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_22XPathDocumentEvaluator_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__Attrib, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XPathDocumentEvaluator, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_XPath __pyx_vtable_4lxml_5etree_XPath;
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementDefaultClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_ElementClassLookup(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_XPath(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XPath *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__XPathEvaluatorBase(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o);
- p->element_class = Py_None; Py_INCREF(Py_None);
- p->comment_class = Py_None; Py_INCREF(Py_None);
- p->pi_class = Py_None; Py_INCREF(Py_None);
- p->entity_class = Py_None; Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_XPath *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_XPath;
+ p->_path = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_5XPath_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_ElementDefaultClassLookup(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_XPath(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_XPath *p = (struct __pyx_obj_4lxml_5etree_XPath *)o;
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->element_class);
- Py_CLEAR(p->comment_class);
- Py_CLEAR(p->pi_class);
- Py_CLEAR(p->entity_class);
- #if CYTHON_COMPILING_IN_CPYTHON
- if (PyType_IS_GC(Py_TYPE(o)->tp_base))
- #endif
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree_ElementClassLookup(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree_ElementDefaultClassLookup(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o;
- e = ((likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) ? ((__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse) ? __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_4lxml_5etree_ElementDefaultClassLookup)); if (e) return e;
- if (p->element_class) {
- e = (*v)(p->element_class, a); if (e) return e;
- }
- if (p->comment_class) {
- e = (*v)(p->comment_class, a); if (e) return e;
- }
- if (p->pi_class) {
- e = (*v)(p->pi_class, a); if (e) return e;
- }
- if (p->entity_class) {
- e = (*v)(p->entity_class, a); if (e) return e;
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_5XPath_7__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
}
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree_ElementDefaultClassLookup(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *p = (struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup *)o;
- if (likely(__pyx_ptype_4lxml_5etree_ElementClassLookup)) { if (__pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear) __pyx_ptype_4lxml_5etree_ElementClassLookup->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_4lxml_5etree_ElementDefaultClassLookup);
- Py_CLEAR(p->element_class);
- Py_CLEAR(p->comment_class);
- Py_CLEAR(p->pi_class);
- Py_CLEAR(p->entity_class);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_element_class(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_13element_class_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_comment_class(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_13comment_class_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_pi_class(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_8pi_class_1__get__(o);
+ Py_CLEAR(p->_path);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__XPathEvaluatorBase(o);
}
-static PyObject *__pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_entity_class(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_12entity_class_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_5XPath_path(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_5XPath_4path_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ElementDefaultClassLookup[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_XPath[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_ElementDefaultClassLookup[] = {
- {(char *)"element_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_element_class, 0, 0, 0},
- {(char *)"comment_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_comment_class, 0, 0, 0},
- {(char *)"pi_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_pi_class, 0, 0, 0},
- {(char *)"entity_class", __pyx_getprop_4lxml_5etree_25ElementDefaultClassLookup_entity_class, 0, 0, 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XPath[] = {
+ {(char *)"path", __pyx_getprop_4lxml_5etree_5XPath_path, 0, __Pyx_DOCSTR(__pyx_k_The_literal_XPath_expression), 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_ElementDefaultClassLookup = {
+static PyTypeObject __pyx_type_4lxml_5etree_XPath = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ElementDefaultClassLookup"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ElementDefaultClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XPath"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XPath), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_ElementDefaultClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_XPath, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_5XPath_9__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_5XPath_5__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ElementDefaultClassLookup(self, element=None, comment=None, pi=None, entity=None)\n Element class lookup scheme that always returns the default Element\n class.\n\n The keyword arguments ``element``, ``comment``, ``pi`` and ``entity``\n accept the respective Element classes.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_ElementDefaultClassLookup, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_ElementDefaultClassLookup, /*tp_clear*/
+ __Pyx_DOCSTR("XPath(self, path, namespaces=None, extensions=None, regexp=True, smart_strings=True)\n A compiled XPath expression that can be called on Elements and ElementTrees.\n\n Besides the XPath expression, you can pass prefix-namespace\n mappings and extension functions to the constructor through the\n keyword arguments ``namespaces`` and ``extensions``. EXSLT\n regular expression support can be disabled with the 'regexp'\n boolean keyword (defaults to True). Smart strings will be\n returned for string results unless you pass\n ``smart_strings=False``.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_ElementDefaultClassLookup, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_XPath, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_ElementDefaultClassLookup, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_XPath, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_25ElementDefaultClassLookup_3__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_5XPath_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ElementDefaultClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XPath, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_ETXPath __pyx_vtable_4lxml_5etree_ETXPath;
-static PyObject *__pyx_tp_new_4lxml_5etree__ElementUnicodeResult(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p;
- PyObject *o = (&PyUnicode_Type)->tp_new(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_ETXPath(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_ETXPath *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_XPath(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o);
- p->_parent = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
- p->attrname = Py_None; Py_INCREF(Py_None);
+ p = ((struct __pyx_obj_4lxml_5etree_ETXPath *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__XPathEvaluatorBase*)__pyx_vtabptr_4lxml_5etree_ETXPath;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ElementUnicodeResult(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p = (struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_parent);
- Py_CLEAR(p->attrname);
- #if CYTHON_COMPILING_IN_CPYTHON
- if (PyType_IS_GC(Py_TYPE(o)->tp_base))
- #endif
- PyObject_GC_Track(o);
- (&PyUnicode_Type)->tp_dealloc(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ElementUnicodeResult(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p = (struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o;
- if (!(&PyUnicode_Type)->tp_traverse); else { e = (&PyUnicode_Type)->tp_traverse(o,v,a); if (e) return e; }
- if (p->_parent) {
- e = (*v)(((PyObject*)p->_parent), a); if (e) return e;
- }
- if (p->attrname) {
- e = (*v)(p->attrname, a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ElementUnicodeResult(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *p = (struct __pyx_obj_4lxml_5etree__ElementUnicodeResult *)o;
- if (!(&PyUnicode_Type)->tp_clear); else (&PyUnicode_Type)->tp_clear(o);
- Py_CLEAR(p->_parent);
- Py_CLEAR(p->attrname);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_attrname(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_8attrname_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_tail(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_7is_tail_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_text(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_7is_text_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_attribute(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_21_ElementUnicodeResult_12is_attribute_1__get__(o);
-}
-
-static PyMethodDef __pyx_methods_4lxml_5etree__ElementUnicodeResult[] = {
- {__Pyx_NAMESTR("getparent"), (PyCFunction)__pyx_pw_4lxml_5etree_21_ElementUnicodeResult_1getparent, METH_NOARGS, __Pyx_DOCSTR(0)},
+static PyMethodDef __pyx_methods_4lxml_5etree_ETXPath[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ElementUnicodeResult[] = {
- {(char *)"attrname", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_attrname, 0, 0, 0},
- {(char *)"is_tail", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_tail, 0, 0, 0},
- {(char *)"is_text", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_text, 0, 0, 0},
- {(char *)"is_attribute", __pyx_getprop_4lxml_5etree_21_ElementUnicodeResult_is_attribute, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__ElementUnicodeResult = {
+static PyTypeObject __pyx_type_4lxml_5etree_ETXPath = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ElementUnicodeResult"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ElementUnicodeResult), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.ETXPath"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_ETXPath), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementUnicodeResult, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_XPath, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_5XPath_9__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_5XPath_5__call__, /*tp_call*/
+ #else
0, /*tp_call*/
+ #endif
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementUnicodeResult, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementUnicodeResult, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("ETXPath(self, path, extensions=None, regexp=True, smart_strings=True)\n Special XPath class that supports the ElementTree {uri} notation for namespaces.\n\n Note that this class does not accept the ``namespace`` keyword\n argument. All namespaces must be passed as part of the path\n string. Smart strings will be returned for string results unless\n you pass ``smart_strings=False``.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__XPathEvaluatorBase, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XPathEvaluatorBase, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ElementUnicodeResult, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_ETXPath, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ElementUnicodeResult, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_7ETXPath_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ElementUnicodeResult, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_ETXPath, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ExsltRegExp __pyx_vtable_4lxml_5etree__ExsltRegExp;
+static struct __pyx_vtabstruct_4lxml_5etree__XSLTResolverContext __pyx_vtable_4lxml_5etree__XSLTResolverContext;
-static PyObject *__pyx_tp_new_4lxml_5etree__ExsltRegExp(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ExsltRegExp *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResolverContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ResolverContext(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ExsltRegExp;
- p->_compile_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_12_ExsltRegExp_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
- }
+ p = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o);
+ p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ExceptionContext*)__pyx_vtabptr_4lxml_5etree__XSLTResolverContext;
+ p->_parser = ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ExsltRegExp(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ExsltRegExp *p = (struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__XSLTResolverContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p = (struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_compile_map);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->_parser);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__ResolverContext(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__ExsltRegExp(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__XSLTResolverContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__ExsltRegExp *p = (struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o;
- if (p->_compile_map) {
- e = (*v)(p->_compile_map, a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p = (struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__ResolverContext(o, v, a); if (e) return e;
+ if (p->_parser) {
+ e = (*v)(((PyObject*)p->_parser), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__ExsltRegExp(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ExsltRegExp *p = (struct __pyx_obj_4lxml_5etree__ExsltRegExp *)o;
- Py_CLEAR(p->_compile_map);
+static int __pyx_tp_clear_4lxml_5etree__XSLTResolverContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XSLTResolverContext *p = (struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)o;
+ __pyx_tp_clear_4lxml_5etree__ResolverContext(o);
+ Py_CLEAR(p->_parser);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ExsltRegExp[] = {
- {__Pyx_NAMESTR("test"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_3test, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("match"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_5match, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {__Pyx_NAMESTR("replace"), (PyCFunction)__pyx_pw_4lxml_5etree_12_ExsltRegExp_7replace, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
- {0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__ExsltRegExp = {
+static PyTypeObject __pyx_type_4lxml_5etree__XSLTResolverContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ExsltRegExp"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ExsltRegExp), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XSLTResolverContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XSLTResolverContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ExsltRegExp, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__XSLTResolverContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ExsltRegExp, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ExsltRegExp, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__XSLTResolverContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XSLTResolverContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ExsltRegExp, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ExsltRegExp, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XSLTResolverContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl __pyx_vtable_4lxml_5etree_XSLTAccessControl;
-static struct __pyx_obj_4lxml_5etree_QName *__pyx_freelist_4lxml_5etree_QName[8];
-static int __pyx_freecount_4lxml_5etree_QName = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree_QName(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_QName *p;
+static PyObject *__pyx_tp_new_4lxml_5etree_XSLTAccessControl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XSLTAccessControl *p;
PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree_QName > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_QName)) & ((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree_QName[--__pyx_freecount_4lxml_5etree_QName];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree_QName));
- (void) PyObject_INIT(o, t);
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
} else {
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
- } else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_XSLTAccessControl *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_XSLTAccessControl;
+ if (unlikely(__pyx_pw_4lxml_5etree_17XSLTAccessControl_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
}
- p = ((struct __pyx_obj_4lxml_5etree_QName *)o);
- p->text = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->localname = ((PyObject*)Py_None); Py_INCREF(Py_None);
- p->namespace = ((PyObject*)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_QName(PyObject *o) {
- struct __pyx_obj_4lxml_5etree_QName *p = (struct __pyx_obj_4lxml_5etree_QName *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_XSLTAccessControl(PyObject *o) {
#if PY_VERSION_HEX >= 0x030400a1
if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
- Py_CLEAR(p->text);
- Py_CLEAR(p->localname);
- Py_CLEAR(p->namespace);
- if ((__pyx_freecount_4lxml_5etree_QName < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree_QName))) {
- __pyx_freelist_4lxml_5etree_QName[__pyx_freecount_4lxml_5etree_QName++] = ((struct __pyx_obj_4lxml_5etree_QName *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_17XSLTAccessControl_5__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
}
+ (*Py_TYPE(o)->tp_free)(o);
}
-static PyObject *__pyx_getprop_4lxml_5etree_5QName_text(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_5QName_4text_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_5QName_localname(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_5QName_9localname_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_5QName_namespace(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_5QName_9namespace_1__get__(o);
+static PyObject *__pyx_getprop_4lxml_5etree_17XSLTAccessControl_options(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_17XSLTAccessControl_7options_1__get__(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_QName[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_XSLTAccessControl[] = {
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_QName[] = {
- {(char *)"text", __pyx_getprop_4lxml_5etree_5QName_text, 0, 0, 0},
- {(char *)"localname", __pyx_getprop_4lxml_5etree_5QName_localname, 0, 0, 0},
- {(char *)"namespace", __pyx_getprop_4lxml_5etree_5QName_namespace, 0, 0, 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XSLTAccessControl[] = {
+ {(char *)"options", __pyx_getprop_4lxml_5etree_17XSLTAccessControl_options, 0, __Pyx_DOCSTR(__pyx_k_The_access_control_configuration), 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_QName = {
+static PyTypeObject __pyx_type_4lxml_5etree_XSLTAccessControl = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.QName"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_QName), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XSLTAccessControl"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XSLTAccessControl), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_QName, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_XSLTAccessControl, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_17XSLTAccessControl_7__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
- __pyx_pw_4lxml_5etree_5QName_5__hash__, /*tp_hash*/
+ 0, /*tp_hash*/
0, /*tp_call*/
- __pyx_pw_4lxml_5etree_5QName_3__str__, /*tp_str*/
+ 0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("QName(text_or_uri_or_element, tag=None)\n\n QName wrapper for qualified XML names.\n\n Pass a tag name by itself or a namespace URI and a tag name to\n create a qualified name. Alternatively, pass an Element to\n extract its tag name.\n\n The ``text`` property holds the qualified name in\n ``{namespace}tagname`` notation. The ``namespace`` and\n ``localname`` properties hold the respective parts of the tag\n name.\n\n You can pass QName objects wherever a tag name is expected. Also,\n setting Element text from a QName will resolve the namespace\n prefix and set a qualified text value. This is helpful in XML\n languages like SOAP or XML-Schema that use prefixed tag names in\n their text content.\n "), /*tp_doc*/
+ __Pyx_DOCSTR("XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)\n\n Access control for XSLT: reading/writing files, directories and\n network I/O. Access to a type of resource is granted or denied by\n passing any of the following boolean keyword arguments. All of\n them default to True to allow access.\n\n - read_file\n - write_file\n - create_dir\n - read_network\n - write_network\n\n For convenience, there is also a class member `DENY_ALL` that\n provides an XSLTAccessControl instance that is readily configured\n to deny everything, and a `DENY_WRITE` member that denies all\n write access but allows read access.\n\n See `XSLT`.\n "), /*tp_doc*/
0, /*tp_traverse*/
0, /*tp_clear*/
- __pyx_pw_4lxml_5etree_5QName_7__richcmp__, /*tp_richcompare*/
+ 0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_QName, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_XSLTAccessControl, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_QName, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_XSLTAccessControl, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_5QName_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_17XSLTAccessControl_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_QName, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XSLTAccessControl, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree__XSLTContext __pyx_vtable_4lxml_5etree__XSLTContext;
-static struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *__pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[8];
-static int __pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_3_iterentities(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTContext(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XSLTContext *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__BaseContext(t, a, k);
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree__XSLTContext *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseContext*)__pyx_vtabptr_4lxml_5etree__XSLTContext;
+ p->_extension_element_proxy = ((struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy *)Py_None); Py_INCREF(Py_None);
+ p->_extension_elements = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_12_XSLTContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_3_iterentities(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__XSLTContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XSLTContext *p = (struct __pyx_obj_4lxml_5etree__XSLTContext *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_self);
- if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities))) {
- __pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
+ Py_CLEAR(p->_extension_element_proxy);
+ Py_CLEAR(p->_extension_elements);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__BaseContext(o);
}
-static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_3_iterentities(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__XSLTContext(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o;
- if (p->__pyx_v_node) {
- e = (*v)(((PyObject*)p->__pyx_v_node), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__XSLTContext *p = (struct __pyx_obj_4lxml_5etree__XSLTContext *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__BaseContext(o, v, a); if (e) return e;
+ if (p->_extension_element_proxy) {
+ e = (*v)(((PyObject*)p->_extension_element_proxy), a); if (e) return e;
}
- if (p->__pyx_v_self) {
- e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ if (p->_extension_elements) {
+ e = (*v)(p->_extension_elements, a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_3_iterentities(PyObject *o) {
- struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o;
- Py_CLEAR(p->__pyx_v_node);
- Py_CLEAR(p->__pyx_v_self);
+static int __pyx_tp_clear_4lxml_5etree__XSLTContext(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XSLTContext *p = (struct __pyx_obj_4lxml_5etree__XSLTContext *)o;
+ __pyx_tp_clear_4lxml_5etree__BaseContext(o);
+ Py_CLEAR(p->_extension_element_proxy);
+ Py_CLEAR(p->_extension_elements);
return 0;
}
-static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities = {
+static PyMethodDef __pyx_methods_4lxml_5etree__XSLTContext[] = {
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__XSLTContext = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct_3_iterentities"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XSLTContext"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XSLTContext), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__XSLTContext, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__XSLTContext, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XSLTContext, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__XSLTContext, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_12_XSLTContext_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XSLTContext, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__TempStore __pyx_vtable_4lxml_5etree__TempStore;
-static PyObject *__pyx_tp_new_4lxml_5etree__TempStore(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__TempStore *p;
+static struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *__pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[8];
+static int __pyx_freecount_4lxml_5etree__XSLTQuotedStringParam = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTQuotedStringParam(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__TempStore *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__TempStore;
- p->_storage = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (likely((__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[--__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam));
+ (void) PyObject_INIT(o, t);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *)o);
+ p->strval = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_22_XSLTQuotedStringParam_1__cinit__(o, a, k) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__TempStore(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__TempStore *p = (struct __pyx_obj_4lxml_5etree__TempStore *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_storage);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__TempStore(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__TempStore *p = (struct __pyx_obj_4lxml_5etree__TempStore *)o;
- if (p->_storage) {
- e = (*v)(p->_storage, a); if (e) return e;
+static void __pyx_tp_dealloc_4lxml_5etree__XSLTQuotedStringParam(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *p = (struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *)o;
+ Py_CLEAR(p->strval);
+ if ((__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam))) {
+ __pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam++] = ((struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
}
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__TempStore(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__TempStore *p = (struct __pyx_obj_4lxml_5etree__TempStore *)o;
- Py_CLEAR(p->_storage);
- return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__TempStore[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__XSLTQuotedStringParam[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__TempStore = {
+static PyTypeObject __pyx_type_4lxml_5etree__XSLTQuotedStringParam = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._TempStore"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__TempStore), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XSLTQuotedStringParam"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XSLTQuotedStringParam), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__TempStore, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__XSLTQuotedStringParam, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__TempStore, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__TempStore, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ __Pyx_DOCSTR("A wrapper class for literal XSLT string parameters that require\n quote escaping.\n "), /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__TempStore, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__XSLTQuotedStringParam, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_10_TempStore_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__TempStore, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XSLTQuotedStringParam, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
+static struct __pyx_vtabstruct_4lxml_5etree_XSLT __pyx_vtable_4lxml_5etree_XSLT;
-static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static PyObject *__pyx_tp_new_4lxml_5etree_XSLT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XSLT *p;
PyObject *o;
if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
o = (*t->tp_alloc)(t, 0);
o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_XSLT *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_XSLT;
+ p->_context = ((struct __pyx_obj_4lxml_5etree__XSLTContext *)Py_None); Py_INCREF(Py_None);
+ p->_xslt_resolver_context = ((struct __pyx_obj_4lxml_5etree__XSLTResolverContext *)Py_None); Py_INCREF(Py_None);
+ p->_access_control = ((struct __pyx_obj_4lxml_5etree_XSLTAccessControl *)Py_None); Py_INCREF(Py_None);
+ p->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_4XSLT_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__OpaqueNodeWrapper(PyObject *o) {
+static void __pyx_tp_dealloc_4lxml_5etree_XSLT(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree_XSLT *p = (struct __pyx_obj_4lxml_5etree_XSLT *)o;
#if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
+ PyObject_GC_UnTrack(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_4XSLT_5__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ Py_CLEAR(p->_context);
+ Py_CLEAR(p->_xslt_resolver_context);
+ Py_CLEAR(p->_access_control);
+ Py_CLEAR(p->_error_log);
(*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__OpaqueNodeWrapper[] = {
+static int __pyx_tp_traverse_4lxml_5etree_XSLT(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree_XSLT *p = (struct __pyx_obj_4lxml_5etree_XSLT *)o;
+ if (p->_context) {
+ e = (*v)(((PyObject*)p->_context), a); if (e) return e;
+ }
+ if (p->_xslt_resolver_context) {
+ e = (*v)(((PyObject*)p->_xslt_resolver_context), a); if (e) return e;
+ }
+ if (p->_access_control) {
+ e = (*v)(((PyObject*)p->_access_control), a); if (e) return e;
+ }
+ if (p->_error_log) {
+ e = (*v)(((PyObject*)p->_error_log), a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_4XSLT_error_log(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_4XSLT_9error_log_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_XSLT[] = {
+ {__Pyx_NAMESTR("strparam"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_7strparam, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_6strparam)},
+ {__Pyx_NAMESTR("set_global_max_depth"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_9set_global_max_depth, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_8set_global_max_depth)},
+ {__Pyx_NAMESTR("apply"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_11apply, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_10apply)},
+ {__Pyx_NAMESTR("tostring"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_13tostring, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_4XSLT_12tostring)},
+ {__Pyx_NAMESTR("__deepcopy__"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_15__deepcopy__, METH_O, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("__copy__"), (PyCFunction)__pyx_pw_4lxml_5etree_4XSLT_17__copy__, METH_NOARGS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__OpaqueNodeWrapper = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XSLT[] = {
+ {(char *)"error_log", __pyx_getprop_4lxml_5etree_4XSLT_error_log, 0, __Pyx_DOCSTR(__pyx_k_The_log_of_errors_and_warnings_o), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_XSLT = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._OpaqueNodeWrapper"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__OpaqueNodeWrapper), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.XSLT"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XSLT), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__OpaqueNodeWrapper, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_XSLT, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_4XSLT_19__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("XSLT(self, xslt_input, extensions=None, regexp=True, access_control=None)\n\n Turn an XSL document into an XSLT object.\n\n Calling this object on a tree or Element will execute the XSLT::\n\n transform = etree.XSLT(xsl_tree)\n result = transform(xml_tree)\n\n Keyword arguments of the constructor:\n\n - extensions: a dict mapping ``(namespace, name)`` pairs to\n extension functions or extension elements\n - regexp: enable exslt regular expression support in XPath\n (default: True)\n - access_control: access restrictions for network or file\n system (see `XSLTAccessControl`)\n\n Keyword arguments of the XSLT call:\n\n - profile_run: enable XSLT profiling (default: False)\n\n Other keyword arguments of the call are passed to the stylesheet\n as parameters.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree_XSLT, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__OpaqueNodeWrapper, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_XSLT, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_XSLT, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_18_OpaqueNodeWrapper_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_4XSLT_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_XSLT, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__FilelikeWriter __pyx_vtable_4lxml_5etree__FilelikeWriter;
+static struct __pyx_vtabstruct_4lxml_5etree__XSLTResultTree __pyx_vtable_4lxml_5etree__XSLTResultTree;
-static PyObject *__pyx_tp_new_4lxml_5etree__FilelikeWriter(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__FilelikeWriter *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTResultTree(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XSLTResultTree *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__ElementTree(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__FilelikeWriter;
- p->_filelike = Py_None; Py_INCREF(Py_None);
- p->_close_filelike = Py_None; Py_INCREF(Py_None);
- p->_exc_context = ((struct __pyx_obj_4lxml_5etree__ExceptionContext *)Py_None); Py_INCREF(Py_None);
- p->error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_15_FilelikeWriter_1__cinit__(o, a, k) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementTree*)__pyx_vtabptr_4lxml_5etree__XSLTResultTree;
+ p->_xslt = ((struct __pyx_obj_4lxml_5etree_XSLT *)Py_None); Py_INCREF(Py_None);
+ p->_profile = ((struct LxmlDocument *)Py_None); Py_INCREF(Py_None);
+ if (unlikely(__pyx_pw_4lxml_5etree_15_XSLTResultTree_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__FilelikeWriter(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__FilelikeWriter *p = (struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o;
+static void __pyx_tp_dealloc_4lxml_5etree__XSLTResultTree(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XSLTResultTree *p = (struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_filelike);
- Py_CLEAR(p->_close_filelike);
- Py_CLEAR(p->_exc_context);
- Py_CLEAR(p->error_log);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->_xslt);
+ Py_CLEAR(p->_profile);
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__ElementTree(o);
}
-static int __pyx_tp_traverse_4lxml_5etree__FilelikeWriter(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree__XSLTResultTree(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__FilelikeWriter *p = (struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o;
- if (p->_filelike) {
- e = (*v)(p->_filelike, a); if (e) return e;
- }
- if (p->_close_filelike) {
- e = (*v)(p->_close_filelike, a); if (e) return e;
- }
- if (p->_exc_context) {
- e = (*v)(((PyObject*)p->_exc_context), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree__XSLTResultTree *p = (struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o;
+ e = __pyx_tp_traverse_4lxml_5etree__ElementTree(o, v, a); if (e) return e;
+ if (p->_xslt) {
+ e = (*v)(((PyObject*)p->_xslt), a); if (e) return e;
}
- if (p->error_log) {
- e = (*v)(((PyObject*)p->error_log), a); if (e) return e;
+ if (p->_profile) {
+ e = (*v)(((PyObject*)p->_profile), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__FilelikeWriter(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__FilelikeWriter *p = (struct __pyx_obj_4lxml_5etree__FilelikeWriter *)o;
- Py_CLEAR(p->_filelike);
- Py_CLEAR(p->_close_filelike);
- Py_CLEAR(p->_exc_context);
- Py_CLEAR(p->error_log);
+static int __pyx_tp_clear_4lxml_5etree__XSLTResultTree(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__XSLTResultTree *p = (struct __pyx_obj_4lxml_5etree__XSLTResultTree *)o;
+ __pyx_tp_clear_4lxml_5etree__ElementTree(o);
+ Py_CLEAR(p->_xslt);
+ Py_CLEAR(p->_profile);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__FilelikeWriter[] = {
+static PyObject *__pyx_getprop_4lxml_5etree_15_XSLTResultTree_xslt_profile(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_15_XSLTResultTree_12xslt_profile_1__get__(o);
+}
+
+static int __pyx_setprop_4lxml_5etree_15_XSLTResultTree_xslt_profile(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
+ if (v) {
+ PyErr_SetString(PyExc_NotImplementedError, "__set__");
+ return -1;
+ }
+ else {
+ return __pyx_pw_4lxml_5etree_15_XSLTResultTree_12xslt_profile_3__del__(o);
+ }
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__XSLTResultTree[] = {
+ {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_4lxml_5etree_15_XSLTResultTree_5__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__FilelikeWriter = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__XSLTResultTree[] = {
+ {(char *)"xslt_profile", __pyx_getprop_4lxml_5etree_15_XSLTResultTree_xslt_profile, __pyx_setprop_4lxml_5etree_15_XSLTResultTree_xslt_profile, __Pyx_DOCSTR(__pyx_k_Return_an_ElementTree_with_profi), 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyBufferProcs __pyx_tp_as_buffer__XSLTResultTree = {
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getreadbuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getwritebuffer*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getsegcount*/
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ 0, /*bf_getcharbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ __pyx_pw_4lxml_5etree_15_XSLTResultTree_7__getbuffer__, /*bf_getbuffer*/
+ #endif
+ #if PY_VERSION_HEX >= 0x02060000
+ __pyx_pw_4lxml_5etree_15_XSLTResultTree_9__releasebuffer__, /*bf_releasebuffer*/
+ #endif
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__XSLTResultTree = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._FilelikeWriter"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__FilelikeWriter), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XSLTResultTree"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XSLTResultTree), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__FilelikeWriter, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__XSLTResultTree, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
0, /*tp_call*/
- 0, /*tp_str*/
+ __pyx_pw_4lxml_5etree_15_XSLTResultTree_3__str__, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
+ &__pyx_tp_as_buffer__XSLTResultTree, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__FilelikeWriter, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__FilelikeWriter, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree__XSLTResultTree, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__XSLTResultTree, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__FilelikeWriter, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__XSLTResultTree, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__XSLTResultTree, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__FilelikeWriter, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XSLTResultTree, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__OpaqueDocumentWrapper __pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper;
+static struct __pyx_vtabstruct_4lxml_5etree__XSLTProcessingInstruction __pyx_vtable_4lxml_5etree__XSLTProcessingInstruction;
-static PyObject *__pyx_tp_new_4lxml_5etree__OpaqueDocumentWrapper(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__OpaqueNodeWrapper(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree__XSLTProcessingInstruction(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree_PIBase(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper;
+ p = ((struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction *)o);
+ p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement*)__pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction;
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__OpaqueDocumentWrapper[] = {
- {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pw_4lxml_5etree_22_OpaqueDocumentWrapper_1append, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_OpaqueDocumentWrapper_append)},
- {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pw_4lxml_5etree_22_OpaqueDocumentWrapper_3extend, METH_O, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_22_OpaqueDocumentWrapper_2extend)},
+static PyMethodDef __pyx_methods_4lxml_5etree__XSLTProcessingInstruction[] = {
+ {__Pyx_NAMESTR("parseXSL"), (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_1parseXSL, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_parseXSL)},
+ {__Pyx_NAMESTR("set"), (PyCFunction)__pyx_pw_4lxml_5etree_26_XSLTProcessingInstruction_3set, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_26_XSLTProcessingInstruction_2set)},
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__OpaqueDocumentWrapper = {
+static PyTypeObject __pyx_type_4lxml_5etree__XSLTProcessingInstruction = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._OpaqueDocumentWrapper"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._XSLTProcessingInstruction"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__XSLTProcessingInstruction), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__OpaqueNodeWrapper, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__Element, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_22_ProcessingInstruction_1__repr__, /*tp_repr*/
+ #else
0, /*tp_repr*/
+ #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- 0, /*tp_traverse*/
+ __pyx_tp_traverse_4lxml_5etree__Element, /*tp_traverse*/
0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
+ #if CYTHON_COMPILING_IN_PYPY
+ __pyx_pw_4lxml_5etree_8_Element_41__iter__, /*tp_iter*/
+ #else
0, /*tp_iter*/
+ #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__OpaqueDocumentWrapper, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__XSLTProcessingInstruction, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
#if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_18_OpaqueNodeWrapper_1__init__, /*tp_init*/
+ __pyx_pw_4lxml_5etree_6PIBase_1__init__, /*tp_init*/
#else
0, /*tp_init*/
#endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__OpaqueDocumentWrapper, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__XSLTProcessingInstruction, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_Schematron __pyx_vtable_4lxml_5etree_Schematron;
+static struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension __pyx_vtable_4lxml_5etree_XSLTExtension;
-static PyObject *__pyx_tp_new_4lxml_5etree_Schematron(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_Schematron *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_Schematron *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_Schematron;
- if (unlikely(__pyx_pw_4lxml_5etree_10Schematron_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+static PyObject *__pyx_tp_new_4lxml_5etree_XSLTExtension(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_XSLTExtension *p;
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
}
+ if (unlikely(!o)) return 0;
+ p = ((struct __pyx_obj_4lxml_5etree_XSLTExtension *)o);
+ p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_XSLTExtension;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_Schematron(PyObject *o) {
+static void __pyx_tp_dealloc_4lxml_5etree_XSLTExtension(PyObject *o) {
#if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
if (PyObject_CallFinalizerFromDealloc(o)) return;
}
#endif
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_XSLTExtension[] = {
+ {__Pyx_NAMESTR("execute"), (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_1execute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13XSLTExtension_execute)},
+ {__Pyx_NAMESTR("apply_templates"), (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_3apply_templates, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13XSLTExtension_2apply_templates)},
+ {__Pyx_NAMESTR("process_children"), (PyCFunction)__pyx_pw_4lxml_5etree_13XSLTExtension_5process_children, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_13XSLTExtension_4process_children)},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree_XSLTExtension = {
+ PyVarObject_HEAD_INIT(0, 0)
+ __Pyx_NAMESTR("lxml.etree.XSLTExtension"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_XSLTExtension), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_4lxml_5etree_XSLTExtension, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #else
+ 0, /*reserved*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ __Pyx_DOCSTR("Base class of an XSLT extension element.\n "), /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_4lxml_5etree_XSLTExtension, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_4lxml_5etree_XSLTExtension, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ #if PY_VERSION_HEX >= 0x02060000
+ 0, /*tp_version_tag*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *__pyx_freelist_4lxml_5etree__DTDElementContentDecl[8];
+static int __pyx_freecount_4lxml_5etree__DTDElementContentDecl = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementContentDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree__DTDElementContentDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementContentDecl[--__pyx_freecount_4lxml_5etree__DTDElementContentDecl];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o);
+ p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
+ return o;
+}
+
+static void __pyx_tp_dealloc_4lxml_5etree__DTDElementContentDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o;
PyObject_GC_UnTrack(o);
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_10Schematron_5__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
+ Py_CLEAR(p->_dtd);
+ if ((__pyx_freecount_4lxml_5etree__DTDElementContentDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl))) {
+ __pyx_freelist_4lxml_5etree__DTDElementContentDecl[__pyx_freecount_4lxml_5etree__DTDElementContentDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
}
- PyObject_GC_Track(o);
- __pyx_tp_dealloc_4lxml_5etree__Validator(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree_Schematron[] = {
+static int __pyx_tp_traverse_4lxml_5etree__DTDElementContentDecl(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o;
+ if (p->_dtd) {
+ e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__DTDElementContentDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementContentDecl *)o;
+ Py_CLEAR(p->_dtd);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_type(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4type_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_occur(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_5occur_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_left(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_4left_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_right(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_5right_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__DTDElementContentDecl[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_Schematron = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDElementContentDecl[] = {
+ {(char *)"name", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_name, 0, 0, 0},
+ {(char *)"type", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_type, 0, 0, 0},
+ {(char *)"occur", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_occur, 0, 0, 0},
+ {(char *)"left", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_left, 0, 0, 0},
+ {(char *)"right", __pyx_getprop_4lxml_5etree_22_DTDElementContentDecl_right, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__DTDElementContentDecl = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.Schematron"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_Schematron), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._DTDElementContentDecl"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__DTDElementContentDecl), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_Schematron, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__DTDElementContentDecl, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_22_DTDElementContentDecl_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- __pyx_pw_4lxml_5etree_10Schematron_7__call__, /*tp_call*/
+ 0, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Schematron(self, etree=None, file=None)\n A Schematron validator.\n\n Pass a root Element or an ElementTree to turn it into a validator.\n Alternatively, pass a filename as keyword argument 'file' to parse from\n the file system.\n\n Schematron is a less well known, but very powerful schema language. The main\n idea is to use the capabilities of XPath to put restrictions on the structure\n and the content of XML documents. Here is a simple example::\n\n >>> schematron = Schematron(XML('''\n ... <schema xmlns=\"http://www.ascc.net/xml/schematron\" >\n ... <pattern name=\"id is the only permited attribute name\">\n ... <rule context=\"*\">\n ... <report test=\"@*[not(name()='id')]\">Attribute\n ... <name path=\"@*[not(name()='id')]\"/> is forbidden<name/>\n ... </report>\n ... </rule>\n ... </pattern>\n ... </schema>\n ... '''))\n\n >>> xml = XML('''\n ... <AAA name=\"aaa\">\n ... <BBB id=\"bbb\"/>\n ... <CCC color=\"ccc\"/>\n ... </AAA>\n ... ''')\n\n >>> schematron.validate(xml)\n 0\n\n >>> xml = XML('''\n ... <AAA id=\"aaa\">\n ... <BBB id=\"bbb\"/>\n ... <CCC/>\n ... </AAA>\n ... ''')\n\n >>> schematron.validate(xml)\n 1\n\n Schematron was added to libxml2 in version 2.6.21. Before version 2.6.32,\n however, Schematron lacked support for error reporting other than to stderr.\n This version is therefore required to retrieve validation warnings and\n errors in lxml.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__DTDElementContentDecl, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__DTDElementContentDecl, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_Schematron, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__DTDElementContentDecl, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__DTDElementContentDecl, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_10Schematron_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_Schematron, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__DTDElementContentDecl, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
#endif
};
-static PyObject *__pyx_tp_new_4lxml_5etree__ErrorLogContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+static struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *__pyx_freelist_4lxml_5etree__DTDAttributeDecl[8];
+static int __pyx_freecount_4lxml_5etree__DTDAttributeDecl = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__DTDAttributeDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p;
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
+ if (likely((__pyx_freecount_4lxml_5etree__DTDAttributeDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDAttributeDecl[--__pyx_freecount_4lxml_5etree__DTDAttributeDecl];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ p = ((struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o);
+ p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ErrorLogContext(PyObject *o) {
- (*Py_TYPE(o)->tp_free)(o);
+static void __pyx_tp_dealloc_4lxml_5etree__DTDAttributeDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p = (struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_dtd);
+ if ((__pyx_freecount_4lxml_5etree__DTDAttributeDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl))) {
+ __pyx_freelist_4lxml_5etree__DTDAttributeDecl[__pyx_freecount_4lxml_5etree__DTDAttributeDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static PyTypeObject __pyx_type_4lxml_5etree__ErrorLogContext = {
+static int __pyx_tp_traverse_4lxml_5etree__DTDAttributeDecl(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p = (struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o;
+ if (p->_dtd) {
+ e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__DTDAttributeDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *p = (struct __pyx_obj_4lxml_5etree__DTDAttributeDecl *)o;
+ Py_CLEAR(p->_dtd);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_4name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_elemname(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_8elemname_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_prefix(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_6prefix_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_type(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_4type_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_7default_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default_value(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_13default_value_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__DTDAttributeDecl[] = {
+ {__Pyx_NAMESTR("itervalues"), (PyCFunction)__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_3itervalues, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pw_4lxml_5etree_17_DTDAttributeDecl_6values, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDAttributeDecl[] = {
+ {(char *)"name", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_name, 0, 0, 0},
+ {(char *)"elemname", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_elemname, 0, 0, 0},
+ {(char *)"prefix", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_prefix, 0, 0, 0},
+ {(char *)"type", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_type, 0, 0, 0},
+ {(char *)"default", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default, 0, 0, 0},
+ {(char *)"default_value", __pyx_getprop_4lxml_5etree_17_DTDAttributeDecl_default_value, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__DTDAttributeDecl = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ErrorLogContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ErrorLogContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._DTDAttributeDecl"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__DTDAttributeDecl), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ErrorLogContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__DTDAttributeDecl, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_17_DTDAttributeDecl_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
- __Pyx_DOCSTR("\n Error log context for the 'with' statement.\n Stores a reference to the current callbacks to allow for\n recursively stacked log contexts.\n "), /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__DTDAttributeDecl, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__DTDAttributeDecl, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__DTDAttributeDecl, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__DTDAttributeDecl, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ErrorLogContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__DTDAttributeDecl, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_XSLTAccessControl __pyx_vtable_4lxml_5etree_XSLTAccessControl;
-static PyObject *__pyx_tp_new_4lxml_5etree_XSLTAccessControl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree_XSLTAccessControl *p;
+static struct __pyx_obj_4lxml_5etree__DTDElementDecl *__pyx_freelist_4lxml_5etree__DTDElementDecl[8];
+static int __pyx_freecount_4lxml_5etree__DTDElementDecl = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__DTDElementDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__DTDElementDecl *p;
PyObject *o;
- if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
- o = (*t->tp_alloc)(t, 0);
+ if (likely((__pyx_freecount_4lxml_5etree__DTDElementDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementDecl[--__pyx_freecount_4lxml_5etree__DTDElementDecl];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
} else {
- o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
- }
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_XSLTAccessControl *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree_XSLTAccessControl;
- if (unlikely(__pyx_pw_4lxml_5etree_17XSLTAccessControl_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o);
+ p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree_XSLTAccessControl(PyObject *o) {
- #if PY_VERSION_HEX >= 0x030400a1
- if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
- if (PyObject_CallFinalizerFromDealloc(o)) return;
+static void __pyx_tp_dealloc_4lxml_5etree__DTDElementDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDElementDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_dtd);
+ if ((__pyx_freecount_4lxml_5etree__DTDElementDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl))) {
+ __pyx_freelist_4lxml_5etree__DTDElementDecl[__pyx_freecount_4lxml_5etree__DTDElementDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
}
- #endif
- {
- PyObject *etype, *eval, *etb;
- PyErr_Fetch(&etype, &eval, &etb);
- ++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_17XSLTAccessControl_5__dealloc__(o);
- --Py_REFCNT(o);
- PyErr_Restore(etype, eval, etb);
+}
+
+static int __pyx_tp_traverse_4lxml_5etree__DTDElementDecl(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__DTDElementDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o;
+ if (p->_dtd) {
+ e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
}
- (*Py_TYPE(o)->tp_free)(o);
+ return 0;
}
-static PyObject *__pyx_getprop_4lxml_5etree_17XSLTAccessControl_options(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_17XSLTAccessControl_7options_1__get__(o);
+static int __pyx_tp_clear_4lxml_5etree__DTDElementDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDElementDecl *p = (struct __pyx_obj_4lxml_5etree__DTDElementDecl *)o;
+ Py_CLEAR(p->_dtd);
+ return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_XSLTAccessControl[] = {
+static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_15_DTDElementDecl_4name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_prefix(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_15_DTDElementDecl_6prefix_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_type(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_15_DTDElementDecl_4type_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_15_DTDElementDecl_content(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_15_DTDElementDecl_7content_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__DTDElementDecl[] = {
+ {__Pyx_NAMESTR("iterattributes"), (PyCFunction)__pyx_pw_4lxml_5etree_15_DTDElementDecl_3iterattributes, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("attributes"), (PyCFunction)__pyx_pw_4lxml_5etree_15_DTDElementDecl_6attributes, METH_NOARGS, __Pyx_DOCSTR(0)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree_XSLTAccessControl[] = {
- {(char *)"options", __pyx_getprop_4lxml_5etree_17XSLTAccessControl_options, 0, __Pyx_DOCSTR(__pyx_k_The_access_control_configuration), 0},
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDElementDecl[] = {
+ {(char *)"name", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_name, 0, 0, 0},
+ {(char *)"prefix", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_prefix, 0, 0, 0},
+ {(char *)"type", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_type, 0, 0, 0},
+ {(char *)"content", __pyx_getprop_4lxml_5etree_15_DTDElementDecl_content, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_XSLTAccessControl = {
+static PyTypeObject __pyx_type_4lxml_5etree__DTDElementDecl = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.XSLTAccessControl"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_XSLTAccessControl), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._DTDElementDecl"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__DTDElementDecl), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_XSLTAccessControl, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__DTDElementDecl, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_17XSLTAccessControl_7__repr__, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_15_DTDElementDecl_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
- __Pyx_DOCSTR("XSLTAccessControl(self, read_file=True, write_file=True, create_dir=True, read_network=True, write_network=True)\n\n Access control for XSLT: reading/writing files, directories and\n network I/O. Access to a type of resource is granted or denied by\n passing any of the following boolean keyword arguments. All of\n them default to True to allow access.\n\n - read_file\n - write_file\n - create_dir\n - read_network\n - write_network\n\n For convenience, there is also a class member `DENY_ALL` that\n provides an XSLTAccessControl instance that is readily configured\n to deny everything, and a `DENY_WRITE` member that denies all\n write access but allows read access.\n\n See `XSLT`.\n "), /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__DTDElementDecl, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__DTDElementDecl, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_XSLTAccessControl, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__DTDElementDecl, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree_XSLTAccessControl, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__DTDElementDecl, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_17XSLTAccessControl_3__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_XSLTAccessControl, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__DTDElementDecl, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator __pyx_vtable_4lxml_5etree_SiblingsIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree_SiblingsIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_SiblingsIterator *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ElementMatchIterator(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_SiblingsIterator *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator*)__pyx_vtabptr_4lxml_5etree_SiblingsIterator;
- if (unlikely(__pyx_pw_4lxml_5etree_16SiblingsIterator_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+static struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_freelist_4lxml_5etree__DTDEntityDecl[8];
+static int __pyx_freecount_4lxml_5etree__DTDEntityDecl = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree__DTDEntityDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p;
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree__DTDEntityDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDEntityDecl[--__pyx_freecount_4lxml_5etree__DTDEntityDecl];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
+ p = ((struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o);
+ p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_SiblingsIterator[] = {
+static void __pyx_tp_dealloc_4lxml_5etree__DTDEntityDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p = (struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->_dtd);
+ if ((__pyx_freecount_4lxml_5etree__DTDEntityDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl))) {
+ __pyx_freelist_4lxml_5etree__DTDEntityDecl[__pyx_freecount_4lxml_5etree__DTDEntityDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_4lxml_5etree__DTDEntityDecl(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p = (struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o;
+ if (p->_dtd) {
+ e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree__DTDEntityDecl(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p = (struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o;
+ Py_CLEAR(p->_dtd);
+ return 0;
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_14_DTDEntityDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_14_DTDEntityDecl_4name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_14_DTDEntityDecl_orig(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_14_DTDEntityDecl_4orig_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_14_DTDEntityDecl_content(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_14_DTDEntityDecl_7content_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree__DTDEntityDecl[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree_SiblingsIterator = {
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDEntityDecl[] = {
+ {(char *)"name", __pyx_getprop_4lxml_5etree_14_DTDEntityDecl_name, 0, 0, 0},
+ {(char *)"orig", __pyx_getprop_4lxml_5etree_14_DTDEntityDecl_orig, 0, 0, 0},
+ {(char *)"content", __pyx_getprop_4lxml_5etree_14_DTDEntityDecl_content, 0, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_4lxml_5etree__DTDEntityDecl = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.SiblingsIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_SiblingsIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._DTDEntityDecl"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__DTDEntityDecl, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- 0, /*tp_repr*/
+ __pyx_pw_4lxml_5etree_14_DTDEntityDecl_1__repr__, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("SiblingsIterator(self, node, tag=None, preceding=False)\n Iterates over the siblings of an element.\n\n You can pass the boolean keyword ``preceding`` to specify the direction.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__DTDEntityDecl, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__DTDEntityDecl, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
- #else
0, /*tp_iternext*/
- #endif
- __pyx_methods_4lxml_5etree_SiblingsIterator, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__DTDEntityDecl, /*tp_methods*/
0, /*tp_members*/
- 0, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree__DTDEntityDecl, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_SiblingsIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__DTDEntityDecl, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy __pyx_vtable_4lxml_5etree__ModifyContentOnlyPIProxy;
+static struct __pyx_vtabstruct_4lxml_5etree_DTD __pyx_vtable_4lxml_5etree_DTD;
-static PyObject *__pyx_tp_new_4lxml_5etree__ModifyContentOnlyPIProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ModifyContentOnlyProxy(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_DTD(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_DTD *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy *)o);
- p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy*)__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy;
+ p = ((struct __pyx_obj_4lxml_5etree_DTD *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_DTD;
return o;
}
-static PyObject *__pyx_getprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_1__get__(o);
-}
-
-static int __pyx_setprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
- if (v) {
- return __pyx_pw_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_3__set__(o, v);
+static void __pyx_tp_dealloc_4lxml_5etree_DTD(PyObject *o) {
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
}
- else {
- PyErr_SetString(PyExc_NotImplementedError, "__del__");
- return -1;
+ #endif
+ PyObject_GC_UnTrack(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_3DTD_13__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
}
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__Validator(o);
}
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ModifyContentOnlyPIProxy[] = {
- {(char *)"target", __pyx_getprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target, __pyx_setprop_4lxml_5etree_25_ModifyContentOnlyPIProxy_target, 0, 0},
+static PyObject *__pyx_getprop_4lxml_5etree_3DTD_name(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_3DTD_4name_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_3DTD_external_id(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_3DTD_11external_id_1__get__(o);
+}
+
+static PyObject *__pyx_getprop_4lxml_5etree_3DTD_system_url(PyObject *o, CYTHON_UNUSED void *x) {
+ return __pyx_pw_4lxml_5etree_3DTD_10system_url_1__get__(o);
+}
+
+static PyMethodDef __pyx_methods_4lxml_5etree_DTD[] = {
+ {__Pyx_NAMESTR("iterelements"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_3iterelements, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("elements"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_6elements, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("iterentities"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_8iterentities, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {__Pyx_NAMESTR("entities"), (PyCFunction)__pyx_pw_4lxml_5etree_3DTD_11entities, METH_NOARGS, __Pyx_DOCSTR(0)},
+ {0, 0, 0, 0}
+};
+
+static struct PyGetSetDef __pyx_getsets_4lxml_5etree_DTD[] = {
+ {(char *)"name", __pyx_getprop_4lxml_5etree_3DTD_name, 0, 0, 0},
+ {(char *)"external_id", __pyx_getprop_4lxml_5etree_3DTD_external_id, 0, 0, 0},
+ {(char *)"system_url", __pyx_getprop_4lxml_5etree_3DTD_system_url, 0, 0, 0},
{0, 0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy = {
+static PyTypeObject __pyx_type_4lxml_5etree_DTD = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ModifyContentOnlyPIProxy"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.DTD"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_DTD), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ReadOnlyProxy, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_DTD, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_3__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_3DTD_15__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("A read-only proxy that allows changing the text/target content of a\n processing instruction.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ReadOnlyProxy, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ReadOnlyProxy, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("DTD(self, file=None, external_id=None)\n A DTD validator.\n\n Can load from filesystem directly given a filename or file-like object.\n Alternatively, pass the keyword parameter ``external_id`` to load from a\n catalog.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_14_ReadOnlyProxy_15__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_DTD, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__ModifyContentOnlyPIProxy, /*tp_getset*/
+ __pyx_getsets_4lxml_5etree_DTD, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_3DTD_1__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ModifyContentOnlyPIProxy, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_DTD, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ClassNamespaceRegistry __pyx_vtable_4lxml_5etree__ClassNamespaceRegistry;
+static struct __pyx_vtabstruct_4lxml_5etree_RelaxNG __pyx_vtable_4lxml_5etree_RelaxNG;
-static PyObject *__pyx_tp_new_4lxml_5etree__ClassNamespaceRegistry(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__NamespaceRegistry(t, a, k);
+static PyObject *__pyx_tp_new_4lxml_5etree_RelaxNG(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_RelaxNG *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__NamespaceRegistry*)__pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry;
+ p = ((struct __pyx_obj_4lxml_5etree_RelaxNG *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_RelaxNG;
+ if (unlikely(__pyx_pw_4lxml_5etree_7RelaxNG_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ Py_DECREF(o); o = 0;
+ }
return o;
}
-static int __pyx_mp_ass_subscript_4lxml_5etree__ClassNamespaceRegistry(PyObject *o, PyObject *i, PyObject *v) {
- if (v) {
- return __pyx_pw_4lxml_5etree_23_ClassNamespaceRegistry_1__setitem__(o, i, v);
+static void __pyx_tp_dealloc_4lxml_5etree_RelaxNG(PyObject *o) {
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
}
- else {
- if (__pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping && __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript)
- return __pyx_ptype_4lxml_5etree__NamespaceRegistry->tp_as_mapping->mp_ass_subscript(o, i, v);
- PyErr_Format(PyExc_NotImplementedError,
- "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
- return -1;
+ #endif
+ PyObject_GC_UnTrack(o);
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_4lxml_5etree_7RelaxNG_5__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
}
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__Validator(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ClassNamespaceRegistry[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_RelaxNG[] = {
{0, 0, 0, 0}
};
-static PyMappingMethods __pyx_tp_as_mapping__ClassNamespaceRegistry = {
- 0, /*mp_length*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_18_NamespaceRegistry_5__getitem__, /*mp_subscript*/
- #else
- 0, /*mp_subscript*/
- #endif
- __pyx_mp_ass_subscript_4lxml_5etree__ClassNamespaceRegistry, /*mp_ass_subscript*/
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__ClassNamespaceRegistry = {
+static PyTypeObject __pyx_type_4lxml_5etree_RelaxNG = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ClassNamespaceRegistry"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ClassNamespaceRegistry), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.RelaxNG"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_RelaxNG), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__NamespaceRegistry, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_RelaxNG, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_23_ClassNamespaceRegistry_3__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
- &__pyx_tp_as_mapping__ClassNamespaceRegistry, /*tp_as_mapping*/
+ 0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_7RelaxNG_7__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Dictionary-like registry for namespace implementation classes"), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__NamespaceRegistry, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__NamespaceRegistry, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("RelaxNG(self, etree=None, file=None)\n Turn a document into a Relax NG validator.\n\n Either pass a schema as Element or ElementTree, or pass a file or\n filename through the ``file`` keyword argument.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_18_NamespaceRegistry_9__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ClassNamespaceRegistry, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_RelaxNG, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_7RelaxNG_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ClassNamespaceRegistry, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_RelaxNG, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__ParserSchemaValidationContext __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext;
+static struct __pyx_vtabstruct_4lxml_5etree_Schematron __pyx_vtable_4lxml_5etree_Schematron;
-static PyObject *__pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p;
- PyObject *o;
- o = (*t->tp_alloc)(t, 0);
+static PyObject *__pyx_tp_new_4lxml_5etree_Schematron(PyTypeObject *t, PyObject *a, PyObject *k) {
+ struct __pyx_obj_4lxml_5etree_Schematron *p;
+ PyObject *o = __pyx_tp_new_4lxml_5etree__Validator(t, a, k);
if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o);
- p->__pyx_vtab = __pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext;
- p->_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)Py_None); Py_INCREF(Py_None);
- if (unlikely(__pyx_pw_4lxml_5etree_30_ParserSchemaValidationContext_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
+ p = ((struct __pyx_obj_4lxml_5etree_Schematron *)o);
+ p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__Validator*)__pyx_vtabptr_4lxml_5etree_Schematron;
+ if (unlikely(__pyx_pw_4lxml_5etree_10Schematron_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
Py_DECREF(o); o = 0;
}
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__ParserSchemaValidationContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o;
+static void __pyx_tp_dealloc_4lxml_5etree_Schematron(PyObject *o) {
+ #if PY_VERSION_HEX >= 0x030400a1
+ if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
PyObject_GC_UnTrack(o);
{
PyObject *etype, *eval, *etb;
PyErr_Fetch(&etype, &eval, &etb);
++Py_REFCNT(o);
- __pyx_pw_4lxml_5etree_30_ParserSchemaValidationContext_3__dealloc__(o);
+ __pyx_pw_4lxml_5etree_10Schematron_5__dealloc__(o);
--Py_REFCNT(o);
PyErr_Restore(etype, eval, etb);
}
- Py_CLEAR(p->_schema);
- (*Py_TYPE(o)->tp_free)(o);
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__ParserSchemaValidationContext(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o;
- if (p->_schema) {
- e = (*v)(((PyObject*)p->_schema), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__ParserSchemaValidationContext(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *p = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *)o;
- Py_CLEAR(p->_schema);
- return 0;
+ PyObject_GC_Track(o);
+ __pyx_tp_dealloc_4lxml_5etree__Validator(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__ParserSchemaValidationContext[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree_Schematron[] = {
{0, 0, 0, 0}
};
-static PyTypeObject __pyx_type_4lxml_5etree__ParserSchemaValidationContext = {
+static PyTypeObject __pyx_type_4lxml_5etree_Schematron = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._ParserSchemaValidationContext"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.Schematron"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree_Schematron), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ParserSchemaValidationContext, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree_Schematron, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
- 0, /*tp_call*/
+ __pyx_pw_4lxml_5etree_10Schematron_7__call__, /*tp_call*/
0, /*tp_str*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ParserSchemaValidationContext, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ParserSchemaValidationContext, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ __Pyx_DOCSTR("Schematron(self, etree=None, file=None)\n A Schematron validator.\n\n Pass a root Element or an ElementTree to turn it into a validator.\n Alternatively, pass a filename as keyword argument 'file' to parse from\n the file system.\n\n Schematron is a less well known, but very powerful schema language. The main\n idea is to use the capabilities of XPath to put restrictions on the structure\n and the content of XML documents. Here is a simple example::\n\n >>> schematron = Schematron(XML('''\n ... <schema xmlns=\"http://www.ascc.net/xml/schematron\" >\n ... <pattern name=\"id is the only permited attribute name\">\n ... <rule context=\"*\">\n ... <report test=\"@*[not(name()='id')]\">Attribute\n ... <name path=\"@*[not(name()='id')]\"/> is forbidden<name/>\n ... </report>\n ... </rule>\n ... </pattern>\n ... </schema>\n ... '''))\n\n >>> xml = XML('''\n ... <AAA name=\"aaa\">\n ... <BBB id=\"bbb\"/>\n ... <CCC color=\"ccc\"/>\n ... </AAA>\n ... ''')\n\n >>> schematron.validate(xml)\n 0\n\n >>> xml = XML('''\n ... <AAA id=\"aaa\">\n ... <BBB id=\"bbb\"/>\n ... <CCC/>\n ... </AAA>\n ... ''')\n\n >>> schematron.validate(xml)\n 1\n\n Schematron was added to libxml2 in version 2.6.21. Before version 2.6.32,\n however, Schematron lacked support for error reporting other than to stderr.\n This version is therefore required to retrieve validation warnings and\n errors in lxml.\n "), /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree__Validator, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree__Validator, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__ParserSchemaValidationContext, /*tp_methods*/
+ __pyx_methods_4lxml_5etree_Schematron, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- 0, /*tp_init*/
+ __pyx_pw_4lxml_5etree_10Schematron_3__init__, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__ParserSchemaValidationContext, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree_Schematron, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
#endif
};
-static struct __pyx_obj_4lxml_5etree__DTDEntityDecl *__pyx_freelist_4lxml_5etree__DTDEntityDecl[8];
-static int __pyx_freecount_4lxml_5etree__DTDEntityDecl = 0;
-
-static PyObject *__pyx_tp_new_4lxml_5etree__DTDEntityDecl(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p;
+static PyObject *__pyx_tp_new_4lxml_5etree__MemDebug(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
- if (likely((__pyx_freecount_4lxml_5etree__DTDEntityDecl > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl)))) {
- o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDEntityDecl[--__pyx_freecount_4lxml_5etree__DTDEntityDecl];
- memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl));
- (void) PyObject_INIT(o, t);
- PyObject_GC_Track(o);
- } else {
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- }
- p = ((struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o);
- p->_dtd = ((struct __pyx_obj_4lxml_5etree_DTD *)Py_None); Py_INCREF(Py_None);
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__DTDEntityDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p = (struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o;
- PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_dtd);
- if ((__pyx_freecount_4lxml_5etree__DTDEntityDecl < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl))) {
- __pyx_freelist_4lxml_5etree__DTDEntityDecl[__pyx_freecount_4lxml_5etree__DTDEntityDecl++] = ((struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o);
- } else {
- (*Py_TYPE(o)->tp_free)(o);
- }
-}
-
-static int __pyx_tp_traverse_4lxml_5etree__DTDEntityDecl(PyObject *o, visitproc v, void *a) {
- int e;
- struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p = (struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o;
- if (p->_dtd) {
- e = (*v)(((PyObject*)p->_dtd), a); if (e) return e;
- }
- return 0;
-}
-
-static int __pyx_tp_clear_4lxml_5etree__DTDEntityDecl(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__DTDEntityDecl *p = (struct __pyx_obj_4lxml_5etree__DTDEntityDecl *)o;
- Py_CLEAR(p->_dtd);
- return 0;
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_14_DTDEntityDecl_name(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_14_DTDEntityDecl_4name_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_14_DTDEntityDecl_orig(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_14_DTDEntityDecl_4orig_1__get__(o);
-}
-
-static PyObject *__pyx_getprop_4lxml_5etree_14_DTDEntityDecl_content(PyObject *o, CYTHON_UNUSED void *x) {
- return __pyx_pw_4lxml_5etree_14_DTDEntityDecl_7content_1__get__(o);
+static void __pyx_tp_dealloc_4lxml_5etree__MemDebug(PyObject *o) {
+ (*Py_TYPE(o)->tp_free)(o);
}
-static PyMethodDef __pyx_methods_4lxml_5etree__DTDEntityDecl[] = {
+static PyMethodDef __pyx_methods_4lxml_5etree__MemDebug[] = {
+ {__Pyx_NAMESTR("bytes_used"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_1bytes_used, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_bytes_used)},
+ {__Pyx_NAMESTR("blocks_used"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_3blocks_used, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_2blocks_used)},
+ {__Pyx_NAMESTR("dict_size"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_5dict_size, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_4dict_size)},
+ {__Pyx_NAMESTR("dump"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_7dump, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_6dump)},
+ {__Pyx_NAMESTR("show"), (PyCFunction)__pyx_pw_4lxml_5etree_9_MemDebug_9show, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_9_MemDebug_8show)},
{0, 0, 0, 0}
};
-static struct PyGetSetDef __pyx_getsets_4lxml_5etree__DTDEntityDecl[] = {
- {(char *)"name", __pyx_getprop_4lxml_5etree_14_DTDEntityDecl_name, 0, 0, 0},
- {(char *)"orig", __pyx_getprop_4lxml_5etree_14_DTDEntityDecl_orig, 0, 0, 0},
- {(char *)"content", __pyx_getprop_4lxml_5etree_14_DTDEntityDecl_content, 0, 0, 0},
- {0, 0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__DTDEntityDecl = {
+static PyTypeObject __pyx_type_4lxml_5etree__MemDebug = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._DTDEntityDecl"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__DTDEntityDecl), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree._MemDebug"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree__MemDebug), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__DTDEntityDecl, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree__MemDebug, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- __pyx_pw_4lxml_5etree_14_DTDEntityDecl_1__repr__, /*tp_repr*/
+ 0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- 0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__DTDEntityDecl, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__DTDEntityDecl, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/
+ __Pyx_DOCSTR("Debugging support for the memory allocation in libxml2.\n "), /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__DTDEntityDecl, /*tp_methods*/
+ __pyx_methods_4lxml_5etree__MemDebug, /*tp_methods*/
0, /*tp_members*/
- __pyx_getsets_4lxml_5etree__DTDEntityDecl, /*tp_getset*/
+ 0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dict*/
0, /*tp_descr_get*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__DTDEntityDecl, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree__MemDebug, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
#endif
};
-static PyObject *__pyx_tp_new_4lxml_5etree__AttribIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
- struct __pyx_obj_4lxml_5etree__AttribIterator *p;
+static struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *__pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[8];
+static int __pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct__itervalues(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
PyObject *o;
- o = (*t->tp_alloc)(t, 0);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__AttribIterator *)o);
- p->_node = ((struct LxmlElement *)Py_None); Py_INCREF(Py_None);
+ if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[--__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
return o;
}
-static void __pyx_tp_dealloc_4lxml_5etree__AttribIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__AttribIterator *p = (struct __pyx_obj_4lxml_5etree__AttribIterator *)o;
+static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct__itervalues(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o;
PyObject_GC_UnTrack(o);
- Py_CLEAR(p->_node);
- (*Py_TYPE(o)->tp_free)(o);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues))) {
+ __pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
}
-static int __pyx_tp_traverse_4lxml_5etree__AttribIterator(PyObject *o, visitproc v, void *a) {
+static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct__itervalues(PyObject *o, visitproc v, void *a) {
int e;
- struct __pyx_obj_4lxml_5etree__AttribIterator *p = (struct __pyx_obj_4lxml_5etree__AttribIterator *)o;
- if (p->_node) {
- e = (*v)(((PyObject*)p->_node), a); if (e) return e;
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o;
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
}
return 0;
}
-static int __pyx_tp_clear_4lxml_5etree__AttribIterator(PyObject *o) {
- struct __pyx_obj_4lxml_5etree__AttribIterator *p = (struct __pyx_obj_4lxml_5etree__AttribIterator *)o;
- Py_CLEAR(p->_node);
+static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct__itervalues(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues *)o;
+ Py_CLEAR(p->__pyx_v_self);
return 0;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__AttribIterator[] = {
- {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pw_4lxml_5etree_15_AttribIterator_3__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
- {0, 0, 0, 0}
-};
-
-static PyTypeObject __pyx_type_4lxml_5etree__AttribIterator = {
+static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct__itervalues = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._AttribIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__AttribIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct__itervalues"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct__itervalues), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__AttribIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("Attribute iterator - for internal use only!\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__AttribIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__AttribIterator, /*tp_clear*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- __pyx_pw_4lxml_5etree_15_AttribIterator_1__iter__, /*tp_iter*/
- __pyx_pw_4lxml_5etree_15_AttribIterator_3__next__, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__AttribIterator, /*tp_methods*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__AttribIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree___pyx_scope_struct__itervalues, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_PythonElementClassLookup __pyx_vtable_4lxml_5etree_PythonElementClassLookup;
-static PyObject *__pyx_tp_new_4lxml_5etree_PythonElementClassLookup(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_PythonElementClassLookup *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree_FallbackElementClassLookup(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_PythonElementClassLookup *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup*)__pyx_vtabptr_4lxml_5etree_PythonElementClassLookup;
- if (unlikely(__pyx_pw_4lxml_5etree_24PythonElementClassLookup_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) {
- Py_DECREF(o); o = 0;
+static struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *__pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[8];
+static int __pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_PythonElementClassLookup[] = {
- {__Pyx_NAMESTR("lookup"), (PyCFunction)__pyx_pw_4lxml_5etree_24PythonElementClassLookup_3lookup, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4lxml_5etree_24PythonElementClassLookup_2lookup)},
- {0, 0, 0, 0}
-};
+static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes))) {
+ __pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
-static PyTypeObject __pyx_type_4lxml_5etree_PythonElementClassLookup = {
+static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o;
+ if (p->__pyx_v_node) {
+ e = (*v)(((PyObject*)p->__pyx_v_node), a); if (e) return e;
+ }
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_1_iterattributes(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes *)o;
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_self);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.PythonElementClassLookup"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_PythonElementClassLookup), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct_1_iterattributes"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_1_iterattributes), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree_FallbackElementClassLookup, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("PythonElementClassLookup(self, fallback=None)\n Element class lookup based on a subclass method.\n\n This class lookup scheme allows access to the entire XML tree in\n read-only mode. To use it, re-implement the ``lookup(self, doc,\n root)`` method in a subclass::\n\n from lxml import etree, pyclasslookup\n\n class MyElementClass(etree.ElementBase):\n honkey = True\n\n class MyLookup(pyclasslookup.PythonElementClassLookup):\n def lookup(self, doc, root):\n if root.tag == \"sometag\":\n return MyElementClass\n else:\n for child in root:\n if child.tag == \"someothertag\":\n return MyElementClass\n # delegate to default\n return None\n\n If you return None from this method, the fallback will be called.\n\n The first argument is the opaque document instance that contains\n the Element. The second argument is a lightweight Element proxy\n implementation that is only valid during the lookup. Do not try\n to keep a reference to it. Once the lookup is done, the proxy\n will be invalid.\n\n Also, you cannot wrap such a read-only Element in an ElementTree,\n and you must take care not to keep a reference to them outside of\n the `lookup()` method.\n\n Note that the API of the Element objects is not complete. It is\n purely read-only and does not support all features of the normal\n `lxml.etree` API (such as XPath, extended slicing or some\n iteration methods).\n\n See http://codespeak.net/lxml/element_classes.html\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree_FallbackElementClassLookup, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree_FallbackElementClassLookup, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree_PythonElementClassLookup, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_26FallbackElementClassLookup_3__init__, /*tp_init*/
- #else
0, /*tp_init*/
- #endif
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_PythonElementClassLookup, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree___pyx_scope_struct_1_iterattributes, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator __pyx_vtable_4lxml_5etree_ElementChildIterator;
-static PyObject *__pyx_tp_new_4lxml_5etree_ElementChildIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree_ElementChildIterator *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ElementMatchIterator(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree_ElementChildIterator *)o);
- p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__ElementMatchIterator*)__pyx_vtabptr_4lxml_5etree_ElementChildIterator;
- if (unlikely(__pyx_pw_4lxml_5etree_20ElementChildIterator_1__cinit__(o, a, k) < 0)) {
- Py_DECREF(o); o = 0;
+static struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *__pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[8];
+static int __pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_2_iterelements(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
}
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree_ElementChildIterator[] = {
- {0, 0, 0, 0}
-};
+static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_2_iterelements(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements))) {
+ __pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
-static PyTypeObject __pyx_type_4lxml_5etree_ElementChildIterator = {
+static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_2_iterelements(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o;
+ if (p->__pyx_v_node) {
+ e = (*v)(((PyObject*)p->__pyx_v_node), a); if (e) return e;
+ }
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_2_iterelements(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements *)o;
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_self);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree.ElementChildIterator"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree_ElementChildIterator), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct_2_iterelements"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_2_iterelements), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ElementMatchIterator, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- __Pyx_DOCSTR("ElementChildIterator(self, node, tag=None, reversed=False)\n Iterates over the children of an element.\n "), /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ElementMatchIterator, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ElementMatchIterator, /*tp_clear*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_1__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_21_ElementMatchIterator_3__next__, /*tp_iternext*/
- #else
0, /*tp_iternext*/
- #endif
- __pyx_methods_4lxml_5etree_ElementChildIterator, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree_ElementChildIterator, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree___pyx_scope_struct_2_iterelements, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
0, /*tp_finalize*/
#endif
};
-static struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog __pyx_vtable_4lxml_5etree__RotatingErrorLog;
-static PyObject *__pyx_tp_new_4lxml_5etree__RotatingErrorLog(PyTypeObject *t, PyObject *a, PyObject *k) {
- struct __pyx_obj_4lxml_5etree__RotatingErrorLog *p;
- PyObject *o = __pyx_tp_new_4lxml_5etree__ErrorLog(t, a, k);
- if (unlikely(!o)) return 0;
- p = ((struct __pyx_obj_4lxml_5etree__RotatingErrorLog *)o);
- p->__pyx_base.__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog*)__pyx_vtabptr_4lxml_5etree__RotatingErrorLog;
+static struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *__pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[8];
+static int __pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities = 0;
+
+static PyObject *__pyx_tp_new_4lxml_5etree___pyx_scope_struct_3_iterentities(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities)))) {
+ o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities];
+ memset(o, 0, sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
return o;
}
-static PyMethodDef __pyx_methods_4lxml_5etree__RotatingErrorLog[] = {
- {__Pyx_NAMESTR("receive"), (PyCFunction)__pyx_pw_4lxml_5etree_17_RotatingErrorLog_3receive, METH_O, __Pyx_DOCSTR(0)},
- {0, 0, 0, 0}
-};
+static void __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_3_iterentities(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_self);
+ if ((__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities))) {
+ __pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities++] = ((struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
-static PyTypeObject __pyx_type_4lxml_5etree__RotatingErrorLog = {
+static int __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_3_iterentities(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o;
+ if (p->__pyx_v_node) {
+ e = (*v)(((PyObject*)p->__pyx_v_node), a); if (e) return e;
+ }
+ if (p->__pyx_v_self) {
+ e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_3_iterentities(PyObject *o) {
+ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *p = (struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities *)o;
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_self);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities = {
PyVarObject_HEAD_INIT(0, 0)
- __Pyx_NAMESTR("lxml.etree._RotatingErrorLog"), /*tp_name*/
- sizeof(struct __pyx_obj_4lxml_5etree__RotatingErrorLog), /*tp_basicsize*/
+ __Pyx_NAMESTR("lxml.etree.__pyx_scope_struct_3_iterentities"), /*tp_name*/
+ sizeof(struct __pyx_obj_4lxml_5etree___pyx_scope_struct_3_iterentities), /*tp_basicsize*/
0, /*tp_itemsize*/
- __pyx_tp_dealloc_4lxml_5etree__ErrorLog, /*tp_dealloc*/
+ __pyx_tp_dealloc_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
#else
0, /*reserved*/
#endif
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_13_ListErrorLog_7__repr__, /*tp_repr*/
- #else
0, /*tp_repr*/
- #endif
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
0, /*tp_doc*/
- __pyx_tp_traverse_4lxml_5etree__ErrorLog, /*tp_traverse*/
- __pyx_tp_clear_4lxml_5etree__ErrorLog, /*tp_clear*/
+ __pyx_tp_traverse_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_traverse*/
+ __pyx_tp_clear_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_clear*/
0, /*tp_richcompare*/
0, /*tp_weaklistoffset*/
- #if CYTHON_COMPILING_IN_PYPY
- __pyx_pw_4lxml_5etree_9_ErrorLog_11__iter__, /*tp_iter*/
- #else
0, /*tp_iter*/
- #endif
0, /*tp_iternext*/
- __pyx_methods_4lxml_5etree__RotatingErrorLog, /*tp_methods*/
+ 0, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/
0, /*tp_descr_get*/
0, /*tp_descr_set*/
0, /*tp_dictoffset*/
- __pyx_pw_4lxml_5etree_17_RotatingErrorLog_1__init__, /*tp_init*/
+ 0, /*tp_init*/
0, /*tp_alloc*/
- __pyx_tp_new_4lxml_5etree__RotatingErrorLog, /*tp_new*/
+ __pyx_tp_new_4lxml_5etree___pyx_scope_struct_3_iterentities, /*tp_new*/
0, /*tp_free*/
0, /*tp_is_gc*/
0, /*tp_bases*/
{&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
{&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
{&__pyx_n_s_gzip, __pyx_k_gzip, sizeof(__pyx_k_gzip), 0, 0, 1, 1},
+ {&__pyx_n_s_has_raised, __pyx_k_has_raised, sizeof(__pyx_k_has_raised), 0, 0, 1, 1},
{&__pyx_kp_s_home_stefan_source_Python_lxml, __pyx_k_home_stefan_source_Python_lxml, sizeof(__pyx_k_home_stefan_source_Python_lxml), 0, 0, 1, 0},
{&__pyx_kp_s_home_stefan_source_Python_lxml_10, __pyx_k_home_stefan_source_Python_lxml_10, sizeof(__pyx_k_home_stefan_source_Python_lxml_10), 0, 0, 1, 0},
{&__pyx_kp_s_home_stefan_source_Python_lxml_11, __pyx_k_home_stefan_source_Python_lxml_11, sizeof(__pyx_k_home_stefan_source_Python_lxml_11), 0, 0, 1, 0},
{&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
{&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
{&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
+ {&__pyx_n_s_store_exception, __pyx_k_store_exception, sizeof(__pyx_k_store_exception), 0, 0, 1, 1},
{&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
{&__pyx_kp_u_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 1, 0, 0},
{&__pyx_n_s_string_2, __pyx_k_string_2, sizeof(__pyx_k_string_2), 0, 0, 1, 1},
__pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2357; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_ReferenceError = __Pyx_GetBuiltinName(__pyx_n_s_ReferenceError); if (!__pyx_builtin_ReferenceError) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_LookupError = __Pyx_GetBuiltinName(__pyx_n_s_LookupError); if (!__pyx_builtin_LookupError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_LookupError = __Pyx_GetBuiltinName(__pyx_n_s_LookupError); if (!__pyx_builtin_LookupError) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#if PY_VERSION_HEX < 0x02050000
__Pyx_GOTREF(__pyx_slice__45);
__Pyx_GIVEREF(__pyx_slice__45);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1407
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1463
* XMLParser.__init__(self, **kwargs)
* if events is None:
* events = ('end',) # <<<<<<<<<<<<<<
* self._setBaseURL(base_url)
* self._collectEvents(events, tag)
*/
- __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s_end); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s_end); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__47);
__Pyx_GIVEREF(__pyx_tuple__47);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1571
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1627
* HTMLParser.__init__(self, **kwargs)
* if events is None:
* events = ('end',) # <<<<<<<<<<<<<<
* self._setBaseURL(base_url)
* self._collectEvents(events, tag)
*/
- __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s_end); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s_end); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__48);
__Pyx_GIVEREF(__pyx_tuple__48);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1724
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1780
* if isinstance(text, unicode):
* if _hasEncodingDeclaration(text):
* raise ValueError( # <<<<<<<<<<<<<<
* u"Unicode strings with encoding declaration are not supported. "
* u"Please use bytes input or XML fragments without declaration.")
*/
- __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Unicode_strings_with_encoding_de); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_u_Unicode_strings_with_encoding_de); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1780; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__49);
__Pyx_GIVEREF(__pyx_tuple__49);
* u"""Element(_tag, attrib=None, nsmap=None, **_extra)
*
*/
- __pyx_tuple__122 = PyTuple_Pack(5, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__122 = PyTuple_Pack(4, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__122)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__122);
__Pyx_GIVEREF(__pyx_tuple__122);
- __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_Element, 2801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_Element, 2801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2814
* attrib, nsmap, _extra)
* attrib=None, nsmap=None, **_extra):
* u"""SubElement(_parent, _tag, attrib=None, nsmap=None, **_extra)
*/
- __pyx_tuple__130 = PyTuple_Pack(6, __pyx_n_s_parent, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__130 = PyTuple_Pack(5, __pyx_n_s_parent, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__130)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__130);
__Pyx_GIVEREF(__pyx_tuple__130);
- __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_SubElement, 2899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_SubElement, 2899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2899; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2908
* return _makeSubElement(_parent, _tag, None, None, attrib, nsmap, _extra)
__pyx_tuple__132 = PyTuple_Pack(10, __pyx_n_s_element, __pyx_n_s_file, __pyx_n_s_parser, __pyx_n_s_c_next, __pyx_n_s_c_node, __pyx_n_s_c_node_copy, __pyx_n_s_c_doc, __pyx_n_s_etree, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__132)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__132);
__Pyx_GIVEREF(__pyx_tuple__132);
- __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(3, 2, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_ElementTree, 2908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 2, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_ElementTree, 2908, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2933
* return _elementTreeFactory(doc, element)
__pyx_tuple__134 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__134)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__134);
__Pyx_GIVEREF(__pyx_tuple__134);
- __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_HTML, 2933, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_HTML, 2933, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2958
* return result_container.result
__pyx_tuple__136 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__136)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__136);
__Pyx_GIVEREF(__pyx_tuple__136);
- __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_XML, 2958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_XML, 2958, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":2988
* return result_container.result
__pyx_tuple__138 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__138)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__138);
__Pyx_GIVEREF(__pyx_tuple__138);
- __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_fromstring, 2988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_fromstring, 2988, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3008
* return result_container.result
__pyx_tuple__144 = PyTuple_Pack(4, __pyx_n_s_elem, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_xml); if (unlikely(!__pyx_tuple__144)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__144);
__Pyx_GIVEREF(__pyx_tuple__144);
- __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(3, 2, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_dump, 3035, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 2, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_dump, 3035, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3047
* sys.stdout.write(xml)
__pyx_tuple__146 = PyTuple_Pack(13, __pyx_n_s_element_or_tree, __pyx_n_s_encoding, __pyx_n_s_method, __pyx_n_s_xml_declaration, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_exclusive, __pyx_n_s_with_comments, __pyx_n_s_inclusive_ns_prefixes, __pyx_n_s_write_declaration, __pyx_n_s_is_standalone); if (unlikely(!__pyx_tuple__146)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__146);
__Pyx_GIVEREF(__pyx_tuple__146);
- __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(11, 10, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_tostring, 3047, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 10, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_tostring, 3047, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3139
* python._fqtypename(element_or_tree).decode('utf8')
* u"""tostringlist(element_or_tree, *args, **kwargs)
*
*/
- __pyx_tuple__148 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_args, __pyx_n_s_kwargs, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__148 = PyTuple_Pack(3, __pyx_n_s_element_or_tree, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__148)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__148);
__Pyx_GIVEREF(__pyx_tuple__148);
- __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_tostringlist, 3139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_tostringlist, 3139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3150
* return [tostring(element_or_tree, *args, **kwargs)]
__pyx_tuple__150 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_method, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_doctype); if (unlikely(!__pyx_tuple__150)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__150);
__Pyx_GIVEREF(__pyx_tuple__150);
- __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(5, 4, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_tounicode, 3150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 4, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_tounicode, 3150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/lxml.etree.pyx":3184
* type(element_or_tree)
__pyx_tuple__152 = PyTuple_Pack(5, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__152)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__152);
__Pyx_GIVEREF(__pyx_tuple__152);
- __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_parse, 3184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml, __pyx_n_s_parse, 3184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/classlookup.pxi":551
* LOOKUP_ELEMENT_CLASS = function
__Pyx_GIVEREF(__pyx_tuple__158);
__pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_5, __pyx_n_s_init, 18, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1463
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1519
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER)
*
* def set_default_parser(_BaseParser parser=None): # <<<<<<<<<<<<<<
* u"""set_default_parser(parser=None)
*
*/
- __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__160)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__160)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__160);
__Pyx_GIVEREF(__pyx_tuple__160);
- __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_5, __pyx_n_s_set_default_parser, 1463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_5, __pyx_n_s_set_default_parser, 1519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1479
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1535
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser)
*
* def get_default_parser(): # <<<<<<<<<<<<<<
* u"get_default_parser()"
* return __GLOBAL_PARSER_CONTEXT.getDefaultParser()
*/
- __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_5, __pyx_n_s_get_default_parser, 1479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_5, __pyx_n_s_get_default_parser, 1535, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/saxparser.pxi":468
*
__pyx_tuple__166 = PyTuple_Pack(6, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_dic, __pyx_n_s_root, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__166)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__166);
__Pyx_GIVEREF(__pyx_tuple__166);
- __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(3, 1, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_7, __pyx_n_s_XMLID, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(2, 1, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__166, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_7, __pyx_n_s_XMLID, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlid.pxi":24
* return (root, dic)
__pyx_tuple__168 = PyTuple_Pack(4, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_root); if (unlikely(!__pyx_tuple__168)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__168);
__Pyx_GIVEREF(__pyx_tuple__168);
- __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(3, 1, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_7, __pyx_n_s_XMLDTDID, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__168, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_7, __pyx_n_s_XMLDTDID, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xmlid.pxi":44
* return (root, _IDDict(root))
__pyx_tuple__170 = PyTuple_Pack(4, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2); if (unlikely(!__pyx_tuple__170)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__170);
__Pyx_GIVEREF(__pyx_tuple__170);
- __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(3, 1, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_7, __pyx_n_s_parseid, 44, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__170, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_7, __pyx_n_s_parseid, 44, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/cleanup.pxi":3
* # functions for tree cleanup and removing elements from subtrees
* u"""strip_attributes(tree_or_element, *attribute_names)
*
*/
- __pyx_tuple__174 = PyTuple_Pack(5, __pyx_n_s_tree_or_element, __pyx_n_s_attribute_names, __pyx_n_s_attribute_names, __pyx_n_s_matcher, __pyx_n_s_element); if (unlikely(!__pyx_tuple__174)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__174 = PyTuple_Pack(4, __pyx_n_s_tree_or_element, __pyx_n_s_attribute_names, __pyx_n_s_matcher, __pyx_n_s_element); if (unlikely(!__pyx_tuple__174)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__174);
__Pyx_GIVEREF(__pyx_tuple__174);
- __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_8, __pyx_n_s_strip_attributes, 13, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__174, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_8, __pyx_n_s_strip_attributes, 13, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/cleanup.pxi":54
* tree.END_FOR_EACH_ELEMENT_FROM(c_node)
* u"""strip_elements(tree_or_element, *tag_names, with_tail=True)
*
*/
- __pyx_tuple__176 = PyTuple_Pack(13, __pyx_n_s_tree_or_element, __pyx_n_s_with_tail, __pyx_n_s_tag_names, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_element, __pyx_n_s_doc_2, __pyx_n_s_ns_tags, __pyx_n_s_c_ns_tags, __pyx_n_s_c_tag_count, __pyx_n_s_strip_comments, __pyx_n_s_strip_pis, __pyx_n_s_strip_entities); if (unlikely(!__pyx_tuple__176)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__176 = PyTuple_Pack(12, __pyx_n_s_tree_or_element, __pyx_n_s_with_tail, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_element, __pyx_n_s_doc_2, __pyx_n_s_ns_tags, __pyx_n_s_c_ns_tags, __pyx_n_s_c_tag_count, __pyx_n_s_strip_comments, __pyx_n_s_strip_pis, __pyx_n_s_strip_entities); if (unlikely(!__pyx_tuple__176)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__176);
__Pyx_GIVEREF(__pyx_tuple__176);
- __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(2, 1, 13, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_8, __pyx_n_s_strip_elements, 54, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 1, 12, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_8, __pyx_n_s_strip_elements, 54, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/cleanup.pxi":132
*
* u"""strip_tags(tree_or_element, *tag_names)
*
*/
- __pyx_tuple__178 = PyTuple_Pack(12, __pyx_n_s_tree_or_element, __pyx_n_s_tag_names, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_element, __pyx_n_s_doc_2, __pyx_n_s_ns_tags, __pyx_n_s_strip_comments, __pyx_n_s_strip_pis, __pyx_n_s_strip_entities, __pyx_n_s_c_ns_tags, __pyx_n_s_c_tag_count); if (unlikely(!__pyx_tuple__178)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__178 = PyTuple_Pack(11, __pyx_n_s_tree_or_element, __pyx_n_s_tag_names, __pyx_n_s_matcher, __pyx_n_s_element, __pyx_n_s_doc_2, __pyx_n_s_ns_tags, __pyx_n_s_strip_comments, __pyx_n_s_strip_pis, __pyx_n_s_strip_entities, __pyx_n_s_c_ns_tags, __pyx_n_s_c_tag_count); if (unlikely(!__pyx_tuple__178)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__178);
__Pyx_GIVEREF(__pyx_tuple__178);
- __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_8, __pyx_n_s_strip_tags, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 11, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_8, __pyx_n_s_strip_tags, 132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) {__pyx_filename = __pyx_f[17]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":371
*
__pyx_tuple__181 = PyTuple_Pack(7, __pyx_n_s_module, __pyx_n_s_function_mapping, __pyx_n_s_ns, __pyx_n_s_functions, __pyx_n_s_function_name, __pyx_n_s_xpath_name, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__181)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__181);
__Pyx_GIVEREF(__pyx_tuple__181);
- __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(3, 1, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_9, __pyx_n_s_Extension, 426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(2, 1, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_9, __pyx_n_s_Extension, 426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 426; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/extensions.pxi":735
* # we need to use a Python class here, bytes cannot be C-subclassed
__pyx_tuple__185 = PyTuple_Pack(5, __pyx_n_s_etree_or_element, __pyx_n_s_namespaces, __pyx_n_s_extensions, __pyx_n_s_regexp, __pyx_n_s_smart_strings); if (unlikely(!__pyx_tuple__185)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__185);
__Pyx_GIVEREF(__pyx_tuple__185);
- __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(5, 4, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_10, __pyx_n_s_XPathEvaluator, 380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 4, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_stefan_source_Python_lxml_10, __pyx_n_s_XPathEvaluator, 380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/xpath.pxi":478
* cdef object _replace_strings
if (__Pyx_ExportFunction("initTagMatch", (void (*)(void))initTagMatch, "void (struct LxmlElementTagMatcher *, PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_ExportFunction("findOrBuildNodeNsPrefix", (void (*)(void))findOrBuildNodeNsPrefix, "xmlNs *(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/*--- Type init code ---*/
- __pyx_vtabptr_4lxml_5etree__BaseParser = &__pyx_vtable_4lxml_5etree__BaseParser;
- __pyx_vtable_4lxml_5etree__BaseParser._setBaseURL = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__setBaseURL;
- __pyx_vtable_4lxml_5etree__BaseParser._collectEvents = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__collectEvents;
- __pyx_vtable_4lxml_5etree__BaseParser._getParserContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__getParserContext;
- __pyx_vtable_4lxml_5etree__BaseParser._getPushParserContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__getPushParserContext;
- __pyx_vtable_4lxml_5etree__BaseParser._createContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__createContext;
- __pyx_vtable_4lxml_5etree__BaseParser._registerHtmlErrorHandler = (int (*)(struct __pyx_obj_4lxml_5etree__BaseParser *, xmlParserCtxt *))__pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler;
- __pyx_vtable_4lxml_5etree__BaseParser._newParserCtxt = (xmlParserCtxt *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt;
- __pyx_vtable_4lxml_5etree__BaseParser._newPushParserCtxt = (xmlParserCtxt *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt;
- __pyx_vtable_4lxml_5etree__BaseParser._copy = (struct __pyx_obj_4lxml_5etree__BaseParser *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__copy;
- __pyx_vtable_4lxml_5etree__BaseParser._parseUnicodeDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, char *))__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc;
- __pyx_vtable_4lxml_5etree__BaseParser._parseDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *, int, char *))__pyx_f_4lxml_5etree_11_BaseParser__parseDoc;
- __pyx_vtable_4lxml_5etree__BaseParser._parseDocFromFile = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *))__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile;
- __pyx_vtable_4lxml_5etree__BaseParser._parseDocFromFilelike = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__BaseParser.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseParser.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__BaseParser = &__pyx_type_4lxml_5etree__BaseParser;
- __pyx_vtabptr_4lxml_5etree__FeedParser = &__pyx_vtable_4lxml_5etree__FeedParser;
- __pyx_vtable_4lxml_5etree__FeedParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseParser;
- __pyx_vtable_4lxml_5etree__FeedParser.feed = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__FeedParser *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_11_FeedParser_feed;
- __pyx_vtable_4lxml_5etree__FeedParser.close = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__FeedParser *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_11_FeedParser_close;
- __pyx_type_4lxml_5etree__FeedParser.tp_base = __pyx_ptype_4lxml_5etree__BaseParser;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__FeedParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__FeedParser.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FeedParser.tp_dict, __pyx_vtabptr_4lxml_5etree__FeedParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_FeedParser", (PyObject *)&__pyx_type_4lxml_5etree__FeedParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__FeedParser = &__pyx_type_4lxml_5etree__FeedParser;
- __pyx_vtabptr_4lxml_5etree_XMLParser = &__pyx_vtable_4lxml_5etree_XMLParser;
- __pyx_vtable_4lxml_5etree_XMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__FeedParser;
- __pyx_type_4lxml_5etree_XMLParser.tp_base = __pyx_ptype_4lxml_5etree__FeedParser;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XMLParser.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XMLParser", (PyObject *)&__pyx_type_4lxml_5etree_XMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XMLParser = &__pyx_type_4lxml_5etree_XMLParser;
- __pyx_vtabptr_4lxml_5etree_ETCompatXMLParser = &__pyx_vtable_4lxml_5etree_ETCompatXMLParser;
- __pyx_vtable_4lxml_5etree_ETCompatXMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XMLParser;
- __pyx_type_4lxml_5etree_ETCompatXMLParser.tp_base = __pyx_ptype_4lxml_5etree_XMLParser;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ETCompatXMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ETCompatXMLParser.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ETCompatXMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_ETCompatXMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ETCompatXMLParser", (PyObject *)&__pyx_type_4lxml_5etree_ETCompatXMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ETCompatXMLParser = &__pyx_type_4lxml_5etree_ETCompatXMLParser;
+ __pyx_vtabptr_4lxml_5etree__TempStore = &__pyx_vtable_4lxml_5etree__TempStore;
+ __pyx_vtable_4lxml_5etree__TempStore.add = (int (*)(struct __pyx_obj_4lxml_5etree__TempStore *, PyObject *))__pyx_f_4lxml_5etree_10_TempStore_add;
+ __pyx_vtable_4lxml_5etree__TempStore.clear = (int (*)(struct __pyx_obj_4lxml_5etree__TempStore *))__pyx_f_4lxml_5etree_10_TempStore_clear;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__TempStore) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__TempStore.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TempStore.tp_dict, __pyx_vtabptr_4lxml_5etree__TempStore) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__TempStore = &__pyx_type_4lxml_5etree__TempStore;
+ __pyx_vtabptr_4lxml_5etree__ExceptionContext = &__pyx_vtable_4lxml_5etree__ExceptionContext;
+ __pyx_vtable_4lxml_5etree__ExceptionContext.clear = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext_clear;
+ __pyx_vtable_4lxml_5etree__ExceptionContext._store_raised = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__store_raised;
+ __pyx_vtable_4lxml_5etree__ExceptionContext._store_exception = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *, PyObject *))__pyx_f_4lxml_5etree_17_ExceptionContext__store_exception;
+ __pyx_vtable_4lxml_5etree__ExceptionContext._has_raised = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__has_raised;
+ __pyx_vtable_4lxml_5etree__ExceptionContext._raise_if_stored = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ExceptionContext) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ExceptionContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExceptionContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ExceptionContext) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ExceptionContext = &__pyx_type_4lxml_5etree__ExceptionContext;
+ __pyx_vtabptr_4lxml_5etree__Document = &__pyx_vtable_4lxml_5etree__Document;
+ __pyx_vtable_4lxml_5etree__Document.getroot = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_getroot;
+ __pyx_vtable_4lxml_5etree__Document.hasdoctype = (int (*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_hasdoctype;
+ __pyx_vtable_4lxml_5etree__Document.getdoctype = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_getdoctype;
+ __pyx_vtable_4lxml_5etree__Document.getxmlinfo = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_getxmlinfo;
+ __pyx_vtable_4lxml_5etree__Document.isstandalone = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_isstandalone;
+ __pyx_vtable_4lxml_5etree__Document.buildNewPrefix = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_buildNewPrefix;
+ __pyx_vtable_4lxml_5etree__Document._findOrBuildNodeNs = (xmlNs *(*)(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *, int))__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs;
+ __pyx_vtable_4lxml_5etree__Document._setNodeNs = (int (*)(struct LxmlDocument *, xmlNode *, const xmlChar *))__pyx_f_4lxml_5etree_9_Document__setNodeNs;
+ if (PyType_Ready(&LxmlDocumentType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ LxmlDocumentType.tp_print = 0;
+ if (__Pyx_SetVtable(LxmlDocumentType.tp_dict, __pyx_vtabptr_4lxml_5etree__Document) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_Document", (PyObject *)&LxmlDocumentType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__Document = &LxmlDocumentType;
if (PyType_Ready(&LxmlElementType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
LxmlElementType.tp_print = 0;
#if CYTHON_COMPILING_IN_CPYTHON
#endif
if (__Pyx_SetAttrString(__pyx_m, "_Element", (PyObject *)&LxmlElementType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__Element = &LxmlElementType;
+ __pyx_vtabptr_4lxml_5etree__BaseParser = &__pyx_vtable_4lxml_5etree__BaseParser;
+ __pyx_vtable_4lxml_5etree__BaseParser._setBaseURL = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__setBaseURL;
+ __pyx_vtable_4lxml_5etree__BaseParser._collectEvents = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__collectEvents;
+ __pyx_vtable_4lxml_5etree__BaseParser._getParserContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__getParserContext;
+ __pyx_vtable_4lxml_5etree__BaseParser._getPushParserContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__getPushParserContext;
+ __pyx_vtable_4lxml_5etree__BaseParser._createContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__createContext;
+ __pyx_vtable_4lxml_5etree__BaseParser._registerHtmlErrorHandler = (int (*)(struct __pyx_obj_4lxml_5etree__BaseParser *, xmlParserCtxt *))__pyx_f_4lxml_5etree_11_BaseParser__registerHtmlErrorHandler;
+ __pyx_vtable_4lxml_5etree__BaseParser._newParserCtxt = (xmlParserCtxt *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__newParserCtxt;
+ __pyx_vtable_4lxml_5etree__BaseParser._newPushParserCtxt = (xmlParserCtxt *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt;
+ __pyx_vtable_4lxml_5etree__BaseParser._copy = (struct __pyx_obj_4lxml_5etree__BaseParser *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_11_BaseParser__copy;
+ __pyx_vtable_4lxml_5etree__BaseParser._parseUnicodeDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, char *))__pyx_f_4lxml_5etree_11_BaseParser__parseUnicodeDoc;
+ __pyx_vtable_4lxml_5etree__BaseParser._parseDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *, int, char *))__pyx_f_4lxml_5etree_11_BaseParser__parseDoc;
+ __pyx_vtable_4lxml_5etree__BaseParser._parseDocFromFile = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, char *))__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFile;
+ __pyx_vtable_4lxml_5etree__BaseParser._parseDocFromFilelike = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__BaseParser *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_11_BaseParser__parseDocFromFilelike;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__BaseParser.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseParser.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__BaseParser = &__pyx_type_4lxml_5etree__BaseParser;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_QName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_QName.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "QName", (PyObject *)&__pyx_type_4lxml_5etree_QName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_QName = &__pyx_type_4lxml_5etree_QName;
+ __pyx_vtabptr_4lxml_5etree__LogEntry = &__pyx_vtable_4lxml_5etree__LogEntry;
+ __pyx_vtable_4lxml_5etree__LogEntry._setError = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__LogEntry *, xmlError *))__pyx_f_4lxml_5etree_9_LogEntry__setError;
+ __pyx_vtable_4lxml_5etree__LogEntry._setGeneric = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__LogEntry *, int, int, int, int, PyObject *, PyObject *))__pyx_f_4lxml_5etree_9_LogEntry__setGeneric;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__LogEntry) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__LogEntry.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__LogEntry.tp_dict, __pyx_vtabptr_4lxml_5etree__LogEntry) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_LogEntry", (PyObject *)&__pyx_type_4lxml_5etree__LogEntry) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__LogEntry = &__pyx_type_4lxml_5etree__LogEntry;
+ __pyx_vtabptr_4lxml_5etree__BaseErrorLog = &__pyx_vtable_4lxml_5etree__BaseErrorLog;
+ __pyx_vtable_4lxml_5etree__BaseErrorLog.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_BaseErrorLog_copy;
+ __pyx_vtable_4lxml_5etree__BaseErrorLog.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_BaseErrorLog_receive;
+ __pyx_vtable_4lxml_5etree__BaseErrorLog._receive = (void (*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, xmlError *))__pyx_f_4lxml_5etree_13_BaseErrorLog__receive;
+ __pyx_vtable_4lxml_5etree__BaseErrorLog._receiveGeneric = (void (*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int, int, int, int, PyObject *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric;
+ __pyx_vtable_4lxml_5etree__BaseErrorLog._buildParseException = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException;
+ __pyx_vtable_4lxml_5etree__BaseErrorLog._buildExceptionMessage = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__BaseErrorLog.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_BaseErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__BaseErrorLog = &__pyx_type_4lxml_5etree__BaseErrorLog;
+ __pyx_vtabptr_4lxml_5etree__ListErrorLog = &__pyx_vtable_4lxml_5etree__ListErrorLog;
+ __pyx_vtable_4lxml_5etree__ListErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseErrorLog;
+ __pyx_vtable_4lxml_5etree__ListErrorLog.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_ListErrorLog_copy;
+ __pyx_type_4lxml_5etree__ListErrorLog.tp_base = __pyx_ptype_4lxml_5etree__BaseErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ListErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ListErrorLog.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ListErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ListErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_ListErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__ListErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ListErrorLog = &__pyx_type_4lxml_5etree__ListErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLogContext) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ErrorLogContext.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__ErrorLogContext = &__pyx_type_4lxml_5etree__ErrorLogContext;
+ __pyx_vtabptr_4lxml_5etree__ErrorLog = &__pyx_vtable_4lxml_5etree__ErrorLog;
+ __pyx_vtable_4lxml_5etree__ErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ListErrorLog;
+ __pyx_vtable_4lxml_5etree__ErrorLog.__pyx_base.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_9_ErrorLog_copy;
+ __pyx_vtable_4lxml_5etree__ErrorLog.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_9_ErrorLog_receive;
+ __pyx_vtable_4lxml_5etree__ErrorLog.__pyx___enter__ = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLog *))__pyx_f_4lxml_5etree_9_ErrorLog___enter__;
+ __pyx_vtable_4lxml_5etree__ErrorLog.connect = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLog *))__pyx_f_4lxml_5etree_9_ErrorLog_connect;
+ __pyx_vtable_4lxml_5etree__ErrorLog.disconnect = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLog *))__pyx_f_4lxml_5etree_9_ErrorLog_disconnect;
+ __pyx_vtable_4lxml_5etree__ErrorLog.clear = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_9_ErrorLog_clear;
+ __pyx_type_4lxml_5etree__ErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ListErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ErrorLog.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_ErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__ErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ErrorLog = &__pyx_type_4lxml_5etree__ErrorLog;
+ __pyx_vtabptr_4lxml_5etree__DomainErrorLog = &__pyx_vtable_4lxml_5etree__DomainErrorLog;
+ __pyx_vtable_4lxml_5etree__DomainErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ErrorLog;
+ __pyx_vtable_4lxml_5etree__DomainErrorLog.__pyx_base.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_15_DomainErrorLog_receive;
+ __pyx_type_4lxml_5etree__DomainErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__DomainErrorLog.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__DomainErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__DomainErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_DomainErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__DomainErrorLog = &__pyx_type_4lxml_5etree__DomainErrorLog;
+ __pyx_vtabptr_4lxml_5etree__RotatingErrorLog = &__pyx_vtable_4lxml_5etree__RotatingErrorLog;
+ __pyx_vtable_4lxml_5etree__RotatingErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ErrorLog;
+ __pyx_vtable_4lxml_5etree__RotatingErrorLog.__pyx_base.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive;
+ __pyx_type_4lxml_5etree__RotatingErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__RotatingErrorLog.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__RotatingErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__RotatingErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_RotatingErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__RotatingErrorLog = &__pyx_type_4lxml_5etree__RotatingErrorLog;
+ __pyx_vtabptr_4lxml_5etree_PyErrorLog = &__pyx_vtable_4lxml_5etree_PyErrorLog;
+ __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseErrorLog;
+ __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10PyErrorLog_copy;
+ __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10PyErrorLog_receive;
+ __pyx_type_4lxml_5etree_PyErrorLog.tp_base = __pyx_ptype_4lxml_5etree__BaseErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_PyErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_PyErrorLog.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PyErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree_PyErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "PyErrorLog", (PyObject *)&__pyx_type_4lxml_5etree_PyErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_PyErrorLog = &__pyx_type_4lxml_5etree_PyErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_DocInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_DocInfo.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "DocInfo", (PyObject *)&__pyx_type_4lxml_5etree_DocInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_DocInfo = &__pyx_type_4lxml_5etree_DocInfo;
__pyx_vtabptr_4lxml_5etree___ContentOnlyElement = &__pyx_vtable_4lxml_5etree___ContentOnlyElement;
__pyx_vtable_4lxml_5etree___ContentOnlyElement._raiseImmutable = (int (*)(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *))__pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable;
__pyx_type_4lxml_5etree___ContentOnlyElement.tp_base = __pyx_ptype_4lxml_5etree__Element;
#endif
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree___ContentOnlyElement.tp_dict, __pyx_vtabptr_4lxml_5etree___ContentOnlyElement) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree___ContentOnlyElement = &__pyx_type_4lxml_5etree___ContentOnlyElement;
+ __pyx_vtabptr_4lxml_5etree__Comment = &__pyx_vtable_4lxml_5etree__Comment;
+ __pyx_vtable_4lxml_5etree__Comment.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
+ __pyx_type_4lxml_5etree__Comment.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__Comment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__Comment.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Comment.tp_dict, __pyx_vtabptr_4lxml_5etree__Comment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_Comment", (PyObject *)&__pyx_type_4lxml_5etree__Comment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__Comment = &__pyx_type_4lxml_5etree__Comment;
__pyx_vtabptr_4lxml_5etree__ProcessingInstruction = &__pyx_vtable_4lxml_5etree__ProcessingInstruction;
__pyx_vtable_4lxml_5etree__ProcessingInstruction.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
__pyx_type_4lxml_5etree__ProcessingInstruction.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ProcessingInstruction.tp_dict, __pyx_vtabptr_4lxml_5etree__ProcessingInstruction) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_SetAttrString(__pyx_m, "_ProcessingInstruction", (PyObject *)&__pyx_type_4lxml_5etree__ProcessingInstruction) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__ProcessingInstruction = &__pyx_type_4lxml_5etree__ProcessingInstruction;
+ __pyx_vtabptr_4lxml_5etree__Entity = &__pyx_vtable_4lxml_5etree__Entity;
+ __pyx_vtable_4lxml_5etree__Entity.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
+ __pyx_type_4lxml_5etree__Entity.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__Entity) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__Entity.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Entity.tp_dict, __pyx_vtabptr_4lxml_5etree__Entity) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_Entity", (PyObject *)&__pyx_type_4lxml_5etree__Entity) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__Entity = &__pyx_type_4lxml_5etree__Entity;
+ __pyx_vtabptr_4lxml_5etree__ElementTree = &__pyx_vtable_4lxml_5etree__ElementTree;
+ __pyx_vtable_4lxml_5etree__ElementTree._assertHasRoot = (int (*)(struct LxmlElementTree *))__pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot;
+ if (PyType_Ready(&LxmlElementTreeType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ LxmlElementTreeType.tp_print = 0;
+ if (__Pyx_SetVtable(LxmlElementTreeType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_ElementTree", (PyObject *)&LxmlElementTreeType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ElementTree = &LxmlElementTreeType;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__Attrib) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__Attrib.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "_Attrib", (PyObject *)&__pyx_type_4lxml_5etree__Attrib) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__Attrib = &__pyx_type_4lxml_5etree__Attrib;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__AttribIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__AttribIterator.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__AttribIterator = &__pyx_type_4lxml_5etree__AttribIterator;
+ __pyx_vtabptr_4lxml_5etree__ElementTagMatcher = &__pyx_vtable_4lxml_5etree__ElementTagMatcher;
+ __pyx_vtable_4lxml_5etree__ElementTagMatcher._initTagMatch = (PyObject *(*)(struct LxmlElementTagMatcher *, PyObject *))__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch;
+ if (PyType_Ready(&LxmlElementTagMatcherType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ LxmlElementTagMatcherType.tp_print = 0;
+ if (__Pyx_SetVtable(LxmlElementTagMatcherType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTagMatcher) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_ElementTagMatcher", (PyObject *)&LxmlElementTagMatcherType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ElementTagMatcher = &LxmlElementTagMatcherType;
+ __pyx_vtabptr_4lxml_5etree__ElementIterator = &__pyx_vtable_4lxml_5etree__ElementIterator;
+ __pyx_vtable_4lxml_5etree__ElementIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementTagMatcher;
+ __pyx_vtable_4lxml_5etree__ElementIterator._storeNext = (void (*)(struct LxmlElementIterator *, struct LxmlElement *))__pyx_f_4lxml_5etree_16_ElementIterator__storeNext;
+ LxmlElementIteratorType.tp_base = __pyx_ptype_4lxml_5etree__ElementTagMatcher;
+ if (PyType_Ready(&LxmlElementIteratorType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ LxmlElementIteratorType.tp_print = 0;
+ if (__Pyx_SetVtable(LxmlElementIteratorType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_ElementIterator", (PyObject *)&LxmlElementIteratorType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ElementIterator = &LxmlElementIteratorType;
+ __pyx_vtabptr_4lxml_5etree__MultiTagMatcher = &__pyx_vtable_4lxml_5etree__MultiTagMatcher;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.rejectsAll = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.rejectsAllAttributes = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesType = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, int))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher._clear = (void (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *))__pyx_f_4lxml_5etree_16_MultiTagMatcher__clear;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.initTagMatch = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher._storeTags = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.cacheTags = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, struct LxmlDocument *, struct __pyx_opt_args_4lxml_5etree_16_MultiTagMatcher_cacheTags *__pyx_optional_args))__pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.matches = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlNode *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matches;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesNsTag = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, const xmlChar *, const xmlChar *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag;
+ __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesAttribute = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribute;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__MultiTagMatcher) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__MultiTagMatcher.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__MultiTagMatcher.tp_dict, __pyx_vtabptr_4lxml_5etree__MultiTagMatcher) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__MultiTagMatcher = &__pyx_type_4lxml_5etree__MultiTagMatcher;
+ __pyx_vtabptr_4lxml_5etree__ElementMatchIterator = &__pyx_vtable_4lxml_5etree__ElementMatchIterator;
+ __pyx_vtable_4lxml_5etree__ElementMatchIterator._initTagMatcher = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, PyObject *))__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher;
+ __pyx_vtable_4lxml_5etree__ElementMatchIterator._storeNext = (int (*)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *))__pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ElementMatchIterator.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ElementMatchIterator.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementMatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_ElementMatchIterator", (PyObject *)&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ElementMatchIterator = &__pyx_type_4lxml_5etree__ElementMatchIterator;
+ __pyx_vtabptr_4lxml_5etree_ElementChildIterator = &__pyx_vtable_4lxml_5etree_ElementChildIterator;
+ __pyx_vtable_4lxml_5etree_ElementChildIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
+ __pyx_type_4lxml_5etree_ElementChildIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ElementChildIterator.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementChildIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ElementChildIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ElementChildIterator = &__pyx_type_4lxml_5etree_ElementChildIterator;
+ __pyx_vtabptr_4lxml_5etree_SiblingsIterator = &__pyx_vtable_4lxml_5etree_SiblingsIterator;
+ __pyx_vtable_4lxml_5etree_SiblingsIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
+ __pyx_type_4lxml_5etree_SiblingsIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_SiblingsIterator.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_SiblingsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_SiblingsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "SiblingsIterator", (PyObject *)&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_SiblingsIterator = &__pyx_type_4lxml_5etree_SiblingsIterator;
+ __pyx_vtabptr_4lxml_5etree_AncestorsIterator = &__pyx_vtable_4lxml_5etree_AncestorsIterator;
+ __pyx_vtable_4lxml_5etree_AncestorsIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
+ __pyx_type_4lxml_5etree_AncestorsIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_AncestorsIterator.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_AncestorsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_AncestorsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "AncestorsIterator", (PyObject *)&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_AncestorsIterator = &__pyx_type_4lxml_5etree_AncestorsIterator;
+ __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator = &__pyx_vtable_4lxml_5etree_ElementDepthFirstIterator;
+ __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator._nextNodeAnyTag = (xmlNode *(*)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *))__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag;
+ __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator._nextNodeMatchTag = (xmlNode *(*)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *))__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchTag;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ElementDepthFirstIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ElementDepthFirstIterator = &__pyx_type_4lxml_5etree_ElementDepthFirstIterator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ElementTextIterator.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "ElementTextIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ElementTextIterator = &__pyx_type_4lxml_5etree_ElementTextIterator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_CDATA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_CDATA.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "CDATA", (PyObject *)&__pyx_type_4lxml_5etree_CDATA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_CDATA = &__pyx_type_4lxml_5etree_CDATA;
+ __pyx_vtabptr_4lxml_5etree__ReadOnlyProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyProxy;
+ __pyx_vtable_4lxml_5etree__ReadOnlyProxy._assertNode = (int (*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *))__pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode;
+ __pyx_vtable_4lxml_5etree__ReadOnlyProxy._raise_unsupported_type = (int (*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *))__pyx_f_4lxml_5etree_14_ReadOnlyProxy__raise_unsupported_type;
+ __pyx_vtable_4lxml_5etree__ReadOnlyProxy.free_after_use = (void (*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *))__pyx_f_4lxml_5etree_14_ReadOnlyProxy_free_after_use;
+ __pyx_vtable_4lxml_5etree__ReadOnlyProxy.__pyx___copy__ = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__;
+ __pyx_vtable_4lxml_5etree__ReadOnlyProxy.getchildren = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ReadOnlyProxy.tp_print = 0;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ {
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree__ReadOnlyProxy, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+ __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_4__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_4__getitem__.doc = __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_4__getitem__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_4__getitem__;
+ }
+ }
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON
+ {
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree__ReadOnlyProxy, "__len__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+ __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_6__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_6__len__.doc = __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_6__len__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_6__len__;
+ }
+ }
+ #endif
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ReadOnlyProxy = &__pyx_type_4lxml_5etree__ReadOnlyProxy;
+ __pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyPIProxy;
+ __pyx_vtable_4lxml_5etree__ReadOnlyPIProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
+ __pyx_type_4lxml_5etree__ReadOnlyPIProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ReadOnlyPIProxy.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyPIProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ReadOnlyPIProxy = &__pyx_type_4lxml_5etree__ReadOnlyPIProxy;
+ __pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyEntityProxy;
+ __pyx_vtable_4lxml_5etree__ReadOnlyEntityProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
+ __pyx_type_4lxml_5etree__ReadOnlyEntityProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ReadOnlyEntityProxy.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyEntityProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ReadOnlyEntityProxy = &__pyx_type_4lxml_5etree__ReadOnlyEntityProxy;
+ __pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyElementProxy;
+ __pyx_vtable_4lxml_5etree__ReadOnlyElementProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
+ __pyx_type_4lxml_5etree__ReadOnlyElementProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ReadOnlyElementProxy.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyElementProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ReadOnlyElementProxy = &__pyx_type_4lxml_5etree__ReadOnlyElementProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__OpaqueNodeWrapper) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__OpaqueNodeWrapper.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__OpaqueNodeWrapper = &__pyx_type_4lxml_5etree__OpaqueNodeWrapper;
+ __pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper = &__pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper;
+ __pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper._assertNode = (int (*)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *))__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode;
+ __pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper.append = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append;
+ __pyx_type_4lxml_5etree__OpaqueDocumentWrapper.tp_base = __pyx_ptype_4lxml_5etree__OpaqueNodeWrapper;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__OpaqueDocumentWrapper) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__OpaqueDocumentWrapper.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__OpaqueDocumentWrapper.tp_dict, __pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__OpaqueDocumentWrapper = &__pyx_type_4lxml_5etree__OpaqueDocumentWrapper;
+ __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy = &__pyx_vtable_4lxml_5etree__ModifyContentOnlyProxy;
+ __pyx_vtable_4lxml_5etree__ModifyContentOnlyProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
+ __pyx_type_4lxml_5etree__ModifyContentOnlyProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ModifyContentOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ModifyContentOnlyProxy.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ModifyContentOnlyProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy = &__pyx_type_4lxml_5etree__ModifyContentOnlyProxy;
+ __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy = &__pyx_vtable_4lxml_5etree__ModifyContentOnlyPIProxy;
+ __pyx_vtable_4lxml_5etree__ModifyContentOnlyPIProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
+ __pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy.tp_base = __pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ModifyContentOnlyPIProxy = &__pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy;
+ __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy = &__pyx_vtable_4lxml_5etree__ModifyContentOnlyEntityProxy;
+ __pyx_vtable_4lxml_5etree__ModifyContentOnlyEntityProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
+ __pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy.tp_base = __pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ModifyContentOnlyEntityProxy = &__pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy;
+ __pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy = &__pyx_vtable_4lxml_5etree__AppendOnlyElementProxy;
+ __pyx_vtable_4lxml_5etree__AppendOnlyElementProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy;
+ __pyx_vtable_4lxml_5etree__AppendOnlyElementProxy.append = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append;
+ __pyx_type_4lxml_5etree__AppendOnlyElementProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyElementProxy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__AppendOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__AppendOnlyElementProxy.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__AppendOnlyElementProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__AppendOnlyElementProxy = &__pyx_type_4lxml_5etree__AppendOnlyElementProxy;
+ LxmlElementBaseType.tp_base = __pyx_ptype_4lxml_5etree__Element;
+ if (PyType_Ready(&LxmlElementBaseType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ LxmlElementBaseType.tp_print = 0;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ {
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&LxmlElementBaseType, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+ __pyx_wrapperbase_4lxml_5etree_11ElementBase___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_11ElementBase___init__.doc = __pyx_doc_4lxml_5etree_11ElementBase___init__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_11ElementBase___init__;
+ }
+ }
+ #endif
+ if (__Pyx_SetAttrString(__pyx_m, "ElementBase", (PyObject *)&LxmlElementBaseType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ElementBase = &LxmlElementBaseType;
+ __pyx_vtabptr_4lxml_5etree_CommentBase = &__pyx_vtable_4lxml_5etree_CommentBase;
+ __pyx_vtable_4lxml_5etree_CommentBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Comment;
+ __pyx_type_4lxml_5etree_CommentBase.tp_base = __pyx_ptype_4lxml_5etree__Comment;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_CommentBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_CommentBase.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_CommentBase.tp_dict, __pyx_vtabptr_4lxml_5etree_CommentBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "CommentBase", (PyObject *)&__pyx_type_4lxml_5etree_CommentBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_CommentBase = &__pyx_type_4lxml_5etree_CommentBase;
__pyx_vtabptr_4lxml_5etree_PIBase = &__pyx_vtable_4lxml_5etree_PIBase;
__pyx_vtable_4lxml_5etree_PIBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ProcessingInstruction;
__pyx_type_4lxml_5etree_PIBase.tp_base = __pyx_ptype_4lxml_5etree__ProcessingInstruction;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PIBase.tp_dict, __pyx_vtabptr_4lxml_5etree_PIBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_SetAttrString(__pyx_m, "PIBase", (PyObject *)&__pyx_type_4lxml_5etree_PIBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree_PIBase = &__pyx_type_4lxml_5etree_PIBase;
- __pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction = &__pyx_vtable_4lxml_5etree__XSLTProcessingInstruction;
- __pyx_vtable_4lxml_5etree__XSLTProcessingInstruction.__pyx_base = *__pyx_vtabptr_4lxml_5etree_PIBase;
- __pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_base = __pyx_ptype_4lxml_5etree_PIBase;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTProcessingInstruction) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_XSLTProcessingInstruction", (PyObject *)&__pyx_type_4lxml_5etree__XSLTProcessingInstruction) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__XSLTProcessingInstruction = &__pyx_type_4lxml_5etree__XSLTProcessingInstruction;
- __pyx_vtabptr_4lxml_5etree_XMLPullParser = &__pyx_vtable_4lxml_5etree_XMLPullParser;
- __pyx_vtable_4lxml_5etree_XMLPullParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XMLParser;
- __pyx_type_4lxml_5etree_XMLPullParser.tp_base = __pyx_ptype_4lxml_5etree_XMLParser;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XMLPullParser.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLPullParser.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XMLPullParser", (PyObject *)&__pyx_type_4lxml_5etree_XMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1386; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XMLPullParser = &__pyx_type_4lxml_5etree_XMLPullParser;
- if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct__itervalues) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree___pyx_scope_struct__itervalues.tp_print = 0;
- __pyx_ptype_4lxml_5etree___pyx_scope_struct__itervalues = &__pyx_type_4lxml_5etree___pyx_scope_struct__itervalues;
+ __pyx_vtabptr_4lxml_5etree_EntityBase = &__pyx_vtable_4lxml_5etree_EntityBase;
+ __pyx_vtable_4lxml_5etree_EntityBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Entity;
+ __pyx_type_4lxml_5etree_EntityBase.tp_base = __pyx_ptype_4lxml_5etree__Entity;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_EntityBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_EntityBase.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_EntityBase.tp_dict, __pyx_vtabptr_4lxml_5etree_EntityBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "EntityBase", (PyObject *)&__pyx_type_4lxml_5etree_EntityBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_EntityBase = &__pyx_type_4lxml_5etree_EntityBase;
+ if (PyType_Ready(&LxmlElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ LxmlElementClassLookupType.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "ElementClassLookup", (PyObject *)&LxmlElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ElementClassLookup = &LxmlElementClassLookupType;
+ __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup = &__pyx_vtable_4lxml_5etree_FallbackElementClassLookup;
+ __pyx_vtable_4lxml_5etree_FallbackElementClassLookup._setFallback = (void (*)(struct LxmlFallbackElementClassLookup *, struct LxmlElementClassLookup *))__pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback;
+ LxmlFallbackElementClassLookupType.tp_base = __pyx_ptype_4lxml_5etree_ElementClassLookup;
+ if (PyType_Ready(&LxmlFallbackElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ LxmlFallbackElementClassLookupType.tp_print = 0;
+ if (__Pyx_SetVtable(LxmlFallbackElementClassLookupType.tp_dict, __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "FallbackElementClassLookup", (PyObject *)&LxmlFallbackElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_FallbackElementClassLookup = &LxmlFallbackElementClassLookupType;
+ __pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_base = __pyx_ptype_4lxml_5etree_ElementClassLookup;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDefaultClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "ElementDefaultClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ElementDefaultClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ElementDefaultClassLookup = &__pyx_type_4lxml_5etree_ElementDefaultClassLookup;
+ __pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup = &__pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup;
+ __pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
+ __pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "AttributeBasedElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_AttributeBasedElementClassLookup = &__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup;
+ __pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup = &__pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup;
+ __pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
+ __pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ParserBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ParserBasedElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ParserBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup = &__pyx_type_4lxml_5etree_ParserBasedElementClassLookup;
+ __pyx_vtabptr_4lxml_5etree_CustomElementClassLookup = &__pyx_vtable_4lxml_5etree_CustomElementClassLookup;
+ __pyx_vtable_4lxml_5etree_CustomElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
+ __pyx_type_4lxml_5etree_CustomElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_CustomElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_CustomElementClassLookup.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_CustomElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_CustomElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "CustomElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_CustomElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_CustomElementClassLookup = &__pyx_type_4lxml_5etree_CustomElementClassLookup;
+ __pyx_vtabptr_4lxml_5etree_PythonElementClassLookup = &__pyx_vtable_4lxml_5etree_PythonElementClassLookup;
+ __pyx_vtable_4lxml_5etree_PythonElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
+ __pyx_type_4lxml_5etree_PythonElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_PythonElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_PythonElementClassLookup.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PythonElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_PythonElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "PythonElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_PythonElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_PythonElementClassLookup = &__pyx_type_4lxml_5etree_PythonElementClassLookup;
__pyx_vtabptr_4lxml_5etree__NamespaceRegistry = &__pyx_vtable_4lxml_5etree__NamespaceRegistry;
__pyx_vtable_4lxml_5etree__NamespaceRegistry._get = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, PyObject *))__pyx_f_4lxml_5etree_18_NamespaceRegistry__get;
__pyx_vtable_4lxml_5etree__NamespaceRegistry._getForString = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__NamespaceRegistry *, char *))__pyx_f_4lxml_5etree_18_NamespaceRegistry__getForString;
__pyx_type_4lxml_5etree__NamespaceRegistry.tp_print = 0;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__NamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__NamespaceRegistry) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__NamespaceRegistry = &__pyx_type_4lxml_5etree__NamespaceRegistry;
+ __pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry = &__pyx_vtable_4lxml_5etree__ClassNamespaceRegistry;
+ __pyx_vtable_4lxml_5etree__ClassNamespaceRegistry.__pyx_base = *__pyx_vtabptr_4lxml_5etree__NamespaceRegistry;
+ __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_base = __pyx_ptype_4lxml_5etree__NamespaceRegistry;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ClassNamespaceRegistry) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ClassNamespaceRegistry = &__pyx_type_4lxml_5etree__ClassNamespaceRegistry;
+ __pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup = &__pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup;
+ __pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
+ __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ElementNamespaceClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup = &__pyx_type_4lxml_5etree_ElementNamespaceClassLookup;
__pyx_vtabptr_4lxml_5etree__FunctionNamespaceRegistry = &__pyx_vtable_4lxml_5etree__FunctionNamespaceRegistry;
__pyx_vtable_4lxml_5etree__FunctionNamespaceRegistry.__pyx_base = *__pyx_vtabptr_4lxml_5etree__NamespaceRegistry;
__pyx_type_4lxml_5etree__FunctionNamespaceRegistry.tp_base = __pyx_ptype_4lxml_5etree__NamespaceRegistry;
__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_print = 0;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__XPathFunctionNamespaceRegistry) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__XPathFunctionNamespaceRegistry = &__pyx_type_4lxml_5etree__XPathFunctionNamespaceRegistry;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__InputDocument) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__InputDocument.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__InputDocument = &__pyx_type_4lxml_5etree__InputDocument;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_Resolver) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_Resolver.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "Resolver", (PyObject *)&__pyx_type_4lxml_5etree_Resolver) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_Resolver = &__pyx_type_4lxml_5etree_Resolver;
+ __pyx_vtabptr_4lxml_5etree__ResolverRegistry = &__pyx_vtable_4lxml_5etree__ResolverRegistry;
+ __pyx_vtable_4lxml_5etree__ResolverRegistry._copy = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *(*)(struct __pyx_obj_4lxml_5etree__ResolverRegistry *))__pyx_f_4lxml_5etree_17_ResolverRegistry__copy;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverRegistry) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ResolverRegistry.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverRegistry) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ResolverRegistry = &__pyx_type_4lxml_5etree__ResolverRegistry;
+ __pyx_vtabptr_4lxml_5etree__ResolverContext = &__pyx_vtable_4lxml_5etree__ResolverContext;
+ __pyx_vtable_4lxml_5etree__ResolverContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ExceptionContext;
+ __pyx_vtable_4lxml_5etree__ResolverContext.__pyx_base.clear = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_16_ResolverContext_clear;
+ __pyx_type_4lxml_5etree__ResolverContext.tp_base = __pyx_ptype_4lxml_5etree__ExceptionContext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverContext) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ResolverContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverContext) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ResolverContext = &__pyx_type_4lxml_5etree__ResolverContext;
+ __pyx_vtabptr_4lxml_5etree__ParserContext = &__pyx_vtable_4lxml_5etree__ParserContext;
+ __pyx_vtable_4lxml_5etree__ParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ResolverContext;
+ __pyx_vtable_4lxml_5etree__ParserContext._copy = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext__copy;
+ __pyx_vtable_4lxml_5etree__ParserContext._initParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_14_ParserContext__initParserContext;
+ __pyx_vtable_4lxml_5etree__ParserContext._resetParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext__resetParserContext;
+ __pyx_vtable_4lxml_5etree__ParserContext.prepare = (int (*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext_prepare;
+ __pyx_vtable_4lxml_5etree__ParserContext.cleanup = (int (*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext_cleanup;
+ __pyx_vtable_4lxml_5etree__ParserContext._handleParseResult = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult;
+ __pyx_vtable_4lxml_5etree__ParserContext._handleParseResultDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc;
+ __pyx_type_4lxml_5etree__ParserContext.tp_base = __pyx_ptype_4lxml_5etree__ResolverContext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ParserContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ParserContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ParserContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ParserContext = &__pyx_type_4lxml_5etree__ParserContext;
+ __pyx_vtabptr_4lxml_5etree__SaxParserContext = &__pyx_vtable_4lxml_5etree__SaxParserContext;
+ __pyx_vtable_4lxml_5etree__SaxParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ParserContext;
+ __pyx_vtable_4lxml_5etree__SaxParserContext.__pyx_base._initParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext;
+ __pyx_vtable_4lxml_5etree__SaxParserContext._setSaxParserTarget = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, struct __pyx_obj_4lxml_5etree__SaxParserTarget *))__pyx_f_4lxml_5etree_17_SaxParserContext__setSaxParserTarget;
+ __pyx_vtable_4lxml_5etree__SaxParserContext._connectTarget = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget;
+ __pyx_vtable_4lxml_5etree__SaxParserContext._connectEvents = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents;
+ __pyx_vtable_4lxml_5etree__SaxParserContext._setEventFilter = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter;
+ __pyx_vtable_4lxml_5etree__SaxParserContext.startDocument = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlDoc *))__pyx_f_4lxml_5etree_17_SaxParserContext_startDocument;
+ __pyx_vtable_4lxml_5etree__SaxParserContext.pushEvent = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, PyObject *, xmlNode *))__pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent;
+ __pyx_vtable_4lxml_5etree__SaxParserContext.flushEvents = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *))__pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents;
+ __pyx_vtable_4lxml_5etree__SaxParserContext._handleSaxException = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException;
+ __pyx_type_4lxml_5etree__SaxParserContext.tp_base = __pyx_ptype_4lxml_5etree__ParserContext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__SaxParserContext) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__SaxParserContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__SaxParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__SaxParserContext) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__SaxParserContext = &__pyx_type_4lxml_5etree__SaxParserContext;
+ __pyx_vtabptr_4lxml_5etree__TargetParserContext = &__pyx_vtable_4lxml_5etree__TargetParserContext;
+ __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__SaxParserContext;
+ __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base.__pyx_base._copy = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_20_TargetParserContext__copy;
+ __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base.__pyx_base._handleParseResult = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult;
+ __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base.__pyx_base._handleParseResultDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc;
+ __pyx_vtable_4lxml_5etree__TargetParserContext._setTarget = (int (*)(struct __pyx_obj_4lxml_5etree__TargetParserContext *, PyObject *))__pyx_f_4lxml_5etree_20_TargetParserContext__setTarget;
+ __pyx_vtable_4lxml_5etree__TargetParserContext._cleanupTargetParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__TargetParserContext *, xmlDoc *))__pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserContext;
+ __pyx_type_4lxml_5etree__TargetParserContext.tp_base = __pyx_ptype_4lxml_5etree__SaxParserContext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__TargetParserContext) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__TargetParserContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TargetParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__TargetParserContext) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__TargetParserContext = &__pyx_type_4lxml_5etree__TargetParserContext;
+ __pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext = &__pyx_vtable_4lxml_5etree__ParserSchemaValidationContext;
+ __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.copy = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *(*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy;
+ __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.inject_default_attributes = (void (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlDoc *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes;
+ __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.connect = (int (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlParserCtxt *, struct __pyx_obj_4lxml_5etree__BaseErrorLog *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect;
+ __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.disconnect = (void (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect;
+ __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.isvalid = (int (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ParserSchemaValidationContext) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ParserSchemaValidationContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ParserSchemaValidationContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ParserSchemaValidationContext = &__pyx_type_4lxml_5etree__ParserSchemaValidationContext;
+ __pyx_vtabptr_4lxml_5etree__Validator = &__pyx_vtable_4lxml_5etree__Validator;
+ __pyx_vtable_4lxml_5etree__Validator._append_log_message = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__Validator *, int, int, int, int, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10_Validator__append_log_message;
+ __pyx_vtable_4lxml_5etree__Validator._clear_error_log = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__Validator *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10_Validator__clear_error_log;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__Validator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__Validator.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Validator.tp_dict, __pyx_vtabptr_4lxml_5etree__Validator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_Validator", (PyObject *)&__pyx_type_4lxml_5etree__Validator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__Validator = &__pyx_type_4lxml_5etree__Validator;
+ __pyx_vtabptr_4lxml_5etree_XMLSchema = &__pyx_vtable_4lxml_5etree_XMLSchema;
+ __pyx_vtable_4lxml_5etree_XMLSchema.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator;
+ __pyx_vtable_4lxml_5etree_XMLSchema._newSaxValidator = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *(*)(struct __pyx_obj_4lxml_5etree_XMLSchema *, int))__pyx_f_4lxml_5etree_9XMLSchema__newSaxValidator;
+ __pyx_type_4lxml_5etree_XMLSchema.tp_base = __pyx_ptype_4lxml_5etree__Validator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLSchema) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XMLSchema.tp_print = 0;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ {
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XMLSchema, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+ __pyx_wrapperbase_4lxml_5etree_9XMLSchema_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_9XMLSchema_6__call__.doc = __pyx_doc_4lxml_5etree_9XMLSchema_6__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_9XMLSchema_6__call__;
+ }
+ }
+ #endif
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLSchema.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLSchema) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XMLSchema", (PyObject *)&__pyx_type_4lxml_5etree_XMLSchema) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XMLSchema = &__pyx_type_4lxml_5etree_XMLSchema;
+ __pyx_vtabptr_4lxml_5etree__ParserDictionaryContext = &__pyx_vtable_4lxml_5etree__ParserDictionaryContext;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initMainParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext._findThreadParserContext = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.setDefaultParser = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.getDefaultParser = (struct __pyx_obj_4lxml_5etree__BaseParser *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext._getThreadDict = (xmlDict *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initThreadDictRef = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict **))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initParserDict = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initXPathParserDict = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlXPathContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initDocDict = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDoc *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.findImpliedContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_findImpliedContext;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.pushImpliedContextFromParser = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFromParser;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.pushImpliedContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext;
+ __pyx_vtable_4lxml_5etree__ParserDictionaryContext.popImpliedContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ParserDictionaryContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ParserDictionaryContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ParserDictionaryContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ParserDictionaryContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ParserDictionaryContext = &__pyx_type_4lxml_5etree__ParserDictionaryContext;
__pyx_vtabptr_4lxml_5etree__FileReaderContext = &__pyx_vtable_4lxml_5etree__FileReaderContext;
__pyx_vtable_4lxml_5etree__FileReaderContext._close_file = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__FileReaderContext *))__pyx_f_4lxml_5etree_18_FileReaderContext__close_file;
__pyx_vtable_4lxml_5etree__FileReaderContext._createParserInputBuffer = (xmlParserInputBuffer *(*)(struct __pyx_obj_4lxml_5etree__FileReaderContext *))__pyx_f_4lxml_5etree_18_FileReaderContext__createParserInputBuffer;
__pyx_vtable_4lxml_5etree__FileReaderContext._readDtd = (xmlDtd *(*)(struct __pyx_obj_4lxml_5etree__FileReaderContext *))__pyx_f_4lxml_5etree_18_FileReaderContext__readDtd;
__pyx_vtable_4lxml_5etree__FileReaderContext._readDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, xmlParserCtxt *, int))__pyx_f_4lxml_5etree_18_FileReaderContext__readDoc;
__pyx_vtable_4lxml_5etree__FileReaderContext.copyToBuffer = (int (*)(struct __pyx_obj_4lxml_5etree__FileReaderContext *, char *, int))__pyx_f_4lxml_5etree_18_FileReaderContext_copyToBuffer;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__FileReaderContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__FileReaderContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_type_4lxml_5etree__FileReaderContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FileReaderContext.tp_dict, __pyx_vtabptr_4lxml_5etree__FileReaderContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FileReaderContext.tp_dict, __pyx_vtabptr_4lxml_5etree__FileReaderContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__FileReaderContext = &__pyx_type_4lxml_5etree__FileReaderContext;
- __pyx_vtabptr_4lxml_5etree__BaseErrorLog = &__pyx_vtable_4lxml_5etree__BaseErrorLog;
- __pyx_vtable_4lxml_5etree__BaseErrorLog.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_BaseErrorLog_copy;
- __pyx_vtable_4lxml_5etree__BaseErrorLog.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_BaseErrorLog_receive;
- __pyx_vtable_4lxml_5etree__BaseErrorLog._receive = (void (*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, xmlError *))__pyx_f_4lxml_5etree_13_BaseErrorLog__receive;
- __pyx_vtable_4lxml_5etree__BaseErrorLog._receiveGeneric = (void (*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int, int, int, int, PyObject *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric;
- __pyx_vtable_4lxml_5etree__BaseErrorLog._buildParseException = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException;
- __pyx_vtable_4lxml_5etree__BaseErrorLog._buildExceptionMessage = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__BaseErrorLog.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_BaseErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__BaseErrorLog = &__pyx_type_4lxml_5etree__BaseErrorLog;
- __pyx_vtabptr_4lxml_5etree__ElementTagMatcher = &__pyx_vtable_4lxml_5etree__ElementTagMatcher;
- __pyx_vtable_4lxml_5etree__ElementTagMatcher._initTagMatch = (PyObject *(*)(struct LxmlElementTagMatcher *, PyObject *))__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch;
- if (PyType_Ready(&LxmlElementTagMatcherType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- LxmlElementTagMatcherType.tp_print = 0;
- if (__Pyx_SetVtable(LxmlElementTagMatcherType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTagMatcher) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_ElementTagMatcher", (PyObject *)&LxmlElementTagMatcherType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ElementTagMatcher = &LxmlElementTagMatcherType;
- __pyx_vtabptr_4lxml_5etree_XSLT = &__pyx_vtable_4lxml_5etree_XSLT;
- __pyx_vtable_4lxml_5etree_XSLT._run_transform = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree_XSLT *, xmlDoc *, const char **, struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *))__pyx_f_4lxml_5etree_4XSLT__run_transform;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XSLT.tp_print = 0;
- #if CYTHON_COMPILING_IN_CPYTHON
- {
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XSLT, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_4XSLT_18__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_4XSLT_18__call__.doc = __pyx_doc_4lxml_5etree_4XSLT_18__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_4XSLT_18__call__;
- }
- }
- #endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLT.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XSLT", (PyObject *)&__pyx_type_4lxml_5etree_XSLT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XSLT = &__pyx_type_4lxml_5etree_XSLT;
- __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator = &__pyx_vtable_4lxml_5etree_ElementDepthFirstIterator;
- __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator._nextNodeAnyTag = (xmlNode *(*)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *))__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag;
- __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator._nextNodeMatchTag = (xmlNode *(*)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *))__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchTag;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ElementDepthFirstIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2668; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ElementDepthFirstIterator = &__pyx_type_4lxml_5etree_ElementDepthFirstIterator;
- if (PyType_Ready(&LxmlElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- LxmlElementClassLookupType.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "ElementClassLookup", (PyObject *)&LxmlElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ElementClassLookup = &LxmlElementClassLookupType;
- __pyx_vtabptr_4lxml_5etree__ResolverRegistry = &__pyx_vtable_4lxml_5etree__ResolverRegistry;
- __pyx_vtable_4lxml_5etree__ResolverRegistry._copy = (struct __pyx_obj_4lxml_5etree__ResolverRegistry *(*)(struct __pyx_obj_4lxml_5etree__ResolverRegistry *))__pyx_f_4lxml_5etree_17_ResolverRegistry__copy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverRegistry) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ResolverRegistry.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverRegistry) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ResolverRegistry = &__pyx_type_4lxml_5etree__ResolverRegistry;
+ __pyx_vtabptr_4lxml_5etree__FeedParser = &__pyx_vtable_4lxml_5etree__FeedParser;
+ __pyx_vtable_4lxml_5etree__FeedParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseParser;
+ __pyx_vtable_4lxml_5etree__FeedParser.feed = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__FeedParser *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_11_FeedParser_feed;
+ __pyx_vtable_4lxml_5etree__FeedParser.close = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__FeedParser *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_11_FeedParser_close;
+ __pyx_type_4lxml_5etree__FeedParser.tp_base = __pyx_ptype_4lxml_5etree__BaseParser;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__FeedParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__FeedParser.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FeedParser.tp_dict, __pyx_vtabptr_4lxml_5etree__FeedParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_FeedParser", (PyObject *)&__pyx_type_4lxml_5etree__FeedParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__FeedParser = &__pyx_type_4lxml_5etree__FeedParser;
+ __pyx_vtabptr_4lxml_5etree_XMLParser = &__pyx_vtable_4lxml_5etree_XMLParser;
+ __pyx_vtable_4lxml_5etree_XMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__FeedParser;
+ __pyx_type_4lxml_5etree_XMLParser.tp_base = __pyx_ptype_4lxml_5etree__FeedParser;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XMLParser.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XMLParser", (PyObject *)&__pyx_type_4lxml_5etree_XMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1359; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XMLParser = &__pyx_type_4lxml_5etree_XMLParser;
+ __pyx_vtabptr_4lxml_5etree_XMLPullParser = &__pyx_vtable_4lxml_5etree_XMLPullParser;
+ __pyx_vtable_4lxml_5etree_XMLPullParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XMLParser;
+ __pyx_type_4lxml_5etree_XMLPullParser.tp_base = __pyx_ptype_4lxml_5etree_XMLParser;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XMLPullParser.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLPullParser.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XMLPullParser", (PyObject *)&__pyx_type_4lxml_5etree_XMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XMLPullParser = &__pyx_type_4lxml_5etree_XMLPullParser;
+ __pyx_vtabptr_4lxml_5etree_ETCompatXMLParser = &__pyx_vtable_4lxml_5etree_ETCompatXMLParser;
+ __pyx_vtable_4lxml_5etree_ETCompatXMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XMLParser;
+ __pyx_type_4lxml_5etree_ETCompatXMLParser.tp_base = __pyx_ptype_4lxml_5etree_XMLParser;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ETCompatXMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ETCompatXMLParser.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ETCompatXMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_ETCompatXMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ETCompatXMLParser", (PyObject *)&__pyx_type_4lxml_5etree_ETCompatXMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1471; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ETCompatXMLParser = &__pyx_type_4lxml_5etree_ETCompatXMLParser;
+ __pyx_vtabptr_4lxml_5etree_HTMLParser = &__pyx_vtable_4lxml_5etree_HTMLParser;
+ __pyx_vtable_4lxml_5etree_HTMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__FeedParser;
+ __pyx_type_4lxml_5etree_HTMLParser.tp_base = __pyx_ptype_4lxml_5etree__FeedParser;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_HTMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_HTMLParser.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_HTMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_HTMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "HTMLParser", (PyObject *)&__pyx_type_4lxml_5etree_HTMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_HTMLParser = &__pyx_type_4lxml_5etree_HTMLParser;
+ __pyx_vtabptr_4lxml_5etree_HTMLPullParser = &__pyx_vtable_4lxml_5etree_HTMLPullParser;
+ __pyx_vtable_4lxml_5etree_HTMLPullParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_HTMLParser;
+ __pyx_type_4lxml_5etree_HTMLPullParser.tp_base = __pyx_ptype_4lxml_5etree_HTMLParser;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_HTMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_HTMLPullParser.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_HTMLPullParser.tp_dict, __pyx_vtabptr_4lxml_5etree_HTMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "HTMLPullParser", (PyObject *)&__pyx_type_4lxml_5etree_HTMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_HTMLPullParser = &__pyx_type_4lxml_5etree_HTMLPullParser;
__pyx_vtabptr_4lxml_5etree__SaxParserTarget = &__pyx_vtable_4lxml_5etree__SaxParserTarget;
__pyx_vtable_4lxml_5etree__SaxParserTarget._handleSaxStart = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxStart;
__pyx_vtable_4lxml_5etree__SaxParserTarget._handleSaxEnd = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_16_SaxParserTarget__handleSaxEnd;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__SaxParserTarget.tp_dict, __pyx_vtabptr_4lxml_5etree__SaxParserTarget) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_SetAttrString(__pyx_m, "_SaxParserTarget", (PyObject *)&__pyx_type_4lxml_5etree__SaxParserTarget) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__SaxParserTarget = &__pyx_type_4lxml_5etree__SaxParserTarget;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ParseEventsIterator) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ParseEventsIterator.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__ParseEventsIterator = &__pyx_type_4lxml_5etree__ParseEventsIterator;
__pyx_vtabptr_4lxml_5etree_TreeBuilder = &__pyx_vtable_4lxml_5etree_TreeBuilder;
__pyx_vtable_4lxml_5etree_TreeBuilder.__pyx_base = *__pyx_vtabptr_4lxml_5etree__SaxParserTarget;
__pyx_vtable_4lxml_5etree_TreeBuilder.__pyx_base._handleSaxStart = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_TreeBuilder.tp_dict, __pyx_vtabptr_4lxml_5etree_TreeBuilder) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_SetAttrString(__pyx_m, "TreeBuilder", (PyObject *)&__pyx_type_4lxml_5etree_TreeBuilder) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 627; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree_TreeBuilder = &__pyx_type_4lxml_5etree_TreeBuilder;
- __pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase = &__pyx_vtable_4lxml_5etree__XPathEvaluatorBase;
- __pyx_vtable_4lxml_5etree__XPathEvaluatorBase.set_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathContext *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase_set_context;
- __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._checkAbsolutePath = (int (*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, char *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath;
- __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._lock = (int (*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock;
- __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._unlock = (void (*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock;
- __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._raise_parse_error = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__raise_parse_error;
- __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._raise_eval_error = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__raise_eval_error;
- __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._handle_result = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathObject *, struct LxmlDocument *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__XPathEvaluatorBase) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__XPathEvaluatorBase.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XPathEvaluatorBase.tp_dict, __pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_XPathEvaluatorBase", (PyObject *)&__pyx_type_4lxml_5etree__XPathEvaluatorBase) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__XPathEvaluatorBase = &__pyx_type_4lxml_5etree__XPathEvaluatorBase;
- __pyx_vtabptr_4lxml_5etree_XPathElementEvaluator = &__pyx_vtable_4lxml_5etree_XPathElementEvaluator;
- __pyx_vtable_4lxml_5etree_XPathElementEvaluator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
- __pyx_type_4lxml_5etree_XPathElementEvaluator.tp_base = __pyx_ptype_4lxml_5etree__XPathEvaluatorBase;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathElementEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XPathElementEvaluator.tp_print = 0;
- #if CYTHON_COMPILING_IN_CPYTHON
- {
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XPathElementEvaluator, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_21XPathElementEvaluator_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_21XPathElementEvaluator_6__call__.doc = __pyx_doc_4lxml_5etree_21XPathElementEvaluator_6__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_21XPathElementEvaluator_6__call__;
- }
- }
- #endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPathElementEvaluator.tp_dict, __pyx_vtabptr_4lxml_5etree_XPathElementEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XPathElementEvaluator", (PyObject *)&__pyx_type_4lxml_5etree_XPathElementEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XPathElementEvaluator = &__pyx_type_4lxml_5etree_XPathElementEvaluator;
- __pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator = &__pyx_vtable_4lxml_5etree_XPathDocumentEvaluator;
- __pyx_vtable_4lxml_5etree_XPathDocumentEvaluator.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XPathElementEvaluator;
- __pyx_type_4lxml_5etree_XPathDocumentEvaluator.tp_base = __pyx_ptype_4lxml_5etree_XPathElementEvaluator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathDocumentEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XPathDocumentEvaluator.tp_print = 0;
- #if CYTHON_COMPILING_IN_CPYTHON
- {
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XPathDocumentEvaluator, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_22XPathDocumentEvaluator_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_22XPathDocumentEvaluator_2__call__.doc = __pyx_doc_4lxml_5etree_22XPathDocumentEvaluator_2__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_22XPathDocumentEvaluator_2__call__;
- }
- }
- #endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPathDocumentEvaluator.tp_dict, __pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XPathDocumentEvaluator", (PyObject *)&__pyx_type_4lxml_5etree_XPathDocumentEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XPathDocumentEvaluator = &__pyx_type_4lxml_5etree_XPathDocumentEvaluator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes.tp_print = 0;
- __pyx_ptype_4lxml_5etree___pyx_scope_struct_1_iterattributes = &__pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes;
- __pyx_vtabptr_4lxml_5etree__Comment = &__pyx_vtable_4lxml_5etree__Comment;
- __pyx_vtable_4lxml_5etree__Comment.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
- __pyx_type_4lxml_5etree__Comment.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__Comment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__Comment.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Comment.tp_dict, __pyx_vtabptr_4lxml_5etree__Comment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_Comment", (PyObject *)&__pyx_type_4lxml_5etree__Comment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__Comment = &__pyx_type_4lxml_5etree__Comment;
- __pyx_vtabptr_4lxml_5etree__MultiTagMatcher = &__pyx_vtable_4lxml_5etree__MultiTagMatcher;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.rejectsAll = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.rejectsAllAttributes = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesType = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, int))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher._clear = (void (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *))__pyx_f_4lxml_5etree_16_MultiTagMatcher__clear;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.initTagMatch = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher._storeTags = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.cacheTags = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, struct LxmlDocument *, struct __pyx_opt_args_4lxml_5etree_16_MultiTagMatcher_cacheTags *__pyx_optional_args))__pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.matches = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlNode *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matches;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesNsTag = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, const xmlChar *, const xmlChar *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag;
- __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesAttribute = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribute;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__MultiTagMatcher) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__MultiTagMatcher.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__MultiTagMatcher.tp_dict, __pyx_vtabptr_4lxml_5etree__MultiTagMatcher) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__MultiTagMatcher = &__pyx_type_4lxml_5etree__MultiTagMatcher;
- __pyx_vtabptr_4lxml_5etree_XPath = &__pyx_vtable_4lxml_5etree_XPath;
- __pyx_vtable_4lxml_5etree_XPath.__pyx_base = *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
- __pyx_type_4lxml_5etree_XPath.tp_base = __pyx_ptype_4lxml_5etree__XPathEvaluatorBase;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XPath.tp_print = 0;
- #if CYTHON_COMPILING_IN_CPYTHON
- {
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XPath, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_5XPath_4__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_5XPath_4__call__.doc = __pyx_doc_4lxml_5etree_5XPath_4__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_5XPath_4__call__;
- }
- }
- #endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPath.tp_dict, __pyx_vtabptr_4lxml_5etree_XPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XPath", (PyObject *)&__pyx_type_4lxml_5etree_XPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XPath = &__pyx_type_4lxml_5etree_XPath;
- __pyx_vtabptr_4lxml_5etree_ETXPath = &__pyx_vtable_4lxml_5etree_ETXPath;
- __pyx_vtable_4lxml_5etree_ETXPath.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XPath;
- __pyx_vtable_4lxml_5etree_ETXPath._nsextract_path = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_ETXPath *, PyObject *))__pyx_f_4lxml_5etree_7ETXPath__nsextract_path;
- __pyx_type_4lxml_5etree_ETXPath.tp_base = __pyx_ptype_4lxml_5etree_XPath;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ETXPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ETXPath.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ETXPath.tp_dict, __pyx_vtabptr_4lxml_5etree_ETXPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ETXPath", (PyObject *)&__pyx_type_4lxml_5etree_ETXPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ETXPath = &__pyx_type_4lxml_5etree_ETXPath;
- __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup = &__pyx_vtable_4lxml_5etree_FallbackElementClassLookup;
- __pyx_vtable_4lxml_5etree_FallbackElementClassLookup._setFallback = (void (*)(struct LxmlFallbackElementClassLookup *, struct LxmlElementClassLookup *))__pyx_f_4lxml_5etree_26FallbackElementClassLookup__setFallback;
- LxmlFallbackElementClassLookupType.tp_base = __pyx_ptype_4lxml_5etree_ElementClassLookup;
- if (PyType_Ready(&LxmlFallbackElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- LxmlFallbackElementClassLookupType.tp_print = 0;
- if (__Pyx_SetVtable(LxmlFallbackElementClassLookupType.tp_dict, __pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "FallbackElementClassLookup", (PyObject *)&LxmlFallbackElementClassLookupType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_FallbackElementClassLookup = &LxmlFallbackElementClassLookupType;
- __pyx_vtabptr_4lxml_5etree_CustomElementClassLookup = &__pyx_vtable_4lxml_5etree_CustomElementClassLookup;
- __pyx_vtable_4lxml_5etree_CustomElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
- __pyx_type_4lxml_5etree_CustomElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_CustomElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_CustomElementClassLookup.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_CustomElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_CustomElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "CustomElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_CustomElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_CustomElementClassLookup = &__pyx_type_4lxml_5etree_CustomElementClassLookup;
+ __pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget = &__pyx_vtable_4lxml_5etree__PythonSaxParserTarget;
+ __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base = *__pyx_vtabptr_4lxml_5etree__SaxParserTarget;
+ __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxStart = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart;
+ __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxEnd = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxEnd;
+ __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxData = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxData;
+ __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxDoctype = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype;
+ __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxPi = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi;
+ __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxComment = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment;
+ __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_base = __pyx_ptype_4lxml_5etree__SaxParserTarget;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__PythonSaxParserTarget) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_dict, __pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__PythonSaxParserTarget = &__pyx_type_4lxml_5etree__PythonSaxParserTarget;
+ __pyx_vtabptr_4lxml_5etree__FilelikeWriter = &__pyx_vtable_4lxml_5etree__FilelikeWriter;
+ __pyx_vtable_4lxml_5etree__FilelikeWriter._createOutputBuffer = (xmlOutputBuffer *(*)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, xmlCharEncodingHandler *))__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer;
+ __pyx_vtable_4lxml_5etree__FilelikeWriter.write = (int (*)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, char *, int))__pyx_f_4lxml_5etree_15_FilelikeWriter_write;
+ __pyx_vtable_4lxml_5etree__FilelikeWriter.close = (int (*)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *))__pyx_f_4lxml_5etree_15_FilelikeWriter_close;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__FilelikeWriter) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__FilelikeWriter.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FilelikeWriter.tp_dict, __pyx_vtabptr_4lxml_5etree__FilelikeWriter) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__FilelikeWriter = &__pyx_type_4lxml_5etree__FilelikeWriter;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_xmlfile) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_xmlfile.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "xmlfile", (PyObject *)&__pyx_type_4lxml_5etree_xmlfile) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_xmlfile = &__pyx_type_4lxml_5etree_xmlfile;
__pyx_vtabptr_4lxml_5etree__IncrementalFileWriter = &__pyx_vtable_4lxml_5etree__IncrementalFileWriter;
__pyx_vtable_4lxml_5etree__IncrementalFileWriter._write_qname = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_qname;
__pyx_vtable_4lxml_5etree__IncrementalFileWriter._write_start_element = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IncrementalFileWriter *, PyObject *))__pyx_f_4lxml_5etree_22_IncrementalFileWriter__write_start_element;
__pyx_type_4lxml_5etree__IncrementalFileWriter.tp_print = 0;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__IncrementalFileWriter.tp_dict, __pyx_vtabptr_4lxml_5etree__IncrementalFileWriter) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 651; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__IncrementalFileWriter = &__pyx_type_4lxml_5etree__IncrementalFileWriter;
- __pyx_vtabptr_4lxml_5etree__ReadOnlyProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyProxy;
- __pyx_vtable_4lxml_5etree__ReadOnlyProxy._assertNode = (int (*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *))__pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode;
- __pyx_vtable_4lxml_5etree__ReadOnlyProxy._raise_unsupported_type = (int (*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *))__pyx_f_4lxml_5etree_14_ReadOnlyProxy__raise_unsupported_type;
- __pyx_vtable_4lxml_5etree__ReadOnlyProxy.free_after_use = (void (*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *))__pyx_f_4lxml_5etree_14_ReadOnlyProxy_free_after_use;
- __pyx_vtable_4lxml_5etree__ReadOnlyProxy.__pyx___copy__ = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__;
- __pyx_vtable_4lxml_5etree__ReadOnlyProxy.getchildren = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ReadOnlyProxy.tp_print = 0;
- #if CYTHON_COMPILING_IN_CPYTHON
- {
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree__ReadOnlyProxy, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_4__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_4__getitem__.doc = __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_4__getitem__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_4__getitem__;
- }
- }
- #endif
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__FileWriterElement) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__FileWriterElement.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__FileWriterElement = &__pyx_type_4lxml_5etree__FileWriterElement;
+ __pyx_vtabptr_4lxml_5etree_iterparse = &__pyx_vtable_4lxml_5etree_iterparse;
+ __pyx_vtable_4lxml_5etree_iterparse._close_source = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_iterparse *))__pyx_f_4lxml_5etree_9iterparse__close_source;
+ __pyx_vtable_4lxml_5etree_iterparse._read_more_events = (int (*)(struct __pyx_obj_4lxml_5etree_iterparse *, struct __pyx_obj_4lxml_5etree__SaxParserContext *))__pyx_f_4lxml_5etree_9iterparse__read_more_events;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_iterparse) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_iterparse.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterparse.tp_dict, __pyx_vtabptr_4lxml_5etree_iterparse) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "iterparse", (PyObject *)&__pyx_type_4lxml_5etree_iterparse) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_iterparse = &__pyx_type_4lxml_5etree_iterparse;
+ __pyx_vtabptr_4lxml_5etree_iterwalk = &__pyx_vtable_4lxml_5etree_iterwalk;
+ __pyx_vtable_4lxml_5etree_iterwalk._start_node = (int (*)(struct __pyx_obj_4lxml_5etree_iterwalk *, struct LxmlElement *))__pyx_f_4lxml_5etree_8iterwalk__start_node;
+ __pyx_vtable_4lxml_5etree_iterwalk._end_node = (struct LxmlElement *(*)(struct __pyx_obj_4lxml_5etree_iterwalk *))__pyx_f_4lxml_5etree_8iterwalk__end_node;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_iterwalk) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_iterwalk.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterwalk.tp_dict, __pyx_vtabptr_4lxml_5etree_iterwalk) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "iterwalk", (PyObject *)&__pyx_type_4lxml_5etree_iterwalk) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_iterwalk = &__pyx_type_4lxml_5etree_iterwalk;
+ __pyx_vtabptr_4lxml_5etree__IDDict = &__pyx_vtable_4lxml_5etree__IDDict;
+ __pyx_vtable_4lxml_5etree__IDDict._build_keys = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IDDict *))__pyx_f_4lxml_5etree_7_IDDict__build_keys;
+ __pyx_vtable_4lxml_5etree__IDDict._build_items = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IDDict *))__pyx_f_4lxml_5etree_7_IDDict__build_items;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__IDDict) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__IDDict.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__IDDict.tp_dict, __pyx_vtabptr_4lxml_5etree__IDDict) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_IDDict", (PyObject *)&__pyx_type_4lxml_5etree__IDDict) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__IDDict = &__pyx_type_4lxml_5etree__IDDict;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XInclude) < 0) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XInclude.tp_print = 0;
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree__ReadOnlyProxy, "__len__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XInclude, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_6__len__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_6__len__.doc = __pyx_doc_4lxml_5etree_14_ReadOnlyProxy_6__len__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_14_ReadOnlyProxy_6__len__;
+ __pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__.doc = __pyx_doc_4lxml_5etree_8XInclude_2__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ReadOnlyProxy = &__pyx_type_4lxml_5etree__ReadOnlyProxy;
- __pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyElementProxy;
- __pyx_vtable_4lxml_5etree__ReadOnlyElementProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
- __pyx_type_4lxml_5etree__ReadOnlyElementProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ReadOnlyElementProxy.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyElementProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ReadOnlyElementProxy = &__pyx_type_4lxml_5etree__ReadOnlyElementProxy;
- __pyx_vtabptr_4lxml_5etree_CommentBase = &__pyx_vtable_4lxml_5etree_CommentBase;
- __pyx_vtable_4lxml_5etree_CommentBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Comment;
- __pyx_type_4lxml_5etree_CommentBase.tp_base = __pyx_ptype_4lxml_5etree__Comment;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_CommentBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_CommentBase.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_CommentBase.tp_dict, __pyx_vtabptr_4lxml_5etree_CommentBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "CommentBase", (PyObject *)&__pyx_type_4lxml_5etree_CommentBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_CommentBase = &__pyx_type_4lxml_5etree_CommentBase;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTQuotedStringParam) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__XSLTQuotedStringParam.tp_print = 0;
- __pyx_ptype_4lxml_5etree__XSLTQuotedStringParam = &__pyx_type_4lxml_5etree__XSLTQuotedStringParam;
+ if (__Pyx_SetAttrString(__pyx_m, "XInclude", (PyObject *)&__pyx_type_4lxml_5etree_XInclude) < 0) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XInclude = &__pyx_type_4lxml_5etree_XInclude;
+ __pyx_vtabptr_4lxml_5etree__ExsltRegExp = &__pyx_vtable_4lxml_5etree__ExsltRegExp;
+ __pyx_vtable_4lxml_5etree__ExsltRegExp._make_string = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *))__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string;
+ __pyx_vtable_4lxml_5etree__ExsltRegExp._compile = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_12_ExsltRegExp__compile;
+ __pyx_vtable_4lxml_5etree__ExsltRegExp._register_in_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ExsltRegExp) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ExsltRegExp.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExsltRegExp.tp_dict, __pyx_vtabptr_4lxml_5etree__ExsltRegExp) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ExsltRegExp = &__pyx_type_4lxml_5etree__ExsltRegExp;
__pyx_vtabptr_4lxml_5etree__BaseContext = &__pyx_vtable_4lxml_5etree__BaseContext;
__pyx_vtable_4lxml_5etree__BaseContext._copy = (struct __pyx_obj_4lxml_5etree__BaseContext *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_BaseContext__copy;
__pyx_vtable_4lxml_5etree__BaseContext._to_utf = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *, PyObject *))__pyx_f_4lxml_5etree_12_BaseContext__to_utf;
__pyx_type_4lxml_5etree__BaseContext.tp_print = 0;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseContext.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseContext) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__BaseContext = &__pyx_type_4lxml_5etree__BaseContext;
- __pyx_vtabptr_4lxml_5etree__XSLTContext = &__pyx_vtable_4lxml_5etree__XSLTContext;
- __pyx_vtable_4lxml_5etree__XSLTContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseContext;
- __pyx_vtable_4lxml_5etree__XSLTContext.__pyx_base._copy = (struct __pyx_obj_4lxml_5etree__BaseContext *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_XSLTContext__copy;
- __pyx_vtable_4lxml_5etree__XSLTContext.register_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *, struct LxmlDocument *))__pyx_f_4lxml_5etree_12_XSLTContext_register_context;
- __pyx_vtable_4lxml_5etree__XSLTContext.free_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XSLTContext *))__pyx_f_4lxml_5etree_12_XSLTContext_free_context;
- __pyx_type_4lxml_5etree__XSLTContext.tp_base = __pyx_ptype_4lxml_5etree__BaseContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTContext) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__XSLTContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTContext.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTContext) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__XSLTContext = &__pyx_type_4lxml_5etree__XSLTContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDElementDecl) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__DTDElementDecl.tp_print = 0;
- __pyx_ptype_4lxml_5etree__DTDElementDecl = &__pyx_type_4lxml_5etree__DTDElementDecl;
- __pyx_vtabptr_4lxml_5etree_XSLTExtension = &__pyx_vtable_4lxml_5etree_XSLTExtension;
- __pyx_vtable_4lxml_5etree_XSLTExtension._collectXSLTResultContent = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_XSLTExtension *, struct __pyx_obj_4lxml_5etree__XSLTContext *, xmlNode *, int, int))__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTExtension) < 0) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XSLTExtension.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLTExtension.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLTExtension) < 0) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XSLTExtension", (PyObject *)&__pyx_type_4lxml_5etree_XSLTExtension) < 0) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XSLTExtension = &__pyx_type_4lxml_5etree_XSLTExtension;
- __pyx_vtabptr_4lxml_5etree__ExceptionContext = &__pyx_vtable_4lxml_5etree__ExceptionContext;
- __pyx_vtable_4lxml_5etree__ExceptionContext.clear = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext_clear;
- __pyx_vtable_4lxml_5etree__ExceptionContext._store_raised = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__store_raised;
- __pyx_vtable_4lxml_5etree__ExceptionContext._store_exception = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *, PyObject *))__pyx_f_4lxml_5etree_17_ExceptionContext__store_exception;
- __pyx_vtable_4lxml_5etree__ExceptionContext._has_raised = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__has_raised;
- __pyx_vtable_4lxml_5etree__ExceptionContext._raise_if_stored = (int (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_17_ExceptionContext__raise_if_stored;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ExceptionContext) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ExceptionContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExceptionContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ExceptionContext) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ExceptionContext = &__pyx_type_4lxml_5etree__ExceptionContext;
- __pyx_vtabptr_4lxml_5etree__ResolverContext = &__pyx_vtable_4lxml_5etree__ResolverContext;
- __pyx_vtable_4lxml_5etree__ResolverContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ExceptionContext;
- __pyx_vtable_4lxml_5etree__ResolverContext.__pyx_base.clear = (void (*)(struct __pyx_obj_4lxml_5etree__ExceptionContext *))__pyx_f_4lxml_5etree_16_ResolverContext_clear;
- __pyx_type_4lxml_5etree__ResolverContext.tp_base = __pyx_ptype_4lxml_5etree__ExceptionContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ResolverContext) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ResolverContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ResolverContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ResolverContext) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ResolverContext = &__pyx_type_4lxml_5etree__ResolverContext;
- __pyx_vtabptr_4lxml_5etree__ParserContext = &__pyx_vtable_4lxml_5etree__ParserContext;
- __pyx_vtable_4lxml_5etree__ParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ResolverContext;
- __pyx_vtable_4lxml_5etree__ParserContext._copy = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext__copy;
- __pyx_vtable_4lxml_5etree__ParserContext._initParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_14_ParserContext__initParserContext;
- __pyx_vtable_4lxml_5etree__ParserContext._resetParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext__resetParserContext;
- __pyx_vtable_4lxml_5etree__ParserContext.prepare = (int (*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext_prepare;
- __pyx_vtable_4lxml_5etree__ParserContext.cleanup = (int (*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_14_ParserContext_cleanup;
- __pyx_vtable_4lxml_5etree__ParserContext._handleParseResult = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_14_ParserContext__handleParseResult;
- __pyx_vtable_4lxml_5etree__ParserContext._handleParseResultDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_14_ParserContext__handleParseResultDoc;
- __pyx_type_4lxml_5etree__ParserContext.tp_base = __pyx_ptype_4lxml_5etree__ResolverContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ParserContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ParserContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ParserContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ParserContext = &__pyx_type_4lxml_5etree__ParserContext;
- __pyx_vtabptr_4lxml_5etree__SaxParserContext = &__pyx_vtable_4lxml_5etree__SaxParserContext;
- __pyx_vtable_4lxml_5etree__SaxParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ParserContext;
- __pyx_vtable_4lxml_5etree__SaxParserContext.__pyx_base._initParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__initParserContext;
- __pyx_vtable_4lxml_5etree__SaxParserContext._setSaxParserTarget = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, struct __pyx_obj_4lxml_5etree__SaxParserTarget *))__pyx_f_4lxml_5etree_17_SaxParserContext__setSaxParserTarget;
- __pyx_vtable_4lxml_5etree__SaxParserContext._connectTarget = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__connectTarget;
- __pyx_vtable_4lxml_5etree__SaxParserContext._connectEvents = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__connectEvents;
- __pyx_vtable_4lxml_5etree__SaxParserContext._setEventFilter = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_17_SaxParserContext__setEventFilter;
- __pyx_vtable_4lxml_5etree__SaxParserContext.startDocument = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlDoc *))__pyx_f_4lxml_5etree_17_SaxParserContext_startDocument;
- __pyx_vtable_4lxml_5etree__SaxParserContext.pushEvent = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, PyObject *, xmlNode *))__pyx_f_4lxml_5etree_17_SaxParserContext_pushEvent;
- __pyx_vtable_4lxml_5etree__SaxParserContext.flushEvents = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *))__pyx_f_4lxml_5etree_17_SaxParserContext_flushEvents;
- __pyx_vtable_4lxml_5etree__SaxParserContext._handleSaxException = (void (*)(struct __pyx_obj_4lxml_5etree__SaxParserContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_17_SaxParserContext__handleSaxException;
- __pyx_type_4lxml_5etree__SaxParserContext.tp_base = __pyx_ptype_4lxml_5etree__ParserContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__SaxParserContext) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__SaxParserContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__SaxParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__SaxParserContext) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__SaxParserContext = &__pyx_type_4lxml_5etree__SaxParserContext;
- __pyx_vtabptr_4lxml_5etree__TargetParserContext = &__pyx_vtable_4lxml_5etree__TargetParserContext;
- __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__SaxParserContext;
- __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base.__pyx_base._copy = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_20_TargetParserContext__copy;
- __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base.__pyx_base._handleParseResult = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult;
- __pyx_vtable_4lxml_5etree__TargetParserContext.__pyx_base.__pyx_base._handleParseResultDoc = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree__ParserContext *, struct __pyx_obj_4lxml_5etree__BaseParser *, xmlDoc *, PyObject *))__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc;
- __pyx_vtable_4lxml_5etree__TargetParserContext._setTarget = (int (*)(struct __pyx_obj_4lxml_5etree__TargetParserContext *, PyObject *))__pyx_f_4lxml_5etree_20_TargetParserContext__setTarget;
- __pyx_vtable_4lxml_5etree__TargetParserContext._cleanupTargetParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__TargetParserContext *, xmlDoc *))__pyx_f_4lxml_5etree_20_TargetParserContext__cleanupTargetParserContext;
- __pyx_type_4lxml_5etree__TargetParserContext.tp_base = __pyx_ptype_4lxml_5etree__SaxParserContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__TargetParserContext) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__TargetParserContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TargetParserContext.tp_dict, __pyx_vtabptr_4lxml_5etree__TargetParserContext) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__TargetParserContext = &__pyx_type_4lxml_5etree__TargetParserContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_Resolver) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_Resolver.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "Resolver", (PyObject *)&__pyx_type_4lxml_5etree_Resolver) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_Resolver = &__pyx_type_4lxml_5etree_Resolver;
+ __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_base = (&PyUnicode_Type);
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_print = 0;
+ if (__Pyx_SetAttrString(__pyx_m, "_ElementUnicodeResult", (PyObject *)&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__ElementUnicodeResult = &__pyx_type_4lxml_5etree__ElementUnicodeResult;
__pyx_vtabptr_4lxml_5etree__XPathContext = &__pyx_vtable_4lxml_5etree__XPathContext;
__pyx_vtable_4lxml_5etree__XPathContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseContext;
__pyx_vtable_4lxml_5etree__XPathContext.set_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathContext *, xmlXPathContext *))__pyx_f_4lxml_5etree_13_XPathContext_set_context;
__pyx_type_4lxml_5etree__XPathContext.tp_print = 0;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XPathContext.tp_dict, __pyx_vtabptr_4lxml_5etree__XPathContext) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__XPathContext = &__pyx_type_4lxml_5etree__XPathContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ParseEventsIterator) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ParseEventsIterator.tp_print = 0;
- __pyx_ptype_4lxml_5etree__ParseEventsIterator = &__pyx_type_4lxml_5etree__ParseEventsIterator;
- __pyx_vtabptr_4lxml_5etree__Entity = &__pyx_vtable_4lxml_5etree__Entity;
- __pyx_vtable_4lxml_5etree__Entity.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement;
- __pyx_type_4lxml_5etree__Entity.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__Entity) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__Entity.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Entity.tp_dict, __pyx_vtabptr_4lxml_5etree__Entity) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_Entity", (PyObject *)&__pyx_type_4lxml_5etree__Entity) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__Entity = &__pyx_type_4lxml_5etree__Entity;
- __pyx_vtabptr_4lxml_5etree_EntityBase = &__pyx_vtable_4lxml_5etree_EntityBase;
- __pyx_vtable_4lxml_5etree_EntityBase.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Entity;
- __pyx_type_4lxml_5etree_EntityBase.tp_base = __pyx_ptype_4lxml_5etree__Entity;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_EntityBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_EntityBase.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_EntityBase.tp_dict, __pyx_vtabptr_4lxml_5etree_EntityBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "EntityBase", (PyObject *)&__pyx_type_4lxml_5etree_EntityBase) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_EntityBase = &__pyx_type_4lxml_5etree_EntityBase;
- __pyx_vtabptr_4lxml_5etree__Document = &__pyx_vtable_4lxml_5etree__Document;
- __pyx_vtable_4lxml_5etree__Document.getroot = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_getroot;
- __pyx_vtable_4lxml_5etree__Document.hasdoctype = (int (*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_hasdoctype;
- __pyx_vtable_4lxml_5etree__Document.getdoctype = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_getdoctype;
- __pyx_vtable_4lxml_5etree__Document.getxmlinfo = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_getxmlinfo;
- __pyx_vtable_4lxml_5etree__Document.isstandalone = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_isstandalone;
- __pyx_vtable_4lxml_5etree__Document.buildNewPrefix = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_buildNewPrefix;
- __pyx_vtable_4lxml_5etree__Document._findOrBuildNodeNs = (xmlNs *(*)(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *, int))__pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs;
- __pyx_vtable_4lxml_5etree__Document._setNodeNs = (int (*)(struct LxmlDocument *, xmlNode *, const xmlChar *))__pyx_f_4lxml_5etree_9_Document__setNodeNs;
- if (PyType_Ready(&LxmlDocumentType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- LxmlDocumentType.tp_print = 0;
- if (__Pyx_SetVtable(LxmlDocumentType.tp_dict, __pyx_vtabptr_4lxml_5etree__Document) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_Document", (PyObject *)&LxmlDocumentType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__Document = &LxmlDocumentType;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__InputDocument) < 0) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__InputDocument.tp_print = 0;
- __pyx_ptype_4lxml_5etree__InputDocument = &__pyx_type_4lxml_5etree__InputDocument;
- __pyx_vtabptr_4lxml_5etree__ElementTree = &__pyx_vtable_4lxml_5etree__ElementTree;
- __pyx_vtable_4lxml_5etree__ElementTree._assertHasRoot = (int (*)(struct LxmlElementTree *))__pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot;
- if (PyType_Ready(&LxmlElementTreeType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- LxmlElementTreeType.tp_print = 0;
- if (__Pyx_SetVtable(LxmlElementTreeType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_ElementTree", (PyObject *)&LxmlElementTreeType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ElementTree = &LxmlElementTreeType;
- __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy = &__pyx_vtable_4lxml_5etree__ModifyContentOnlyProxy;
- __pyx_vtable_4lxml_5etree__ModifyContentOnlyProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
- __pyx_type_4lxml_5etree__ModifyContentOnlyProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ModifyContentOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ModifyContentOnlyProxy.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ModifyContentOnlyProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy = &__pyx_type_4lxml_5etree__ModifyContentOnlyProxy;
- __pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup = &__pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup;
- __pyx_vtable_4lxml_5etree_ParserBasedElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
- __pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ParserBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ParserBasedElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_ParserBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ParserBasedElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ParserBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 396; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup = &__pyx_type_4lxml_5etree_ParserBasedElementClassLookup;
- __pyx_vtabptr_4lxml_5etree__Validator = &__pyx_vtable_4lxml_5etree__Validator;
- __pyx_vtable_4lxml_5etree__Validator._append_log_message = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__Validator *, int, int, int, int, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10_Validator__append_log_message;
- __pyx_vtable_4lxml_5etree__Validator._clear_error_log = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__Validator *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10_Validator__clear_error_log;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__Validator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__Validator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Validator.tp_dict, __pyx_vtabptr_4lxml_5etree__Validator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_Validator", (PyObject *)&__pyx_type_4lxml_5etree__Validator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__Validator = &__pyx_type_4lxml_5etree__Validator;
- __pyx_vtabptr_4lxml_5etree_RelaxNG = &__pyx_vtable_4lxml_5etree_RelaxNG;
- __pyx_vtable_4lxml_5etree_RelaxNG.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator;
- __pyx_type_4lxml_5etree_RelaxNG.tp_base = __pyx_ptype_4lxml_5etree__Validator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_RelaxNG) < 0) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_RelaxNG.tp_print = 0;
+ __pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase = &__pyx_vtable_4lxml_5etree__XPathEvaluatorBase;
+ __pyx_vtable_4lxml_5etree__XPathEvaluatorBase.set_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathContext *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase_set_context;
+ __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._checkAbsolutePath = (int (*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, char *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__checkAbsolutePath;
+ __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._lock = (int (*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__lock;
+ __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._unlock = (void (*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__unlock;
+ __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._raise_parse_error = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__raise_parse_error;
+ __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._raise_eval_error = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__raise_eval_error;
+ __pyx_vtable_4lxml_5etree__XPathEvaluatorBase._handle_result = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XPathEvaluatorBase *, xmlXPathObject *, struct LxmlDocument *))__pyx_f_4lxml_5etree_19_XPathEvaluatorBase__handle_result;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__XPathEvaluatorBase) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__XPathEvaluatorBase.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XPathEvaluatorBase.tp_dict, __pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_XPathEvaluatorBase", (PyObject *)&__pyx_type_4lxml_5etree__XPathEvaluatorBase) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__XPathEvaluatorBase = &__pyx_type_4lxml_5etree__XPathEvaluatorBase;
+ __pyx_vtabptr_4lxml_5etree_XPathElementEvaluator = &__pyx_vtable_4lxml_5etree_XPathElementEvaluator;
+ __pyx_vtable_4lxml_5etree_XPathElementEvaluator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
+ __pyx_type_4lxml_5etree_XPathElementEvaluator.tp_base = __pyx_ptype_4lxml_5etree__XPathEvaluatorBase;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathElementEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XPathElementEvaluator.tp_print = 0;
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_RelaxNG, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XPathElementEvaluator, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_7RelaxNG_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_7RelaxNG_6__call__.doc = __pyx_doc_4lxml_5etree_7RelaxNG_6__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_7RelaxNG_6__call__;
+ __pyx_wrapperbase_4lxml_5etree_21XPathElementEvaluator_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_21XPathElementEvaluator_6__call__.doc = __pyx_doc_4lxml_5etree_21XPathElementEvaluator_6__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_21XPathElementEvaluator_6__call__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_RelaxNG.tp_dict, __pyx_vtabptr_4lxml_5etree_RelaxNG) < 0) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "RelaxNG", (PyObject *)&__pyx_type_4lxml_5etree_RelaxNG) < 0) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_RelaxNG = &__pyx_type_4lxml_5etree_RelaxNG;
- __pyx_vtabptr_4lxml_5etree__LogEntry = &__pyx_vtable_4lxml_5etree__LogEntry;
- __pyx_vtable_4lxml_5etree__LogEntry._setError = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__LogEntry *, xmlError *))__pyx_f_4lxml_5etree_9_LogEntry__setError;
- __pyx_vtable_4lxml_5etree__LogEntry._setGeneric = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__LogEntry *, int, int, int, int, PyObject *, PyObject *))__pyx_f_4lxml_5etree_9_LogEntry__setGeneric;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__LogEntry) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__LogEntry.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__LogEntry.tp_dict, __pyx_vtabptr_4lxml_5etree__LogEntry) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_LogEntry", (PyObject *)&__pyx_type_4lxml_5etree__LogEntry) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__LogEntry = &__pyx_type_4lxml_5etree__LogEntry;
- __pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget = &__pyx_vtable_4lxml_5etree__PythonSaxParserTarget;
- __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base = *__pyx_vtabptr_4lxml_5etree__SaxParserTarget;
- __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxStart = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxStart;
- __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxEnd = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxEnd;
- __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxData = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxData;
- __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxDoctype = (int (*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxDoctype;
- __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxPi = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxPi;
- __pyx_vtable_4lxml_5etree__PythonSaxParserTarget.__pyx_base._handleSaxComment = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__SaxParserTarget *, PyObject *))__pyx_f_4lxml_5etree_22_PythonSaxParserTarget__handleSaxComment;
- __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_base = __pyx_ptype_4lxml_5etree__SaxParserTarget;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__PythonSaxParserTarget) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__PythonSaxParserTarget.tp_dict, __pyx_vtabptr_4lxml_5etree__PythonSaxParserTarget) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__PythonSaxParserTarget = &__pyx_type_4lxml_5etree__PythonSaxParserTarget;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_CDATA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_CDATA.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "CDATA", (PyObject *)&__pyx_type_4lxml_5etree_CDATA) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_CDATA = &__pyx_type_4lxml_5etree_CDATA;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_xmlfile) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_xmlfile.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "xmlfile", (PyObject *)&__pyx_type_4lxml_5etree_xmlfile) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_xmlfile = &__pyx_type_4lxml_5etree_xmlfile;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDElementContentDecl) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__DTDElementContentDecl.tp_print = 0;
- __pyx_ptype_4lxml_5etree__DTDElementContentDecl = &__pyx_type_4lxml_5etree__DTDElementContentDecl;
- __pyx_vtabptr_4lxml_5etree__ListErrorLog = &__pyx_vtable_4lxml_5etree__ListErrorLog;
- __pyx_vtable_4lxml_5etree__ListErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseErrorLog;
- __pyx_vtable_4lxml_5etree__ListErrorLog.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_ListErrorLog_copy;
- __pyx_type_4lxml_5etree__ListErrorLog.tp_base = __pyx_ptype_4lxml_5etree__BaseErrorLog;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ListErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ListErrorLog.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ListErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ListErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_ListErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__ListErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ListErrorLog = &__pyx_type_4lxml_5etree__ListErrorLog;
- __pyx_vtabptr_4lxml_5etree__ErrorLog = &__pyx_vtable_4lxml_5etree__ErrorLog;
- __pyx_vtable_4lxml_5etree__ErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ListErrorLog;
- __pyx_vtable_4lxml_5etree__ErrorLog.__pyx_base.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_9_ErrorLog_copy;
- __pyx_vtable_4lxml_5etree__ErrorLog.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_9_ErrorLog_receive;
- __pyx_vtable_4lxml_5etree__ErrorLog.__pyx___enter__ = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLog *))__pyx_f_4lxml_5etree_9_ErrorLog___enter__;
- __pyx_vtable_4lxml_5etree__ErrorLog.connect = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLog *))__pyx_f_4lxml_5etree_9_ErrorLog_connect;
- __pyx_vtable_4lxml_5etree__ErrorLog.disconnect = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLog *))__pyx_f_4lxml_5etree_9_ErrorLog_disconnect;
- __pyx_vtable_4lxml_5etree__ErrorLog.clear = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_9_ErrorLog_clear;
- __pyx_type_4lxml_5etree__ErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ListErrorLog;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ErrorLog.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_ErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__ErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ErrorLog = &__pyx_type_4lxml_5etree__ErrorLog;
- __pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyPIProxy;
- __pyx_vtable_4lxml_5etree__ReadOnlyPIProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
- __pyx_type_4lxml_5etree__ReadOnlyPIProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ReadOnlyPIProxy.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyPIProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ReadOnlyPIProxy = &__pyx_type_4lxml_5etree__ReadOnlyPIProxy;
- __pyx_vtabptr_4lxml_5etree__XSLTResultTree = &__pyx_vtable_4lxml_5etree__XSLTResultTree;
- __pyx_vtable_4lxml_5etree__XSLTResultTree.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementTree;
- __pyx_vtable_4lxml_5etree__XSLTResultTree._saveToStringAndSize = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XSLTResultTree *, xmlChar **, int *))__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize;
- __pyx_type_4lxml_5etree__XSLTResultTree.tp_base = __pyx_ptype_4lxml_5etree__ElementTree;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTResultTree) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__XSLTResultTree.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTResultTree.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTResultTree) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_XSLTResultTree", (PyObject *)&__pyx_type_4lxml_5etree__XSLTResultTree) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__XSLTResultTree = &__pyx_type_4lxml_5etree__XSLTResultTree;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ElementTextIterator.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "ElementTextIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ElementTextIterator = &__pyx_type_4lxml_5etree_ElementTextIterator;
- __pyx_vtabptr_4lxml_5etree__ElementIterator = &__pyx_vtable_4lxml_5etree__ElementIterator;
- __pyx_vtable_4lxml_5etree__ElementIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementTagMatcher;
- __pyx_vtable_4lxml_5etree__ElementIterator._storeNext = (void (*)(struct LxmlElementIterator *, struct LxmlElement *))__pyx_f_4lxml_5etree_16_ElementIterator__storeNext;
- LxmlElementIteratorType.tp_base = __pyx_ptype_4lxml_5etree__ElementTagMatcher;
- if (PyType_Ready(&LxmlElementIteratorType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- LxmlElementIteratorType.tp_print = 0;
- if (__Pyx_SetVtable(LxmlElementIteratorType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_ElementIterator", (PyObject *)&LxmlElementIteratorType) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ElementIterator = &LxmlElementIteratorType;
- LxmlElementBaseType.tp_base = __pyx_ptype_4lxml_5etree__Element;
- if (PyType_Ready(&LxmlElementBaseType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- LxmlElementBaseType.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPathElementEvaluator.tp_dict, __pyx_vtabptr_4lxml_5etree_XPathElementEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XPathElementEvaluator", (PyObject *)&__pyx_type_4lxml_5etree_XPathElementEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XPathElementEvaluator = &__pyx_type_4lxml_5etree_XPathElementEvaluator;
+ __pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator = &__pyx_vtable_4lxml_5etree_XPathDocumentEvaluator;
+ __pyx_vtable_4lxml_5etree_XPathDocumentEvaluator.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XPathElementEvaluator;
+ __pyx_type_4lxml_5etree_XPathDocumentEvaluator.tp_base = __pyx_ptype_4lxml_5etree_XPathElementEvaluator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XPathDocumentEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XPathDocumentEvaluator.tp_print = 0;
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&LxmlElementBaseType, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XPathDocumentEvaluator, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_11ElementBase___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_11ElementBase___init__.doc = __pyx_doc_4lxml_5etree_11ElementBase___init__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_11ElementBase___init__;
+ __pyx_wrapperbase_4lxml_5etree_22XPathDocumentEvaluator_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_22XPathDocumentEvaluator_2__call__.doc = __pyx_doc_4lxml_5etree_22XPathDocumentEvaluator_2__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_22XPathDocumentEvaluator_2__call__;
}
}
#endif
- if (__Pyx_SetAttrString(__pyx_m, "ElementBase", (PyObject *)&LxmlElementBaseType) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ElementBase = &LxmlElementBaseType;
- __pyx_vtabptr_4lxml_5etree_PyErrorLog = &__pyx_vtable_4lxml_5etree_PyErrorLog;
- __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseErrorLog;
- __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10PyErrorLog_copy;
- __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10PyErrorLog_receive;
- __pyx_type_4lxml_5etree_PyErrorLog.tp_base = __pyx_ptype_4lxml_5etree__BaseErrorLog;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_PyErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_PyErrorLog.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PyErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree_PyErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "PyErrorLog", (PyObject *)&__pyx_type_4lxml_5etree_PyErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_PyErrorLog = &__pyx_type_4lxml_5etree_PyErrorLog;
- __pyx_vtabptr_4lxml_5etree_DTD = &__pyx_vtable_4lxml_5etree_DTD;
- __pyx_vtable_4lxml_5etree_DTD.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator;
- __pyx_type_4lxml_5etree_DTD.tp_base = __pyx_ptype_4lxml_5etree__Validator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_DTD) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_DTD.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPathDocumentEvaluator.tp_dict, __pyx_vtabptr_4lxml_5etree_XPathDocumentEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XPathDocumentEvaluator", (PyObject *)&__pyx_type_4lxml_5etree_XPathDocumentEvaluator) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XPathDocumentEvaluator = &__pyx_type_4lxml_5etree_XPathDocumentEvaluator;
+ __pyx_vtabptr_4lxml_5etree_XPath = &__pyx_vtable_4lxml_5etree_XPath;
+ __pyx_vtable_4lxml_5etree_XPath.__pyx_base = *__pyx_vtabptr_4lxml_5etree__XPathEvaluatorBase;
+ __pyx_type_4lxml_5etree_XPath.tp_base = __pyx_ptype_4lxml_5etree__XPathEvaluatorBase;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XPath.tp_print = 0;
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_DTD, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XPath, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_3DTD_14__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_3DTD_14__call__.doc = __pyx_doc_4lxml_5etree_3DTD_14__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_3DTD_14__call__;
+ __pyx_wrapperbase_4lxml_5etree_5XPath_4__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_5XPath_4__call__.doc = __pyx_doc_4lxml_5etree_5XPath_4__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_5XPath_4__call__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_DTD.tp_dict, __pyx_vtabptr_4lxml_5etree_DTD) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "DTD", (PyObject *)&__pyx_type_4lxml_5etree_DTD) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_DTD = &__pyx_type_4lxml_5etree_DTD;
- __pyx_vtabptr_4lxml_5etree_iterparse = &__pyx_vtable_4lxml_5etree_iterparse;
- __pyx_vtable_4lxml_5etree_iterparse._close_source = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_iterparse *))__pyx_f_4lxml_5etree_9iterparse__close_source;
- __pyx_vtable_4lxml_5etree_iterparse._read_more_events = (int (*)(struct __pyx_obj_4lxml_5etree_iterparse *, struct __pyx_obj_4lxml_5etree__SaxParserContext *))__pyx_f_4lxml_5etree_9iterparse__read_more_events;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_iterparse) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_iterparse.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterparse.tp_dict, __pyx_vtabptr_4lxml_5etree_iterparse) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "iterparse", (PyObject *)&__pyx_type_4lxml_5etree_iterparse) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_iterparse = &__pyx_type_4lxml_5etree_iterparse;
- if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements.tp_print = 0;
- __pyx_ptype_4lxml_5etree___pyx_scope_struct_2_iterelements = &__pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XPath.tp_dict, __pyx_vtabptr_4lxml_5etree_XPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XPath", (PyObject *)&__pyx_type_4lxml_5etree_XPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XPath = &__pyx_type_4lxml_5etree_XPath;
+ __pyx_vtabptr_4lxml_5etree_ETXPath = &__pyx_vtable_4lxml_5etree_ETXPath;
+ __pyx_vtable_4lxml_5etree_ETXPath.__pyx_base = *__pyx_vtabptr_4lxml_5etree_XPath;
+ __pyx_vtable_4lxml_5etree_ETXPath._nsextract_path = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_ETXPath *, PyObject *))__pyx_f_4lxml_5etree_7ETXPath__nsextract_path;
+ __pyx_type_4lxml_5etree_ETXPath.tp_base = __pyx_ptype_4lxml_5etree_XPath;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_ETXPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_ETXPath.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ETXPath.tp_dict, __pyx_vtabptr_4lxml_5etree_ETXPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "ETXPath", (PyObject *)&__pyx_type_4lxml_5etree_ETXPath) < 0) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_ETXPath = &__pyx_type_4lxml_5etree_ETXPath;
__pyx_vtabptr_4lxml_5etree__XSLTResolverContext = &__pyx_vtable_4lxml_5etree__XSLTResolverContext;
__pyx_vtable_4lxml_5etree__XSLTResolverContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ResolverContext;
__pyx_vtable_4lxml_5etree__XSLTResolverContext._copy = (struct __pyx_obj_4lxml_5etree__XSLTResolverContext *(*)(struct __pyx_obj_4lxml_5etree__XSLTResolverContext *))__pyx_f_4lxml_5etree_20_XSLTResolverContext__copy;
__pyx_type_4lxml_5etree__XSLTResolverContext.tp_print = 0;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTResolverContext.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTResolverContext) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree__XSLTResolverContext = &__pyx_type_4lxml_5etree__XSLTResolverContext;
- __pyx_vtabptr_4lxml_5etree__ParserDictionaryContext = &__pyx_vtable_4lxml_5etree__ParserDictionaryContext;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initMainParserContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext._findThreadParserContext = (struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext__findThreadParserContext;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.setDefaultParser = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.getDefaultParser = (struct __pyx_obj_4lxml_5etree__BaseParser *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext._getThreadDict = (xmlDict *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext__getThreadDict;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initThreadDictRef = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDict **))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initThreadDictRef;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initParserDict = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlParserCtxt *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initParserDict;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initXPathParserDict = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlXPathContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initXPathParserDict;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.initDocDict = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, xmlDoc *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initDocDict;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.findImpliedContext = (struct __pyx_obj_4lxml_5etree__ParserContext *(*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_findImpliedContext;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.pushImpliedContextFromParser = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__BaseParser *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContextFromParser;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.pushImpliedContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *, struct __pyx_obj_4lxml_5etree__ParserContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_pushImpliedContext;
- __pyx_vtable_4lxml_5etree__ParserDictionaryContext.popImpliedContext = (void (*)(struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *))__pyx_f_4lxml_5etree_24_ParserDictionaryContext_popImpliedContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ParserDictionaryContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ParserDictionaryContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ParserDictionaryContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ParserDictionaryContext) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ParserDictionaryContext = &__pyx_type_4lxml_5etree__ParserDictionaryContext;
- __pyx_vtabptr_4lxml_5etree_iterwalk = &__pyx_vtable_4lxml_5etree_iterwalk;
- __pyx_vtable_4lxml_5etree_iterwalk._start_node = (int (*)(struct __pyx_obj_4lxml_5etree_iterwalk *, struct LxmlElement *))__pyx_f_4lxml_5etree_8iterwalk__start_node;
- __pyx_vtable_4lxml_5etree_iterwalk._end_node = (struct LxmlElement *(*)(struct __pyx_obj_4lxml_5etree_iterwalk *))__pyx_f_4lxml_5etree_8iterwalk__end_node;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_iterwalk) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_iterwalk.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_iterwalk.tp_dict, __pyx_vtabptr_4lxml_5etree_iterwalk) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "iterwalk", (PyObject *)&__pyx_type_4lxml_5etree_iterwalk) < 0) {__pyx_filename = __pyx_f[14]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_iterwalk = &__pyx_type_4lxml_5etree_iterwalk;
- __pyx_vtabptr_4lxml_5etree__DomainErrorLog = &__pyx_vtable_4lxml_5etree__DomainErrorLog;
- __pyx_vtable_4lxml_5etree__DomainErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ErrorLog;
- __pyx_vtable_4lxml_5etree__DomainErrorLog.__pyx_base.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_15_DomainErrorLog_receive;
- __pyx_type_4lxml_5etree__DomainErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ErrorLog;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__DomainErrorLog.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__DomainErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__DomainErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_DomainErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__DomainErrorLog = &__pyx_type_4lxml_5etree__DomainErrorLog;
- __pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup = &__pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup;
- __pyx_vtable_4lxml_5etree_AttributeBasedElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
- __pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_AttributeBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "AttributeBasedElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_AttributeBasedElementClassLookup = &__pyx_type_4lxml_5etree_AttributeBasedElementClassLookup;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_DocInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_DocInfo.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "DocInfo", (PyObject *)&__pyx_type_4lxml_5etree_DocInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_DocInfo = &__pyx_type_4lxml_5etree_DocInfo;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XInclude) < 0) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XInclude.tp_print = 0;
+ __pyx_vtabptr_4lxml_5etree_XSLTAccessControl = &__pyx_vtable_4lxml_5etree_XSLTAccessControl;
+ __pyx_vtable_4lxml_5etree_XSLTAccessControl._setAccess = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption, int))__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess;
+ __pyx_vtable_4lxml_5etree_XSLTAccessControl._register_in_context = (void (*)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltTransformContext *))__pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context;
+ __pyx_vtable_4lxml_5etree_XSLTAccessControl._optval = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption))__pyx_f_4lxml_5etree_17XSLTAccessControl__optval;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTAccessControl) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XSLTAccessControl.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLTAccessControl.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLTAccessControl) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XSLTAccessControl", (PyObject *)&__pyx_type_4lxml_5etree_XSLTAccessControl) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XSLTAccessControl = &__pyx_type_4lxml_5etree_XSLTAccessControl;
+ __pyx_vtabptr_4lxml_5etree__XSLTContext = &__pyx_vtable_4lxml_5etree__XSLTContext;
+ __pyx_vtable_4lxml_5etree__XSLTContext.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseContext;
+ __pyx_vtable_4lxml_5etree__XSLTContext.__pyx_base._copy = (struct __pyx_obj_4lxml_5etree__BaseContext *(*)(struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_XSLTContext__copy;
+ __pyx_vtable_4lxml_5etree__XSLTContext.register_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *, struct LxmlDocument *))__pyx_f_4lxml_5etree_12_XSLTContext_register_context;
+ __pyx_vtable_4lxml_5etree__XSLTContext.free_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XSLTContext *))__pyx_f_4lxml_5etree_12_XSLTContext_free_context;
+ __pyx_type_4lxml_5etree__XSLTContext.tp_base = __pyx_ptype_4lxml_5etree__BaseContext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTContext) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__XSLTContext.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTContext.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTContext) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__XSLTContext = &__pyx_type_4lxml_5etree__XSLTContext;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTQuotedStringParam) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__XSLTQuotedStringParam.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__XSLTQuotedStringParam = &__pyx_type_4lxml_5etree__XSLTQuotedStringParam;
+ __pyx_vtabptr_4lxml_5etree_XSLT = &__pyx_vtable_4lxml_5etree_XSLT;
+ __pyx_vtable_4lxml_5etree_XSLT._run_transform = (xmlDoc *(*)(struct __pyx_obj_4lxml_5etree_XSLT *, xmlDoc *, const char **, struct __pyx_obj_4lxml_5etree__XSLTContext *, xsltTransformContext *))__pyx_f_4lxml_5etree_4XSLT__run_transform;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XSLT.tp_print = 0;
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XInclude, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XSLT, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__.doc = __pyx_doc_4lxml_5etree_8XInclude_2__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_8XInclude_2__call__;
+ __pyx_wrapperbase_4lxml_5etree_4XSLT_18__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_4XSLT_18__call__.doc = __pyx_doc_4lxml_5etree_4XSLT_18__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_4XSLT_18__call__;
}
}
#endif
- if (__Pyx_SetAttrString(__pyx_m, "XInclude", (PyObject *)&__pyx_type_4lxml_5etree_XInclude) < 0) {__pyx_filename = __pyx_f[16]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XInclude = &__pyx_type_4lxml_5etree_XInclude;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLT.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XSLT", (PyObject *)&__pyx_type_4lxml_5etree_XSLT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XSLT = &__pyx_type_4lxml_5etree_XSLT;
+ __pyx_vtabptr_4lxml_5etree__XSLTResultTree = &__pyx_vtable_4lxml_5etree__XSLTResultTree;
+ __pyx_vtable_4lxml_5etree__XSLTResultTree.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementTree;
+ __pyx_vtable_4lxml_5etree__XSLTResultTree._saveToStringAndSize = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__XSLTResultTree *, xmlChar **, int *))__pyx_f_4lxml_5etree_15_XSLTResultTree__saveToStringAndSize;
+ __pyx_type_4lxml_5etree__XSLTResultTree.tp_base = __pyx_ptype_4lxml_5etree__ElementTree;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTResultTree) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__XSLTResultTree.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTResultTree.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTResultTree) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_XSLTResultTree", (PyObject *)&__pyx_type_4lxml_5etree__XSLTResultTree) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__XSLTResultTree = &__pyx_type_4lxml_5etree__XSLTResultTree;
+ __pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction = &__pyx_vtable_4lxml_5etree__XSLTProcessingInstruction;
+ __pyx_vtable_4lxml_5etree__XSLTProcessingInstruction.__pyx_base = *__pyx_vtabptr_4lxml_5etree_PIBase;
+ __pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_base = __pyx_ptype_4lxml_5etree_PIBase;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__XSLTProcessingInstruction) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__XSLTProcessingInstruction.tp_dict, __pyx_vtabptr_4lxml_5etree__XSLTProcessingInstruction) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "_XSLTProcessingInstruction", (PyObject *)&__pyx_type_4lxml_5etree__XSLTProcessingInstruction) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree__XSLTProcessingInstruction = &__pyx_type_4lxml_5etree__XSLTProcessingInstruction;
+ __pyx_vtabptr_4lxml_5etree_XSLTExtension = &__pyx_vtable_4lxml_5etree_XSLTExtension;
+ __pyx_vtable_4lxml_5etree_XSLTExtension._collectXSLTResultContent = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_XSLTExtension *, struct __pyx_obj_4lxml_5etree__XSLTContext *, xmlNode *, int, int))__pyx_f_4lxml_5etree_13XSLTExtension__collectXSLTResultContent;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTExtension) < 0) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_XSLTExtension.tp_print = 0;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLTExtension.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLTExtension) < 0) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "XSLTExtension", (PyObject *)&__pyx_type_4lxml_5etree_XSLTExtension) < 0) {__pyx_filename = __pyx_f[19]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_XSLTExtension = &__pyx_type_4lxml_5etree_XSLTExtension;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDElementContentDecl) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__DTDElementContentDecl.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__DTDElementContentDecl = &__pyx_type_4lxml_5etree__DTDElementContentDecl;
if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDAttributeDecl) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_type_4lxml_5etree__DTDAttributeDecl.tp_print = 0;
__pyx_ptype_4lxml_5etree__DTDAttributeDecl = &__pyx_type_4lxml_5etree__DTDAttributeDecl;
- __pyx_vtabptr_4lxml_5etree_XMLSchema = &__pyx_vtable_4lxml_5etree_XMLSchema;
- __pyx_vtable_4lxml_5etree_XMLSchema.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator;
- __pyx_vtable_4lxml_5etree_XMLSchema._newSaxValidator = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *(*)(struct __pyx_obj_4lxml_5etree_XMLSchema *, int))__pyx_f_4lxml_5etree_9XMLSchema__newSaxValidator;
- __pyx_type_4lxml_5etree_XMLSchema.tp_base = __pyx_ptype_4lxml_5etree__Validator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XMLSchema) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XMLSchema.tp_print = 0;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDElementDecl) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__DTDElementDecl.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__DTDElementDecl = &__pyx_type_4lxml_5etree__DTDElementDecl;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDEntityDecl) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__DTDEntityDecl.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__DTDEntityDecl = &__pyx_type_4lxml_5etree__DTDEntityDecl;
+ __pyx_vtabptr_4lxml_5etree_DTD = &__pyx_vtable_4lxml_5etree_DTD;
+ __pyx_vtable_4lxml_5etree_DTD.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator;
+ __pyx_type_4lxml_5etree_DTD.tp_base = __pyx_ptype_4lxml_5etree__Validator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_DTD) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_DTD.tp_print = 0;
#if CYTHON_COMPILING_IN_CPYTHON
{
- PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_XMLSchema, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_DTD, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
- __pyx_wrapperbase_4lxml_5etree_9XMLSchema_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
- __pyx_wrapperbase_4lxml_5etree_9XMLSchema_6__call__.doc = __pyx_doc_4lxml_5etree_9XMLSchema_6__call__;
- ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_9XMLSchema_6__call__;
+ __pyx_wrapperbase_4lxml_5etree_3DTD_14__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_3DTD_14__call__.doc = __pyx_doc_4lxml_5etree_3DTD_14__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_3DTD_14__call__;
}
}
#endif
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XMLSchema.tp_dict, __pyx_vtabptr_4lxml_5etree_XMLSchema) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XMLSchema", (PyObject *)&__pyx_type_4lxml_5etree_XMLSchema) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XMLSchema = &__pyx_type_4lxml_5etree_XMLSchema;
- __pyx_vtabptr_4lxml_5etree__ElementMatchIterator = &__pyx_vtable_4lxml_5etree__ElementMatchIterator;
- __pyx_vtable_4lxml_5etree__ElementMatchIterator._initTagMatcher = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, PyObject *))__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher;
- __pyx_vtable_4lxml_5etree__ElementMatchIterator._storeNext = (int (*)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *))__pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ElementMatchIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ElementMatchIterator.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementMatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_ElementMatchIterator", (PyObject *)&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ElementMatchIterator = &__pyx_type_4lxml_5etree__ElementMatchIterator;
- __pyx_vtabptr_4lxml_5etree_AncestorsIterator = &__pyx_vtable_4lxml_5etree_AncestorsIterator;
- __pyx_vtable_4lxml_5etree_AncestorsIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
- __pyx_type_4lxml_5etree_AncestorsIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_AncestorsIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_AncestorsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_AncestorsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "AncestorsIterator", (PyObject *)&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_AncestorsIterator = &__pyx_type_4lxml_5etree_AncestorsIterator;
- __pyx_vtabptr_4lxml_5etree_HTMLParser = &__pyx_vtable_4lxml_5etree_HTMLParser;
- __pyx_vtable_4lxml_5etree_HTMLParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree__FeedParser;
- __pyx_type_4lxml_5etree_HTMLParser.tp_base = __pyx_ptype_4lxml_5etree__FeedParser;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_HTMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_HTMLParser.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_HTMLParser.tp_dict, __pyx_vtabptr_4lxml_5etree_HTMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "HTMLParser", (PyObject *)&__pyx_type_4lxml_5etree_HTMLParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_HTMLParser = &__pyx_type_4lxml_5etree_HTMLParser;
- __pyx_vtabptr_4lxml_5etree_HTMLPullParser = &__pyx_vtable_4lxml_5etree_HTMLPullParser;
- __pyx_vtable_4lxml_5etree_HTMLPullParser.__pyx_base = *__pyx_vtabptr_4lxml_5etree_HTMLParser;
- __pyx_type_4lxml_5etree_HTMLPullParser.tp_base = __pyx_ptype_4lxml_5etree_HTMLParser;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_HTMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_HTMLPullParser.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_HTMLPullParser.tp_dict, __pyx_vtabptr_4lxml_5etree_HTMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "HTMLPullParser", (PyObject *)&__pyx_type_4lxml_5etree_HTMLPullParser) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_HTMLPullParser = &__pyx_type_4lxml_5etree_HTMLPullParser;
- __pyx_vtabptr_4lxml_5etree__IDDict = &__pyx_vtable_4lxml_5etree__IDDict;
- __pyx_vtable_4lxml_5etree__IDDict._build_keys = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IDDict *))__pyx_f_4lxml_5etree_7_IDDict__build_keys;
- __pyx_vtable_4lxml_5etree__IDDict._build_items = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__IDDict *))__pyx_f_4lxml_5etree_7_IDDict__build_items;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__IDDict) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__IDDict.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__IDDict.tp_dict, __pyx_vtabptr_4lxml_5etree__IDDict) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_IDDict", (PyObject *)&__pyx_type_4lxml_5etree__IDDict) < 0) {__pyx_filename = __pyx_f[15]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__IDDict = &__pyx_type_4lxml_5etree__IDDict;
- __pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup = &__pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup;
- __pyx_vtable_4lxml_5etree_ElementNamespaceClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
- __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementNamespaceClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementNamespaceClassLookup) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ElementNamespaceClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ElementNamespaceClassLookup) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ElementNamespaceClassLookup = &__pyx_type_4lxml_5etree_ElementNamespaceClassLookup;
- __pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy = &__pyx_vtable_4lxml_5etree__AppendOnlyElementProxy;
- __pyx_vtable_4lxml_5etree__AppendOnlyElementProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyElementProxy;
- __pyx_vtable_4lxml_5etree__AppendOnlyElementProxy.append = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__AppendOnlyElementProxy *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_23_AppendOnlyElementProxy_append;
- __pyx_type_4lxml_5etree__AppendOnlyElementProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyElementProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__AppendOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__AppendOnlyElementProxy.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__AppendOnlyElementProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__AppendOnlyElementProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__AppendOnlyElementProxy = &__pyx_type_4lxml_5etree__AppendOnlyElementProxy;
- __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy = &__pyx_vtable_4lxml_5etree__ModifyContentOnlyEntityProxy;
- __pyx_vtable_4lxml_5etree__ModifyContentOnlyEntityProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
- __pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy.tp_base = __pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ModifyContentOnlyEntityProxy = &__pyx_type_4lxml_5etree__ModifyContentOnlyEntityProxy;
- __pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyEntityProxy;
- __pyx_vtable_4lxml_5etree__ReadOnlyEntityProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ReadOnlyProxy;
- __pyx_type_4lxml_5etree__ReadOnlyEntityProxy.tp_base = __pyx_ptype_4lxml_5etree__ReadOnlyProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ReadOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ReadOnlyEntityProxy.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ReadOnlyEntityProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ReadOnlyEntityProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ReadOnlyEntityProxy = &__pyx_type_4lxml_5etree__ReadOnlyEntityProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__FileWriterElement) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__FileWriterElement.tp_print = 0;
- __pyx_ptype_4lxml_5etree__FileWriterElement = &__pyx_type_4lxml_5etree__FileWriterElement;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__MemDebug) < 0) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__MemDebug.tp_print = 0;
- __pyx_ptype_4lxml_5etree__MemDebug = &__pyx_type_4lxml_5etree__MemDebug;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__Attrib) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__Attrib.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "_Attrib", (PyObject *)&__pyx_type_4lxml_5etree__Attrib) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__Attrib = &__pyx_type_4lxml_5etree__Attrib;
- __pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_base = __pyx_ptype_4lxml_5etree_ElementClassLookup;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDefaultClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ElementDefaultClassLookup.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "ElementDefaultClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_ElementDefaultClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ElementDefaultClassLookup = &__pyx_type_4lxml_5etree_ElementDefaultClassLookup;
- __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_base = (&PyUnicode_Type);
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ElementUnicodeResult.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "_ElementUnicodeResult", (PyObject *)&__pyx_type_4lxml_5etree__ElementUnicodeResult) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ElementUnicodeResult = &__pyx_type_4lxml_5etree__ElementUnicodeResult;
- __pyx_vtabptr_4lxml_5etree__ExsltRegExp = &__pyx_vtable_4lxml_5etree__ExsltRegExp;
- __pyx_vtable_4lxml_5etree__ExsltRegExp._make_string = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *))__pyx_f_4lxml_5etree_12_ExsltRegExp__make_string;
- __pyx_vtable_4lxml_5etree__ExsltRegExp._compile = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_12_ExsltRegExp__compile;
- __pyx_vtable_4lxml_5etree__ExsltRegExp._register_in_context = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ExsltRegExp *, struct __pyx_obj_4lxml_5etree__BaseContext *))__pyx_f_4lxml_5etree_12_ExsltRegExp__register_in_context;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ExsltRegExp) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ExsltRegExp.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ExsltRegExp.tp_dict, __pyx_vtabptr_4lxml_5etree__ExsltRegExp) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ExsltRegExp = &__pyx_type_4lxml_5etree__ExsltRegExp;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_QName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_QName.tp_print = 0;
- if (__Pyx_SetAttrString(__pyx_m, "QName", (PyObject *)&__pyx_type_4lxml_5etree_QName) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_QName = &__pyx_type_4lxml_5etree_QName;
- if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities.tp_print = 0;
- __pyx_ptype_4lxml_5etree___pyx_scope_struct_3_iterentities = &__pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities;
- __pyx_vtabptr_4lxml_5etree__TempStore = &__pyx_vtable_4lxml_5etree__TempStore;
- __pyx_vtable_4lxml_5etree__TempStore.add = (int (*)(struct __pyx_obj_4lxml_5etree__TempStore *, PyObject *))__pyx_f_4lxml_5etree_10_TempStore_add;
- __pyx_vtable_4lxml_5etree__TempStore.clear = (int (*)(struct __pyx_obj_4lxml_5etree__TempStore *))__pyx_f_4lxml_5etree_10_TempStore_clear;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__TempStore) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__TempStore.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__TempStore.tp_dict, __pyx_vtabptr_4lxml_5etree__TempStore) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__TempStore = &__pyx_type_4lxml_5etree__TempStore;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__OpaqueNodeWrapper) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__OpaqueNodeWrapper.tp_print = 0;
- __pyx_ptype_4lxml_5etree__OpaqueNodeWrapper = &__pyx_type_4lxml_5etree__OpaqueNodeWrapper;
- __pyx_vtabptr_4lxml_5etree__FilelikeWriter = &__pyx_vtable_4lxml_5etree__FilelikeWriter;
- __pyx_vtable_4lxml_5etree__FilelikeWriter._createOutputBuffer = (xmlOutputBuffer *(*)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, xmlCharEncodingHandler *))__pyx_f_4lxml_5etree_15_FilelikeWriter__createOutputBuffer;
- __pyx_vtable_4lxml_5etree__FilelikeWriter.write = (int (*)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *, char *, int))__pyx_f_4lxml_5etree_15_FilelikeWriter_write;
- __pyx_vtable_4lxml_5etree__FilelikeWriter.close = (int (*)(struct __pyx_obj_4lxml_5etree__FilelikeWriter *))__pyx_f_4lxml_5etree_15_FilelikeWriter_close;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__FilelikeWriter) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__FilelikeWriter.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__FilelikeWriter.tp_dict, __pyx_vtabptr_4lxml_5etree__FilelikeWriter) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 369; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__FilelikeWriter = &__pyx_type_4lxml_5etree__FilelikeWriter;
- __pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper = &__pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper;
- __pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper._assertNode = (int (*)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *))__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper__assertNode;
- __pyx_vtable_4lxml_5etree__OpaqueDocumentWrapper.append = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__OpaqueDocumentWrapper *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_22_OpaqueDocumentWrapper_append;
- __pyx_type_4lxml_5etree__OpaqueDocumentWrapper.tp_base = __pyx_ptype_4lxml_5etree__OpaqueNodeWrapper;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__OpaqueDocumentWrapper) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__OpaqueDocumentWrapper.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__OpaqueDocumentWrapper.tp_dict, __pyx_vtabptr_4lxml_5etree__OpaqueDocumentWrapper) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__OpaqueDocumentWrapper = &__pyx_type_4lxml_5etree__OpaqueDocumentWrapper;
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_DTD.tp_dict, __pyx_vtabptr_4lxml_5etree_DTD) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "DTD", (PyObject *)&__pyx_type_4lxml_5etree_DTD) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_DTD = &__pyx_type_4lxml_5etree_DTD;
+ __pyx_vtabptr_4lxml_5etree_RelaxNG = &__pyx_vtable_4lxml_5etree_RelaxNG;
+ __pyx_vtable_4lxml_5etree_RelaxNG.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator;
+ __pyx_type_4lxml_5etree_RelaxNG.tp_base = __pyx_ptype_4lxml_5etree__Validator;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree_RelaxNG) < 0) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree_RelaxNG.tp_print = 0;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ {
+ PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree_RelaxNG, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
+ __pyx_wrapperbase_4lxml_5etree_7RelaxNG_6__call__ = *((PyWrapperDescrObject *)wrapper)->d_base;
+ __pyx_wrapperbase_4lxml_5etree_7RelaxNG_6__call__.doc = __pyx_doc_4lxml_5etree_7RelaxNG_6__call__;
+ ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4lxml_5etree_7RelaxNG_6__call__;
+ }
+ }
+ #endif
+ if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_RelaxNG.tp_dict, __pyx_vtabptr_4lxml_5etree_RelaxNG) < 0) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__Pyx_SetAttrString(__pyx_m, "RelaxNG", (PyObject *)&__pyx_type_4lxml_5etree_RelaxNG) < 0) {__pyx_filename = __pyx_f[21]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_ptype_4lxml_5etree_RelaxNG = &__pyx_type_4lxml_5etree_RelaxNG;
__pyx_vtabptr_4lxml_5etree_Schematron = &__pyx_vtable_4lxml_5etree_Schematron;
__pyx_vtable_4lxml_5etree_Schematron.__pyx_base = *__pyx_vtabptr_4lxml_5etree__Validator;
__pyx_type_4lxml_5etree_Schematron.tp_base = __pyx_ptype_4lxml_5etree__Validator;
if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_Schematron.tp_dict, __pyx_vtabptr_4lxml_5etree_Schematron) < 0) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
if (__Pyx_SetAttrString(__pyx_m, "Schematron", (PyObject *)&__pyx_type_4lxml_5etree_Schematron) < 0) {__pyx_filename = __pyx_f[23]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_ptype_4lxml_5etree_Schematron = &__pyx_type_4lxml_5etree_Schematron;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLogContext) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 373; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ErrorLogContext.tp_print = 0;
- __pyx_ptype_4lxml_5etree__ErrorLogContext = &__pyx_type_4lxml_5etree__ErrorLogContext;
- __pyx_vtabptr_4lxml_5etree_XSLTAccessControl = &__pyx_vtable_4lxml_5etree_XSLTAccessControl;
- __pyx_vtable_4lxml_5etree_XSLTAccessControl._setAccess = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption, int))__pyx_f_4lxml_5etree_17XSLTAccessControl__setAccess;
- __pyx_vtable_4lxml_5etree_XSLTAccessControl._register_in_context = (void (*)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltTransformContext *))__pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context;
- __pyx_vtable_4lxml_5etree_XSLTAccessControl._optval = (PyObject *(*)(struct __pyx_obj_4lxml_5etree_XSLTAccessControl *, xsltSecurityOption))__pyx_f_4lxml_5etree_17XSLTAccessControl__optval;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_XSLTAccessControl) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_XSLTAccessControl.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_XSLTAccessControl.tp_dict, __pyx_vtabptr_4lxml_5etree_XSLTAccessControl) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "XSLTAccessControl", (PyObject *)&__pyx_type_4lxml_5etree_XSLTAccessControl) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_XSLTAccessControl = &__pyx_type_4lxml_5etree_XSLTAccessControl;
- __pyx_vtabptr_4lxml_5etree_SiblingsIterator = &__pyx_vtable_4lxml_5etree_SiblingsIterator;
- __pyx_vtable_4lxml_5etree_SiblingsIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
- __pyx_type_4lxml_5etree_SiblingsIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_SiblingsIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_SiblingsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_SiblingsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "SiblingsIterator", (PyObject *)&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2643; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_SiblingsIterator = &__pyx_type_4lxml_5etree_SiblingsIterator;
- __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy = &__pyx_vtable_4lxml_5etree__ModifyContentOnlyPIProxy;
- __pyx_vtable_4lxml_5etree__ModifyContentOnlyPIProxy.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ModifyContentOnlyProxy;
- __pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy.tp_base = __pyx_ptype_4lxml_5etree__ModifyContentOnlyProxy;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy.tp_dict, __pyx_vtabptr_4lxml_5etree__ModifyContentOnlyPIProxy) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 439; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ModifyContentOnlyPIProxy = &__pyx_type_4lxml_5etree__ModifyContentOnlyPIProxy;
- __pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry = &__pyx_vtable_4lxml_5etree__ClassNamespaceRegistry;
- __pyx_vtable_4lxml_5etree__ClassNamespaceRegistry.__pyx_base = *__pyx_vtabptr_4lxml_5etree__NamespaceRegistry;
- __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_base = __pyx_ptype_4lxml_5etree__NamespaceRegistry;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ClassNamespaceRegistry) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ClassNamespaceRegistry.tp_dict, __pyx_vtabptr_4lxml_5etree__ClassNamespaceRegistry) < 0) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ClassNamespaceRegistry = &__pyx_type_4lxml_5etree__ClassNamespaceRegistry;
- __pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext = &__pyx_vtable_4lxml_5etree__ParserSchemaValidationContext;
- __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.copy = (struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *(*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_copy;
- __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.inject_default_attributes = (void (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlDoc *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_inject_default_attributes;
- __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.connect = (int (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *, xmlParserCtxt *, struct __pyx_obj_4lxml_5etree__BaseErrorLog *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_connect;
- __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.disconnect = (void (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_disconnect;
- __pyx_vtable_4lxml_5etree__ParserSchemaValidationContext.isvalid = (int (*)(struct __pyx_obj_4lxml_5etree__ParserSchemaValidationContext *))__pyx_f_4lxml_5etree_30_ParserSchemaValidationContext_isvalid;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__ParserSchemaValidationContext) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__ParserSchemaValidationContext.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ParserSchemaValidationContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ParserSchemaValidationContext) < 0) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__ParserSchemaValidationContext = &__pyx_type_4lxml_5etree__ParserSchemaValidationContext;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__DTDEntityDecl) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__DTDEntityDecl.tp_print = 0;
- __pyx_ptype_4lxml_5etree__DTDEntityDecl = &__pyx_type_4lxml_5etree__DTDEntityDecl;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__AttribIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__AttribIterator.tp_print = 0;
- __pyx_ptype_4lxml_5etree__AttribIterator = &__pyx_type_4lxml_5etree__AttribIterator;
- __pyx_vtabptr_4lxml_5etree_PythonElementClassLookup = &__pyx_vtable_4lxml_5etree_PythonElementClassLookup;
- __pyx_vtable_4lxml_5etree_PythonElementClassLookup.__pyx_base = *__pyx_vtabptr_4lxml_5etree_FallbackElementClassLookup;
- __pyx_type_4lxml_5etree_PythonElementClassLookup.tp_base = __pyx_ptype_4lxml_5etree_FallbackElementClassLookup;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_PythonElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_PythonElementClassLookup.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PythonElementClassLookup.tp_dict, __pyx_vtabptr_4lxml_5etree_PythonElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "PythonElementClassLookup", (PyObject *)&__pyx_type_4lxml_5etree_PythonElementClassLookup) < 0) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_PythonElementClassLookup = &__pyx_type_4lxml_5etree_PythonElementClassLookup;
- __pyx_vtabptr_4lxml_5etree_ElementChildIterator = &__pyx_vtable_4lxml_5etree_ElementChildIterator;
- __pyx_vtable_4lxml_5etree_ElementChildIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator;
- __pyx_type_4lxml_5etree_ElementChildIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator;
- if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree_ElementChildIterator.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementChildIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "ElementChildIterator", (PyObject *)&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree_ElementChildIterator = &__pyx_type_4lxml_5etree_ElementChildIterator;
- __pyx_vtabptr_4lxml_5etree__RotatingErrorLog = &__pyx_vtable_4lxml_5etree__RotatingErrorLog;
- __pyx_vtable_4lxml_5etree__RotatingErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ErrorLog;
- __pyx_vtable_4lxml_5etree__RotatingErrorLog.__pyx_base.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive;
- __pyx_type_4lxml_5etree__RotatingErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ErrorLog;
- if (PyType_Ready(&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_type_4lxml_5etree__RotatingErrorLog.tp_print = 0;
- if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__RotatingErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__RotatingErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__Pyx_SetAttrString(__pyx_m, "_RotatingErrorLog", (PyObject *)&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_ptype_4lxml_5etree__RotatingErrorLog = &__pyx_type_4lxml_5etree__RotatingErrorLog;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree__MemDebug) < 0) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree__MemDebug.tp_print = 0;
+ __pyx_ptype_4lxml_5etree__MemDebug = &__pyx_type_4lxml_5etree__MemDebug;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct__itervalues) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree___pyx_scope_struct__itervalues.tp_print = 0;
+ __pyx_ptype_4lxml_5etree___pyx_scope_struct__itervalues = &__pyx_type_4lxml_5etree___pyx_scope_struct__itervalues;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes.tp_print = 0;
+ __pyx_ptype_4lxml_5etree___pyx_scope_struct_1_iterattributes = &__pyx_type_4lxml_5etree___pyx_scope_struct_1_iterattributes;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements.tp_print = 0;
+ __pyx_ptype_4lxml_5etree___pyx_scope_struct_2_iterelements = &__pyx_type_4lxml_5etree___pyx_scope_struct_2_iterelements;
+ if (PyType_Ready(&__pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities) < 0) {__pyx_filename = __pyx_f[20]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities.tp_print = 0;
+ __pyx_ptype_4lxml_5etree___pyx_scope_struct_3_iterentities = &__pyx_type_4lxml_5etree___pyx_scope_struct_3_iterentities;
/*--- Type import code ---*/
/*--- Variable import code ---*/
/*--- Function import code ---*/
*/
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_6 = PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_getdefaultencoding); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
- __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_6, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*/
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_6 = PyObject_Call(__pyx_t_1, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_match); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_group); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_1, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L32_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7);
__Pyx_GIVEREF(__pyx_t_7);
__pyx_t_7 = 0;
- __pyx_t_7 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
*
* cdef _BaseErrorLog _getGlobalErrorLog():
*/
- __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__RotatingErrorLog)), __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__RotatingErrorLog)), __pyx_tuple__115, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG));
__Pyx_DECREF_SET(__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_7));
PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
*
* set_element_class_lookup(DEFAULT_ELEMENT_CLASS_LOOKUP)
*/
- __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ParserBasedElementClassLookup)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP));
__Pyx_DECREF_SET(__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP, ((struct __pyx_obj_4lxml_5etree_ParserBasedElementClassLookup *)__pyx_t_6));
__Pyx_INCREF(((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP));
PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP));
__Pyx_GIVEREF(((PyObject *)__pyx_v_4lxml_5etree_DEFAULT_ELEMENT_CLASS_LOOKUP));
- __pyx_t_7 = PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_7);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":185
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":186
*
* cdef _ParserDictionaryContext __GLOBAL_PARSER_CONTEXT
* __GLOBAL_PARSER_CONTEXT = _ParserDictionaryContext() # <<<<<<<<<<<<<<
* __GLOBAL_PARSER_CONTEXT.initMainParserContext()
*
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParserDictionaryContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__ParserDictionaryContext)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT));
__Pyx_DECREF_SET(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, ((struct __pyx_obj_4lxml_5etree__ParserDictionaryContext *)__pyx_t_1));
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":186
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":187
* cdef _ParserDictionaryContext __GLOBAL_PARSER_CONTEXT
* __GLOBAL_PARSER_CONTEXT = _ParserDictionaryContext()
* __GLOBAL_PARSER_CONTEXT.initMainParserContext() # <<<<<<<<<<<<<<
*/
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_initMainParserContext(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":193
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":194
*
* # name of Python unicode encoding as known to libxml2
* cdef const_char* _UNICODE_ENCODING = NULL # <<<<<<<<<<<<<<
*/
__pyx_v_4lxml_5etree__UNICODE_ENCODING = NULL;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":244
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":245
* return tree.xmlGetCharEncodingName(enc)
*
* _setupPythonUnicode() # <<<<<<<<<<<<<<
*
* ############################################################
*/
- __pyx_t_5 = __pyx_f_4lxml_5etree__setupPythonUnicode(); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __pyx_f_4lxml_5etree__setupPythonUnicode(); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 245; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":494
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":495
*
* cdef xmlparser.xmlExternalEntityLoader __DEFAULT_ENTITY_LOADER
* __DEFAULT_ENTITY_LOADER = xmlparser.xmlGetExternalEntityLoader() # <<<<<<<<<<<<<<
*/
__pyx_v_4lxml_5etree___DEFAULT_ENTITY_LOADER = xmlGetExternalEntityLoader();
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":496
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":497
* __DEFAULT_ENTITY_LOADER = xmlparser.xmlGetExternalEntityLoader()
*
* xmlparser.xmlSetExternalEntityLoader(<xmlparser.xmlExternalEntityLoader>_local_resolver) # <<<<<<<<<<<<<<
*/
xmlSetExternalEntityLoader(((xmlExternalEntityLoader)__pyx_f_4lxml_5etree__local_resolver));
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1299
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1355
* xmlparser.XML_PARSE_NOENT |
* xmlparser.XML_PARSE_NOCDATA |
* xmlparser.XML_PARSE_NONET | # <<<<<<<<<<<<<<
*/
__pyx_v_4lxml_5etree__XML_DEFAULT_PARSE_OPTIONS = (((XML_PARSE_NOENT | XML_PARSE_NOCDATA) | XML_PARSE_NONET) | XML_PARSE_COMPACT);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1455
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1511
*
* # ET 1.2 compatible name
* XMLTreeBuilder = ETCompatXMLParser # <<<<<<<<<<<<<<
*
*
*/
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMLTreeBuilder, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ETCompatXMLParser))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1455; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_XMLTreeBuilder, ((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_ETCompatXMLParser))) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1459
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1515
*
* cdef XMLParser __DEFAULT_XML_PARSER
* __DEFAULT_XML_PARSER = XMLParser() # <<<<<<<<<<<<<<
*
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER)
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1459; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XMLParser)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER));
__Pyx_DECREF_SET(__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER, ((struct __pyx_obj_4lxml_5etree_XMLParser *)__pyx_t_1));
__Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1461
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1517
* __DEFAULT_XML_PARSER = XMLParser()
*
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER) # <<<<<<<<<<<<<<
__pyx_f_4lxml_5etree_24_ParserDictionaryContext_setDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_1));
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1463
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1519
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(__DEFAULT_XML_PARSER)
*
* def set_default_parser(_BaseParser parser=None): # <<<<<<<<<<<<<<
* u"""set_default_parser(parser=None)
*
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_5etree_43set_default_parser, NULL, __pyx_n_s_lxml_etree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_5etree_43set_default_parser, NULL, __pyx_n_s_lxml_etree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_parser, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_parser, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1479
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1535
* __GLOBAL_PARSER_CONTEXT.setDefaultParser(parser)
*
* def get_default_parser(): # <<<<<<<<<<<<<<
* u"get_default_parser()"
* return __GLOBAL_PARSER_CONTEXT.getDefaultParser()
*/
- __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_5etree_45get_default_parser, NULL, __pyx_n_s_lxml_etree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_4lxml_5etree_45get_default_parser, NULL, __pyx_n_s_lxml_etree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_default_parser, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_default_parser, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1490
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1546
* _HTML_DEFAULT_PARSE_OPTIONS = (
* htmlparser.HTML_PARSE_RECOVER |
* htmlparser.HTML_PARSE_NONET | # <<<<<<<<<<<<<<
*/
__pyx_v_4lxml_5etree__HTML_DEFAULT_PARSE_OPTIONS = ((HTML_PARSE_RECOVER | HTML_PARSE_NONET) | HTML_PARSE_COMPACT);
- /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1547
+ /* "/home/stefan/source/Python/lxml/lxml-release/src/lxml/parser.pxi":1603
*
* cdef HTMLParser __DEFAULT_HTML_PARSER
* __DEFAULT_HTML_PARSER = HTMLParser() # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_HTMLParser)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_HTMLParser)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 1603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___DEFAULT_HTML_PARSER));
__Pyx_DECREF_SET(__pyx_v_4lxml_5etree___DEFAULT_HTML_PARSER, ((struct __pyx_obj_4lxml_5etree_HTMLParser *)__pyx_t_1));
*/
__pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_14 = PyObject_Call(__pyx_t_15, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__188, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_sub); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*/
__pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- __pyx_t_14 = PyObject_Call(__pyx_t_15, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__190, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_findall); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[18]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* read_file=False, write_file=False, create_dir=False,
* read_network=False, write_network=False)
*/
- __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XSLTAccessControl)), __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XSLTAccessControl)), __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl->tp_dict, __pyx_n_s_DENY_ALL, __pyx_t_15) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
* read_file=True, write_file=False, create_dir=False,
* read_network=True, write_network=False)
*/
- __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XSLTAccessControl)), __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XSLTAccessControl)), __pyx_empty_tuple, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLTAccessControl->tp_dict, __pyx_n_s_DENY_WRITE, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
__Pyx_GIVEREF(__pyx_t_14);
__pyx_t_14 = 0;
- __pyx_t_14 = PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_strparam, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
__Pyx_GIVEREF(__pyx_t_14);
__pyx_t_14 = 0;
- __pyx_t_14 = PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_strparam, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
__Pyx_GIVEREF(__pyx_t_14);
__pyx_t_14 = 0;
- __pyx_t_14 = PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_set_global_max_depth, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
__Pyx_GIVEREF(__pyx_t_14);
__pyx_t_14 = 0;
- __pyx_t_14 = PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_XSLT->tp_dict, __pyx_n_s_set_global_max_depth, __pyx_t_14) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
*/
__pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- __pyx_t_15 = PyObject_Call(__pyx_t_14, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
__Pyx_XGOTREF(__pyx_v_4lxml_5etree__RE_PI_HREF);
* u"boolean(//xs:attribute[@default or @fixed][1])",
* namespaces={u'xs': u'http://www.w3.org/2001/XMLSchema'})
*/
- __pyx_t_14 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPath)), __pyx_tuple__196, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree_XPath)), __pyx_tuple__196, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[22]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
__Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree__check_for_default_attributes));
*
* memory_debugger = _MemDebug() # <<<<<<<<<<<<<<
*/
- __pyx_t_15 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MemDebug)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4lxml_5etree__MemDebug)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
if (PyDict_SetItem(__pyx_d, __pyx_n_s_memory_debugger, __pyx_t_15) < 0) {__pyx_filename = __pyx_f[25]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
Py_CLEAR(__pyx_builtin_AssertionError);
/*--- Intern cleanup code ---*/
Py_CLEAR(__pyx_empty_tuple);
- while (__pyx_freecount_4lxml_5etree__Element > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__Element[--__pyx_freecount_4lxml_5etree__Element];
- (*Py_TYPE(o)->tp_free)(o);
- }
- while (__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[--__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues];
+ while (__pyx_freecount_4lxml_5etree__Document > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__Document[--__pyx_freecount_4lxml_5etree__Document];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes];
+ while (__pyx_freecount_4lxml_5etree__Element > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__Element[--__pyx_freecount_4lxml_5etree__Element];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[--__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam];
+ while (__pyx_freecount_4lxml_5etree_QName > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree_QName[--__pyx_freecount_4lxml_5etree_QName];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__DTDElementDecl > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementDecl[--__pyx_freecount_4lxml_5etree__DTDElementDecl];
+ while (__pyx_freecount_4lxml_5etree__LogEntry > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__LogEntry[--__pyx_freecount_4lxml_5etree__LogEntry];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__Document > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__Document[--__pyx_freecount_4lxml_5etree__Document];
+ while (__pyx_freecount_4lxml_5etree_DocInfo > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree_DocInfo[--__pyx_freecount_4lxml_5etree_DocInfo];
(*Py_TYPE(o)->tp_free)(o);
}
while (__pyx_freecount_4lxml_5etree__ElementTree > 0) {
PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__ElementTree[--__pyx_freecount_4lxml_5etree__ElementTree];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__LogEntry > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__LogEntry[--__pyx_freecount_4lxml_5etree__LogEntry];
+ while (__pyx_freecount_4lxml_5etree__Attrib > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__Attrib[--__pyx_freecount_4lxml_5etree__Attrib];
(*Py_TYPE(o)->tp_free)(o);
}
while (__pyx_freecount_4lxml_5etree_CDATA > 0) {
PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree_CDATA[--__pyx_freecount_4lxml_5etree_CDATA];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__DTDElementContentDecl > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementContentDecl[--__pyx_freecount_4lxml_5etree__DTDElementContentDecl];
+ while (__pyx_freecount_4lxml_5etree__FileWriterElement > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__FileWriterElement[--__pyx_freecount_4lxml_5etree__FileWriterElement];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements];
+ while (__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__XSLTQuotedStringParam[--__pyx_freecount_4lxml_5etree__XSLTQuotedStringParam];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree_DocInfo > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree_DocInfo[--__pyx_freecount_4lxml_5etree_DocInfo];
+ while (__pyx_freecount_4lxml_5etree__DTDElementContentDecl > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementContentDecl[--__pyx_freecount_4lxml_5etree__DTDElementContentDecl];
(*Py_TYPE(o)->tp_free)(o);
}
while (__pyx_freecount_4lxml_5etree__DTDAttributeDecl > 0) {
PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDAttributeDecl[--__pyx_freecount_4lxml_5etree__DTDAttributeDecl];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__FileWriterElement > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__FileWriterElement[--__pyx_freecount_4lxml_5etree__FileWriterElement];
+ while (__pyx_freecount_4lxml_5etree__DTDElementDecl > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDElementDecl[--__pyx_freecount_4lxml_5etree__DTDElementDecl];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__Attrib > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__Attrib[--__pyx_freecount_4lxml_5etree__Attrib];
+ while (__pyx_freecount_4lxml_5etree__DTDEntityDecl > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDEntityDecl[--__pyx_freecount_4lxml_5etree__DTDEntityDecl];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree_QName > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree_QName[--__pyx_freecount_4lxml_5etree_QName];
+ while (__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct__itervalues[--__pyx_freecount_4lxml_5etree___pyx_scope_struct__itervalues];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities];
+ while (__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_1_iterattributes[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_1_iterattributes];
(*Py_TYPE(o)->tp_free)(o);
}
- while (__pyx_freecount_4lxml_5etree__DTDEntityDecl > 0) {
- PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree__DTDEntityDecl[--__pyx_freecount_4lxml_5etree__DTDEntityDecl];
+ while (__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_2_iterelements[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_2_iterelements];
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+ while (__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities > 0) {
+ PyObject* o = (PyObject*)__pyx_freelist_4lxml_5etree___pyx_scope_struct_3_iterentities[--__pyx_freecount_4lxml_5etree___pyx_scope_struct_3_iterentities];
(*Py_TYPE(o)->tp_free)(o);
}
#if CYTHON_COMPILING_IN_PYPY
return -1;
}
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ PyObject *result;
+ ternaryfunc call = func->ob_type->tp_call;
+ if (unlikely(!call))
+ return PyObject_Call(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+#endif
+ result = (*call)(func, arg, kw);
+#if PY_VERSION_HEX >= 0x02060000
+ Py_LeaveRecursiveCall();
+#endif
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
PyObject *tmp_type, *tmp_value, *tmp_tb;
if (PyString_Check(v)) {
char *s = PyString_AsString(v);
Py_ssize_t len = PyString_Size(v);
- if (len > 0 &&
- isspace(Py_CHARMASK(s[len-1])) &&
- s[len-1] != ' ')
- PyFile_SoftSpace(f, 0);
+ if (len > 0) {
+ switch (s[len-1]) {
+ case ' ': break;
+ case '\f': case '\r': case '\n': case '\t': case '\v':
+ PyFile_SoftSpace(f, 0);
+ break;
+ default: break;
+ }
+ }
}
}
if (newline) {
#endif /* PY_VERSION_HEX < 0x03030000 */
} else
#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */
+#if !CYTHON_COMPILING_IN_PYPY
#if PY_VERSION_HEX >= 0x02060000
if (PyByteArray_Check(o)) {
*length = PyByteArray_GET_SIZE(o);
return PyByteArray_AS_STRING(o);
} else
#endif
+#endif
{
char* result;
int r = PyBytes_AsStringAndSize(o, &result, length);