Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

225 rindas
8.4 KiB

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