1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-23 01:52:48 +03:00

python: Fix build with disabled modules

This commit is contained in:
Nick Wellnhofer
2024-06-06 22:55:15 +02:00
parent 15ed75664b
commit 1ae68e40df
3 changed files with 42 additions and 16 deletions

View File

@@ -89,6 +89,7 @@ typedef struct {
xmlNodePtr obj;
} PyxmlNode_Object;
#ifdef LIBXML_XPATH_ENABLED
#define PyxmlXPathContext_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlXPathContext_Object *)(v))->obj))
@@ -104,6 +105,7 @@ typedef struct {
PyObject_HEAD
xmlXPathParserContextPtr obj;
} PyxmlXPathParserContext_Object;
#endif /* LIBXML_XPATH_ENABLED */
#define PyparserCtxt_Get(v) (((v) == Py_None) ? NULL : \
(((PyparserCtxt_Object *)(v))->obj))
@@ -121,6 +123,7 @@ typedef struct {
xmlValidCtxtPtr obj;
} PyValidCtxt_Object;
#ifdef LIBXML_CATALOG_ENABLED
#define Pycatalog_Get(v) (((v) == Py_None) ? NULL : \
(((Pycatalog_Object *)(v))->obj))
@@ -128,6 +131,7 @@ typedef struct {
PyObject_HEAD
xmlCatalogPtr obj;
} Pycatalog_Object;
#endif /* LIBXML_CATALOG_ENABLED */
#ifdef LIBXML_REGEXP_ENABLED
#define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \
@@ -267,12 +271,17 @@ PyObject * libxml_xmlNsPtrWrap(xmlNsPtr ns);
PyObject * libxml_xmlAttributePtrWrap(xmlAttributePtr ns);
PyObject * libxml_xmlElementPtrWrap(xmlElementPtr ns);
PyObject * libxml_doubleWrap(double val);
PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt);
PyObject * libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt);
#ifdef LIBXML_XPATH_ENABLED
PyObject * libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt);
PyObject * libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt);
PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj);
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
#endif
PyObject * libxml_xmlValidCtxtPtrWrap(xmlValidCtxtPtr valid);
#ifdef LIBXML_CATALOG_ENABLED
PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj);
#endif
PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri);
PyObject * libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer);
PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer);
@@ -284,7 +293,6 @@ PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader);
PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator);
#endif
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
#ifdef LIBXML_SCHEMAS_ENABLED
PyObject * libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt);
PyObject * libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt);