You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

223 lines
8.4 KiB

4 years ago
  1. /* Generated by Cython 0.28.5 */
  2. #ifndef __PYX_HAVE__lxml__etree
  3. #define __PYX_HAVE__lxml__etree
  4. struct LxmlDocument;
  5. struct LxmlElement;
  6. struct LxmlElementTree;
  7. struct LxmlElementTagMatcher;
  8. struct LxmlElementIterator;
  9. struct LxmlElementBase;
  10. struct LxmlElementClassLookup;
  11. struct LxmlFallbackElementClassLookup;
  12. /* "lxml/etree.pyx":320
  13. *
  14. * # type of a function that steps from node to node
  15. * ctypedef public xmlNode* (*_node_to_node_function)(xmlNode*) # <<<<<<<<<<<<<<
  16. *
  17. *
  18. */
  19. typedef xmlNode *(*_node_to_node_function)(xmlNode *);
  20. /* "lxml/etree.pyx":336
  21. * @cython.final
  22. * @cython.freelist(8)
  23. * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]: # <<<<<<<<<<<<<<
  24. * u"""Internal base class to reference a libxml document.
  25. *
  26. */
  27. struct LxmlDocument {
  28. PyObject_HEAD
  29. struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
  30. int _ns_counter;
  31. PyObject *_prefix_tail;
  32. xmlDoc *_c_doc;
  33. struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
  34. };
  35. /* "lxml/etree.pyx":685
  36. *
  37. * @cython.no_gc_clear
  38. * cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # <<<<<<<<<<<<<<
  39. * u"""Element class.
  40. *
  41. */
  42. struct LxmlElement {
  43. PyObject_HEAD
  44. struct LxmlDocument *_doc;
  45. xmlNode *_c_node;
  46. PyObject *_tag;
  47. };
  48. /* "lxml/etree.pyx":1849
  49. *
  50. *
  51. * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<<
  52. * object LxmlElementTree ]:
  53. * cdef _Document _doc
  54. */
  55. struct LxmlElementTree {
  56. PyObject_HEAD
  57. struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
  58. struct LxmlDocument *_doc;
  59. struct LxmlElement *_context_node;
  60. };
  61. /* "lxml/etree.pyx":2576
  62. *
  63. *
  64. * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<<
  65. * type LxmlElementTagMatcherType ]:
  66. * """
  67. */
  68. struct LxmlElementTagMatcher {
  69. PyObject_HEAD
  70. struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
  71. PyObject *_pystrings;
  72. int _node_type;
  73. char *_href;
  74. char *_name;
  75. };
  76. /* "lxml/etree.pyx":2607
  77. * self._name = NULL
  78. *
  79. * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<<
  80. * object LxmlElementIterator, type LxmlElementIteratorType ]:
  81. * """
  82. */
  83. struct LxmlElementIterator {
  84. struct LxmlElementTagMatcher __pyx_base;
  85. struct LxmlElement *_node;
  86. _node_to_node_function _next_element;
  87. };
  88. /* "src/lxml/classlookup.pxi":6
  89. * # Custom Element classes
  90. *
  91. * cdef public class ElementBase(_Element) [ type LxmlElementBaseType, # <<<<<<<<<<<<<<
  92. * object LxmlElementBase ]:
  93. * u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)
  94. */
  95. struct LxmlElementBase {
  96. struct LxmlElement __pyx_base;
  97. };
  98. /* "src/lxml/classlookup.pxi":210
  99. * # Element class lookup
  100. *
  101. * ctypedef public object (*_element_class_lookup_function)(object, _Document, xmlNode*) # <<<<<<<<<<<<<<
  102. *
  103. * # class to store element class lookup functions
  104. */
  105. typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocument *, xmlNode *);
  106. /* "src/lxml/classlookup.pxi":213
  107. *
  108. * # class to store element class lookup functions
  109. * cdef public class ElementClassLookup [ type LxmlElementClassLookupType, # <<<<<<<<<<<<<<
  110. * object LxmlElementClassLookup ]:
  111. * u"""ElementClassLookup(self)
  112. */
  113. struct LxmlElementClassLookup {
  114. PyObject_HEAD
  115. _element_class_lookup_function _lookup_function;
  116. };
  117. /* "src/lxml/classlookup.pxi":221
  118. *
  119. *
  120. * cdef public class FallbackElementClassLookup(ElementClassLookup) \ # <<<<<<<<<<<<<<
  121. * [ type LxmlFallbackElementClassLookupType,
  122. * object LxmlFallbackElementClassLookup ]:
  123. */
  124. struct LxmlFallbackElementClassLookup {
  125. struct LxmlElementClassLookup __pyx_base;
  126. struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtab;
  127. struct LxmlElementClassLookup *fallback;
  128. _element_class_lookup_function _fallback_function;
  129. };
  130. #ifndef __PYX_HAVE_API__lxml__etree
  131. #ifndef __PYX_EXTERN_C
  132. #ifdef __cplusplus
  133. #define __PYX_EXTERN_C extern "C"
  134. #else
  135. #define __PYX_EXTERN_C extern
  136. #endif
  137. #endif
  138. #ifndef DL_IMPORT
  139. #define DL_IMPORT(_T) _T
  140. #endif
  141. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlDocumentType;
  142. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementType;
  143. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTreeType;
  144. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTagMatcherType;
  145. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementIteratorType;
  146. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementBaseType;
  147. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementClassLookupType;
  148. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
  149. __PYX_EXTERN_C struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *, xmlNode *);
  150. __PYX_EXTERN_C struct LxmlElementTree *elementTreeFactory(struct LxmlElement *);
  151. __PYX_EXTERN_C struct LxmlElementTree *newElementTree(struct LxmlElement *, PyObject *);
  152. __PYX_EXTERN_C struct LxmlElementTree *adoptExternalDocument(xmlDoc *, PyObject *, int);
  153. __PYX_EXTERN_C struct LxmlElement *elementFactory(struct LxmlDocument *, xmlNode *);
  154. __PYX_EXTERN_C struct LxmlElement *makeElement(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  155. __PYX_EXTERN_C struct LxmlElement *makeSubElement(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  156. __PYX_EXTERN_C void setElementClassLookupFunction(_element_class_lookup_function, PyObject *);
  157. __PYX_EXTERN_C PyObject *lookupDefaultElementClass(PyObject *, PyObject *, xmlNode *);
  158. __PYX_EXTERN_C PyObject *lookupNamespaceElementClass(PyObject *, PyObject *, xmlNode *);
  159. __PYX_EXTERN_C PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *);
  160. __PYX_EXTERN_C int tagMatches(xmlNode *, const xmlChar *, const xmlChar *);
  161. __PYX_EXTERN_C struct LxmlDocument *documentOrRaise(PyObject *);
  162. __PYX_EXTERN_C struct LxmlElement *rootNodeOrRaise(PyObject *);
  163. __PYX_EXTERN_C int hasText(xmlNode *);
  164. __PYX_EXTERN_C int hasTail(xmlNode *);
  165. __PYX_EXTERN_C PyObject *textOf(xmlNode *);
  166. __PYX_EXTERN_C PyObject *tailOf(xmlNode *);
  167. __PYX_EXTERN_C int setNodeText(xmlNode *, PyObject *);
  168. __PYX_EXTERN_C int setTailText(xmlNode *, PyObject *);
  169. __PYX_EXTERN_C PyObject *attributeValue(xmlNode *, xmlAttr *);
  170. __PYX_EXTERN_C PyObject *attributeValueFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
  171. __PYX_EXTERN_C PyObject *getAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
  172. __PYX_EXTERN_C PyObject *iterattributes(struct LxmlElement *, int);
  173. __PYX_EXTERN_C PyObject *collectAttributes(xmlNode *, int);
  174. __PYX_EXTERN_C int setAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
  175. __PYX_EXTERN_C int delAttribute(struct LxmlElement *, PyObject *);
  176. __PYX_EXTERN_C int delAttributeFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
  177. __PYX_EXTERN_C int hasChild(xmlNode *);
  178. __PYX_EXTERN_C xmlNode *findChild(xmlNode *, Py_ssize_t);
  179. __PYX_EXTERN_C xmlNode *findChildForwards(xmlNode *, Py_ssize_t);
  180. __PYX_EXTERN_C xmlNode *findChildBackwards(xmlNode *, Py_ssize_t);
  181. __PYX_EXTERN_C xmlNode *nextElement(xmlNode *);
  182. __PYX_EXTERN_C xmlNode *previousElement(xmlNode *);
  183. __PYX_EXTERN_C void appendChild(struct LxmlElement *, struct LxmlElement *);
  184. __PYX_EXTERN_C int appendChildToElement(struct LxmlElement *, struct LxmlElement *);
  185. __PYX_EXTERN_C PyObject *pyunicode(const xmlChar *);
  186. __PYX_EXTERN_C PyObject *utf8(PyObject *);
  187. __PYX_EXTERN_C PyObject *getNsTag(PyObject *);
  188. __PYX_EXTERN_C PyObject *getNsTagWithEmptyNs(PyObject *);
  189. __PYX_EXTERN_C PyObject *namespacedName(xmlNode *);
  190. __PYX_EXTERN_C PyObject *namespacedNameFromNsName(const xmlChar *, const xmlChar *);
  191. __PYX_EXTERN_C void iteratorStoreNext(struct LxmlElementIterator *, struct LxmlElement *);
  192. __PYX_EXTERN_C void initTagMatch(struct LxmlElementTagMatcher *, PyObject *);
  193. __PYX_EXTERN_C xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *);
  194. #endif /* !__PYX_HAVE_API__lxml__etree */
  195. /* WARNING: the interface of the module init function changed in CPython 3.5. */
  196. /* It now returns a PyModuleDef instance instead of a PyModule instance. */
  197. #if PY_MAJOR_VERSION < 3
  198. PyMODINIT_FUNC initetree(void);
  199. #else
  200. PyMODINIT_FUNC PyInit_etree(void);
  201. #endif
  202. #endif /* !__PYX_HAVE__lxml__etree */