Daniel Veillard | 3ce5257 | 2002-02-03 15:08:05 +0000 | [diff] [blame] | 1 | #include <Python.h> |
Daniel Veillard | d2897fd | 2002-01-30 16:37:32 +0000 | [diff] [blame] | 2 | #include <libxml/tree.h> |
| 3 | #include <libxml/parser.h> |
| 4 | #include <libxml/parserInternals.h> |
| 5 | #include <libxml/catalog.h> |
| 6 | #include <libxml/threads.h> |
| 7 | #include <libxml/nanoftp.h> |
| 8 | #include <libxml/nanohttp.h> |
| 9 | #include <libxml/uri.h> |
| 10 | #include <libxml/xpath.h> |
| 11 | #include <libxml/xpathInternals.h> |
| 12 | #include <libxml/debugXML.h> |
Daniel Veillard | 96fe095 | 2002-01-30 20:52:23 +0000 | [diff] [blame] | 13 | #include <libxml/HTMLparser.h> |
| 14 | #include <libxml/HTMLtree.h> |
| 15 | #include <libxml/xinclude.h> |
Daniel Veillard | 1971ee2 | 2002-01-31 20:29:19 +0000 | [diff] [blame] | 16 | #include <libxml/xpointer.h> |
Daniel Veillard | 96fe095 | 2002-01-30 20:52:23 +0000 | [diff] [blame] | 17 | |
Daniel Veillard | 36eea2d | 2002-02-04 00:17:01 +0000 | [diff] [blame] | 18 | #define PyxmlNode_Get(v) (((v) == Py_None) ? NULL : \ |
| 19 | (((PyxmlNode_Object *)(v))->obj)) |
Daniel Veillard | 96fe095 | 2002-01-30 20:52:23 +0000 | [diff] [blame] | 20 | |
| 21 | typedef struct { |
| 22 | PyObject_HEAD |
| 23 | xmlNodePtr obj; |
| 24 | } PyxmlNode_Object; |
Daniel Veillard | d2897fd | 2002-01-30 16:37:32 +0000 | [diff] [blame] | 25 | |
Daniel Veillard | 36eea2d | 2002-02-04 00:17:01 +0000 | [diff] [blame] | 26 | #define PyxmlXPathContext_Get(v) (((v) == Py_None) ? NULL : \ |
| 27 | (((PyxmlXPathContext_Object *)(v))->obj)) |
| 28 | |
Daniel Veillard | 1971ee2 | 2002-01-31 20:29:19 +0000 | [diff] [blame] | 29 | typedef struct { |
| 30 | PyObject_HEAD |
| 31 | xmlXPathContextPtr obj; |
| 32 | } PyxmlXPathContext_Object; |
| 33 | |
Daniel Veillard | 7db3871 | 2002-02-07 16:39:11 +0000 | [diff] [blame] | 34 | #define PyxmlXPathParserContext_Get(v) (((v) == Py_None) ? NULL : \ |
| 35 | (((PyxmlXPathParserContext_Object *)(v))->obj)) |
| 36 | |
| 37 | typedef struct { |
| 38 | PyObject_HEAD |
| 39 | xmlXPathParserContextPtr obj; |
| 40 | } PyxmlXPathParserContext_Object; |
| 41 | |
Daniel Veillard | 36eea2d | 2002-02-04 00:17:01 +0000 | [diff] [blame] | 42 | #define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \ |
| 43 | (((PyparserCtxt_Object *)(v))->obj)) |
| 44 | |
Daniel Veillard | 3ce5257 | 2002-02-03 15:08:05 +0000 | [diff] [blame] | 45 | typedef struct { |
| 46 | PyObject_HEAD |
| 47 | xmlParserCtxtPtr obj; |
| 48 | } PyparserCtxt_Object; |
| 49 | |
Daniel Veillard | 7db3871 | 2002-02-07 16:39:11 +0000 | [diff] [blame] | 50 | #define Pycatalog_Get(v) (((v) == Py_None) ? NULL : \ |
| 51 | (((Pycatalog_Object *)(v))->obj)) |
| 52 | |
| 53 | typedef struct { |
| 54 | PyObject_HEAD |
| 55 | xmlCatalogPtr obj; |
| 56 | } Pycatalog_Object; |
| 57 | |
| 58 | #define PyFile_Get(v) (((v) == Py_None) ? NULL : \ |
| 59 | (PyFile_Check(v) ? NULL : (PyFile_AsFile(v)))) |
| 60 | |
Daniel Veillard | d2897fd | 2002-01-30 16:37:32 +0000 | [diff] [blame] | 61 | PyObject * libxml_intWrap(int val); |
Daniel Veillard | 4e1b26c | 2002-02-03 20:13:06 +0000 | [diff] [blame] | 62 | PyObject * libxml_longWrap(long val); |
Daniel Veillard | 1971ee2 | 2002-01-31 20:29:19 +0000 | [diff] [blame] | 63 | PyObject * libxml_xmlCharPtrWrap(xmlChar *str); |
| 64 | PyObject * libxml_constxmlCharPtrWrap(const xmlChar *str); |
| 65 | PyObject * libxml_charPtrWrap(char *str); |
| 66 | PyObject * libxml_constcharPtrWrap(const char *str); |
Daniel Veillard | c575b99 | 2002-02-08 13:28:40 +0000 | [diff] [blame] | 67 | PyObject * libxml_charPtrConstWrap(const char *str); |
| 68 | PyObject * libxml_xmlCharPtrConstWrap(const xmlChar *str); |
Daniel Veillard | d2897fd | 2002-01-30 16:37:32 +0000 | [diff] [blame] | 69 | PyObject * libxml_xmlDocPtrWrap(xmlDocPtr doc); |
| 70 | PyObject * libxml_xmlNodePtrWrap(xmlNodePtr node); |
| 71 | PyObject * libxml_xmlAttrPtrWrap(xmlAttrPtr attr); |
Daniel Veillard | 1971ee2 | 2002-01-31 20:29:19 +0000 | [diff] [blame] | 72 | PyObject * libxml_xmlNsPtrWrap(xmlNsPtr ns); |
| 73 | PyObject * libxml_xmlAttributePtrWrap(xmlAttributePtr ns); |
| 74 | PyObject * libxml_xmlElementPtrWrap(xmlElementPtr ns); |
Daniel Veillard | 96fe095 | 2002-01-30 20:52:23 +0000 | [diff] [blame] | 75 | PyObject * libxml_doubleWrap(double val); |
Daniel Veillard | 1971ee2 | 2002-01-31 20:29:19 +0000 | [diff] [blame] | 76 | PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt); |
Daniel Veillard | 3ce5257 | 2002-02-03 15:08:05 +0000 | [diff] [blame] | 77 | PyObject * libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt); |
Daniel Veillard | 7db3871 | 2002-02-07 16:39:11 +0000 | [diff] [blame] | 78 | PyObject * libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt); |
Daniel Veillard | 1971ee2 | 2002-01-31 20:29:19 +0000 | [diff] [blame] | 79 | PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj); |
Daniel Veillard | 7db3871 | 2002-02-07 16:39:11 +0000 | [diff] [blame] | 80 | PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj); |
Daniel Veillard | 96fe095 | 2002-01-30 20:52:23 +0000 | [diff] [blame] | 81 | |
Daniel Veillard | 3ce5257 | 2002-02-03 15:08:05 +0000 | [diff] [blame] | 82 | xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj); |