Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

245 linhas
9.6 KiB

  1. /* Generated by Cython 3.1.2 */
  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":451
  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":465
  22. * # Public Python API
  23. *
  24. * @cython.final # <<<<<<<<<<<<<<
  25. * @cython.freelist(8)
  26. * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]:
  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":817
  37. *
  38. *
  39. * @cython.no_gc_clear # <<<<<<<<<<<<<<
  40. * cdef public class _Element [ type LxmlElementType, object LxmlElement ]:
  41. * """Element class.
  42. */
  43. struct LxmlElement {
  44. PyObject_HEAD
  45. struct LxmlDocument *_doc;
  46. xmlNode *_c_node;
  47. PyObject *_tag;
  48. };
  49. /* "lxml/etree.pyx":1991
  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":2765
  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":2796
  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. * """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. * """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. #ifdef CYTHON_EXTERN_C
  133. #undef __PYX_EXTERN_C
  134. #define __PYX_EXTERN_C CYTHON_EXTERN_C
  135. #elif defined(__PYX_EXTERN_C)
  136. #ifdef _MSC_VER
  137. #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
  138. #else
  139. #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
  140. #endif
  141. #else
  142. #ifdef __cplusplus
  143. #define __PYX_EXTERN_C extern "C"
  144. #else
  145. #define __PYX_EXTERN_C extern
  146. #endif
  147. #endif
  148. #ifndef DL_IMPORT
  149. #define DL_IMPORT(_T) _T
  150. #endif
  151. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlDocumentType;
  152. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementType;
  153. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTreeType;
  154. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTagMatcherType;
  155. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementIteratorType;
  156. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementBaseType;
  157. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementClassLookupType;
  158. __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
  159. __PYX_EXTERN_C struct LxmlElement *deepcopyNodeToDocument(struct LxmlDocument *, xmlNode *);
  160. __PYX_EXTERN_C struct LxmlElementTree *elementTreeFactory(struct LxmlElement *);
  161. __PYX_EXTERN_C struct LxmlElementTree *newElementTree(struct LxmlElement *, PyObject *);
  162. __PYX_EXTERN_C struct LxmlElementTree *adoptExternalDocument(xmlDoc *, PyObject *, int);
  163. __PYX_EXTERN_C struct LxmlElement *elementFactory(struct LxmlDocument *, xmlNode *);
  164. __PYX_EXTERN_C struct LxmlElement *makeElement(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  165. __PYX_EXTERN_C struct LxmlElement *makeSubElement(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
  166. __PYX_EXTERN_C void setElementClassLookupFunction(_element_class_lookup_function, PyObject *);
  167. __PYX_EXTERN_C PyObject *lookupDefaultElementClass(PyObject *, PyObject *, xmlNode *);
  168. __PYX_EXTERN_C PyObject *lookupNamespaceElementClass(PyObject *, PyObject *, xmlNode *);
  169. __PYX_EXTERN_C PyObject *callLookupFallback(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *);
  170. __PYX_EXTERN_C int tagMatches(xmlNode *, const xmlChar *, const xmlChar *);
  171. __PYX_EXTERN_C struct LxmlDocument *documentOrRaise(PyObject *);
  172. __PYX_EXTERN_C struct LxmlElement *rootNodeOrRaise(PyObject *);
  173. __PYX_EXTERN_C int hasText(xmlNode *);
  174. __PYX_EXTERN_C int hasTail(xmlNode *);
  175. __PYX_EXTERN_C PyObject *textOf(xmlNode *);
  176. __PYX_EXTERN_C PyObject *tailOf(xmlNode *);
  177. __PYX_EXTERN_C int setNodeText(xmlNode *, PyObject *);
  178. __PYX_EXTERN_C int setTailText(xmlNode *, PyObject *);
  179. __PYX_EXTERN_C PyObject *attributeValue(xmlNode *, xmlAttr *);
  180. __PYX_EXTERN_C PyObject *attributeValueFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
  181. __PYX_EXTERN_C PyObject *getAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
  182. __PYX_EXTERN_C PyObject *iterattributes(struct LxmlElement *, int);
  183. __PYX_EXTERN_C PyObject *collectAttributes(xmlNode *, int);
  184. __PYX_EXTERN_C int setAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
  185. __PYX_EXTERN_C int delAttribute(struct LxmlElement *, PyObject *);
  186. __PYX_EXTERN_C int delAttributeFromNsName(xmlNode *, const xmlChar *, const xmlChar *);
  187. __PYX_EXTERN_C int hasChild(xmlNode *);
  188. __PYX_EXTERN_C xmlNode *findChild(xmlNode *, Py_ssize_t);
  189. __PYX_EXTERN_C xmlNode *findChildForwards(xmlNode *, Py_ssize_t);
  190. __PYX_EXTERN_C xmlNode *findChildBackwards(xmlNode *, Py_ssize_t);
  191. __PYX_EXTERN_C xmlNode *nextElement(xmlNode *);
  192. __PYX_EXTERN_C xmlNode *previousElement(xmlNode *);
  193. __PYX_EXTERN_C void appendChild(struct LxmlElement *, struct LxmlElement *);
  194. __PYX_EXTERN_C int appendChildToElement(struct LxmlElement *, struct LxmlElement *);
  195. __PYX_EXTERN_C PyObject *pyunicode(const xmlChar *);
  196. __PYX_EXTERN_C PyObject *utf8(PyObject *);
  197. __PYX_EXTERN_C PyObject *getNsTag(PyObject *);
  198. __PYX_EXTERN_C PyObject *getNsTagWithEmptyNs(PyObject *);
  199. __PYX_EXTERN_C PyObject *namespacedName(xmlNode *);
  200. __PYX_EXTERN_C PyObject *namespacedNameFromNsName(const xmlChar *, const xmlChar *);
  201. __PYX_EXTERN_C void iteratorStoreNext(struct LxmlElementIterator *, struct LxmlElement *);
  202. __PYX_EXTERN_C void initTagMatch(struct LxmlElementTagMatcher *, PyObject *);
  203. __PYX_EXTERN_C xmlNs *findOrBuildNodeNsPrefix(struct LxmlDocument *, xmlNode *, const xmlChar *, const xmlChar *);
  204. #endif /* !__PYX_HAVE_API__lxml__etree */
  205. /* WARNING: the interface of the module init function changed in CPython 3.5. */
  206. /* It now returns a PyModuleDef instance instead of a PyModule instance. */
  207. /* WARNING: Use PyImport_AppendInittab("etree", PyInit_etree) instead of calling PyInit_etree directly from Python 3.5 */
  208. PyMODINIT_FUNC PyInit_etree(void);
  209. #if PY_VERSION_HEX >= 0x03050000 && (defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER) || (defined(__cplusplus) && __cplusplus >= 201402L))
  210. #if defined(__cplusplus) && __cplusplus >= 201402L
  211. [[deprecated("Use PyImport_AppendInittab(\"etree\", PyInit_etree) instead of calling PyInit_etree directly.")]] inline
  212. #elif defined(__GNUC__) || defined(__clang__)
  213. __attribute__ ((__deprecated__("Use PyImport_AppendInittab(\"etree\", PyInit_etree) instead of calling PyInit_etree directly."), __unused__)) __inline__
  214. #elif defined(_MSC_VER)
  215. __declspec(deprecated("Use PyImport_AppendInittab(\"etree\", PyInit_etree) instead of calling PyInit_etree directly.")) __inline
  216. #endif
  217. static PyObject* __PYX_WARN_IF_PyInit_etree_INIT_CALLED(PyObject* res) {
  218. return res;
  219. }
  220. #define PyInit_etree() __PYX_WARN_IF_PyInit_etree_INIT_CALLED(PyInit_etree())
  221. #endif
  222. #endif /* !__PYX_HAVE__lxml__etree */