2002-02-03 18:08:05 +03:00
# include <Python.h>
2002-01-30 19:37:32 +03:00
# include <libxml/tree.h>
# include <libxml/parser.h>
# include <libxml/parserInternals.h>
# include <libxml/catalog.h>
# include <libxml/threads.h>
# include <libxml/nanoftp.h>
# include <libxml/nanohttp.h>
# include <libxml/uri.h>
# include <libxml/xpath.h>
# include <libxml/xpathInternals.h>
# include <libxml/debugXML.h>
2002-01-30 23:52:23 +03:00
# include <libxml/HTMLparser.h>
# include <libxml/HTMLtree.h>
# include <libxml/xinclude.h>
2002-01-31 23:29:19 +03:00
# include <libxml/xpointer.h>
2002-01-30 23:52:23 +03:00
2002-02-04 03:17:01 +03:00
# define PyxmlNode_Get(v) (((v) == Py_None) ? NULL : \
( ( ( PyxmlNode_Object * ) ( v ) ) - > obj ) )
2002-01-30 23:52:23 +03:00
typedef struct {
PyObject_HEAD
xmlNodePtr obj ;
} PyxmlNode_Object ;
2002-01-30 19:37:32 +03:00
2002-02-04 03:17:01 +03:00
# define PyxmlXPathContext_Get(v) (((v) == Py_None) ? NULL : \
( ( ( PyxmlXPathContext_Object * ) ( v ) ) - > obj ) )
2002-01-31 23:29:19 +03:00
typedef struct {
PyObject_HEAD
xmlXPathContextPtr obj ;
} PyxmlXPathContext_Object ;
2002-02-07 19:39:11 +03:00
# define PyxmlXPathParserContext_Get(v) (((v) == Py_None) ? NULL : \
( ( ( PyxmlXPathParserContext_Object * ) ( v ) ) - > obj ) )
typedef struct {
PyObject_HEAD
xmlXPathParserContextPtr obj ;
} PyxmlXPathParserContext_Object ;
2002-02-04 03:17:01 +03:00
# define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \
( ( ( PyparserCtxt_Object * ) ( v ) ) - > obj ) )
2002-02-03 18:08:05 +03:00
typedef struct {
PyObject_HEAD
xmlParserCtxtPtr obj ;
} PyparserCtxt_Object ;
2002-02-07 19:39:11 +03:00
# define Pycatalog_Get(v) (((v) == Py_None) ? NULL : \
( ( ( Pycatalog_Object * ) ( v ) ) - > obj ) )
typedef struct {
PyObject_HEAD
xmlCatalogPtr obj ;
} Pycatalog_Object ;
2002-02-23 13:10:33 +03:00
# define PyURI_Get(v) (((v) == Py_None) ? NULL : \
( ( ( PyURI_Object * ) ( v ) ) - > obj ) )
typedef struct {
PyObject_HEAD
xmlURIPtr obj ;
} PyURI_Object ;
/* FILE * have their own internal representation */
2002-02-07 19:39:11 +03:00
# define PyFile_Get(v) (((v) == Py_None) ? NULL : \
( PyFile_Check ( v ) ? NULL : ( PyFile_AsFile ( v ) ) ) )
2002-02-23 13:10:33 +03:00
2002-01-30 19:37:32 +03:00
PyObject * libxml_intWrap ( int val ) ;
2002-02-03 23:13:06 +03:00
PyObject * libxml_longWrap ( long val ) ;
2002-01-31 23:29:19 +03:00
PyObject * libxml_xmlCharPtrWrap ( xmlChar * str ) ;
PyObject * libxml_constxmlCharPtrWrap ( const xmlChar * str ) ;
PyObject * libxml_charPtrWrap ( char * str ) ;
PyObject * libxml_constcharPtrWrap ( const char * str ) ;
2002-02-08 16:28:40 +03:00
PyObject * libxml_charPtrConstWrap ( const char * str ) ;
PyObject * libxml_xmlCharPtrConstWrap ( const xmlChar * str ) ;
2002-01-30 19:37:32 +03:00
PyObject * libxml_xmlDocPtrWrap ( xmlDocPtr doc ) ;
PyObject * libxml_xmlNodePtrWrap ( xmlNodePtr node ) ;
PyObject * libxml_xmlAttrPtrWrap ( xmlAttrPtr attr ) ;
2002-01-31 23:29:19 +03:00
PyObject * libxml_xmlNsPtrWrap ( xmlNsPtr ns ) ;
PyObject * libxml_xmlAttributePtrWrap ( xmlAttributePtr ns ) ;
PyObject * libxml_xmlElementPtrWrap ( xmlElementPtr ns ) ;
2002-01-30 23:52:23 +03:00
PyObject * libxml_doubleWrap ( double val ) ;
2002-01-31 23:29:19 +03:00
PyObject * libxml_xmlXPathContextPtrWrap ( xmlXPathContextPtr ctxt ) ;
2002-02-03 18:08:05 +03:00
PyObject * libxml_xmlParserCtxtPtrWrap ( xmlParserCtxtPtr ctxt ) ;
2002-02-07 19:39:11 +03:00
PyObject * libxml_xmlXPathParserContextPtrWrap ( xmlXPathParserContextPtr ctxt ) ;
2002-01-31 23:29:19 +03:00
PyObject * libxml_xmlXPathObjectPtrWrap ( xmlXPathObjectPtr obj ) ;
2002-02-07 19:39:11 +03:00
PyObject * libxml_xmlCatalogPtrWrap ( xmlCatalogPtr obj ) ;
2002-02-23 13:10:33 +03:00
PyObject * libxml_xmlURIPtrWrap ( xmlURIPtr uri ) ;
2002-01-30 23:52:23 +03:00
2002-02-03 18:08:05 +03:00
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert ( PyObject * obj ) ;