diff --git a/ChangeLog b/ChangeLog index 8e19273e..e0e1f6af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 4 17:12:56 CET 2003 Daniel Veillard + + * configure.in valid.c xmlreader.c python/libxml_wrap.h + python/types.c: fixing #104096 to compile without regexps + Tue Feb 4 16:31:55 CET 2003 Daniel Veillard * valid.c: fixing bug #103969 forgot to add an epsilon transition diff --git a/configure.in b/configure.in index 59395a78..ad6f08f0 100644 --- a/configure.in +++ b/configure.in @@ -586,6 +586,7 @@ if test "$with_schemas" = "yes" ; then TEST_SCHEMAS="Schemastests Relaxtests" with_regexps=yes else + echo "Disabled Schemas/Relax-NG support" WITH_SCHEMAS=0 TEST_SCHEMAS= fi diff --git a/python/libxml_wrap.h b/python/libxml_wrap.h index c59b706b..56950e91 100644 --- a/python/libxml_wrap.h +++ b/python/libxml_wrap.h @@ -77,6 +77,7 @@ typedef struct { xmlCatalogPtr obj; } Pycatalog_Object; +#ifdef LIBXML_REGEXP_ENABLED #define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \ (((PyxmlReg_Object *)(v))->obj)) @@ -84,6 +85,7 @@ typedef struct { PyObject_HEAD xmlRegexpPtr obj; } PyxmlReg_Object; +#endif /* LIBXML_REGEXP_ENABLED */ #define PyxmlTextReader_Get(v) (((v) == Py_None) ? NULL : \ (((PyxmlTextReader_Object *)(v))->obj)) @@ -153,7 +155,9 @@ PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj); PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri); PyObject * libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer); PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer); +#ifdef LIBXML_REGEXP_ENABLED PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp); +#endif /* LIBXML_REGEXP_ENABLED */ PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader); PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator); diff --git a/python/types.c b/python/types.c index a05c48a5..37c9e601 100644 --- a/python/types.c +++ b/python/types.c @@ -531,6 +531,7 @@ libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer) return (ret); } +#ifdef LIBXML_REGEXP_ENABLED PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp) { @@ -548,6 +549,7 @@ libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp) (char *) "xmlRegexpPtr", NULL); return (ret); } +#endif /* LIBXML_REGEXP_ENABLED */ PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader) diff --git a/valid.c b/valid.c index a462bdbc..0f0fd231 100644 --- a/valid.c +++ b/valid.c @@ -5133,6 +5133,7 @@ xmlValidGetElemDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, return(elemDecl); } +#ifdef LIBXML_REGEXP_ENABLED /** * xmlValidatePushElement: * @ctxt: the validation context @@ -5342,6 +5343,7 @@ xmlValidatePopElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc ATTRIBUTE_UNUSED, } return(ret); } +#endif /* LIBXML_REGEXP_ENABLED */ /** * xmlValidateOneElement: diff --git a/xmlreader.c b/xmlreader.c index 84aba20c..94b564fe 100644 --- a/xmlreader.c +++ b/xmlreader.c @@ -422,6 +422,7 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) { */ static void xmlTextReaderValidatePush(xmlTextReaderPtr reader) { +#ifdef LIBXML_REGEXP_ENABLED xmlNodePtr node = reader->node; if ((node->ns == NULL) || (node->ns->prefix == NULL)) { @@ -438,6 +439,7 @@ xmlTextReaderValidatePush(xmlTextReaderPtr reader) { if (qname != NULL) xmlFree(qname); } +#endif /* LIBXML_REGEXP_ENABLED */ } /** * xmlTextReaderValidatePop: @@ -447,6 +449,7 @@ xmlTextReaderValidatePush(xmlTextReaderPtr reader) { */ static void xmlTextReaderValidatePop(xmlTextReaderPtr reader) { +#ifdef LIBXML_REGEXP_ENABLED xmlNodePtr node = reader->node; if ((node->ns == NULL) || (node->ns->prefix == NULL)) { @@ -463,6 +466,7 @@ xmlTextReaderValidatePop(xmlTextReaderPtr reader) { if (qname != NULL) xmlFree(qname); } +#endif /* LIBXML_REGEXP_ENABLED */ } /** * xmlTextReaderValidateEntity: @@ -474,6 +478,7 @@ xmlTextReaderValidatePop(xmlTextReaderPtr reader) { */ static void xmlTextReaderValidateEntity(xmlTextReaderPtr reader) { +#ifdef LIBXML_REGEXP_ENABLED xmlNodePtr oldnode = reader->node; xmlNodePtr node = reader->node; xmlParserCtxtPtr ctxt = reader->ctxt; @@ -543,6 +548,7 @@ xmlTextReaderValidateEntity(xmlTextReaderPtr reader) { } while ((node != NULL) && (node != oldnode)); } while ((node != NULL) && (node != oldnode)); reader->node = oldnode; +#endif /* LIBXML_REGEXP_ENABLED */ } @@ -735,6 +741,7 @@ node_found: reader->depth++; goto get_next_node; } +#ifdef LIBXML_REGEXP_ENABLED if ((reader->ctxt->validate) && (reader->node != NULL)) { xmlNodePtr node = reader->node; xmlParserCtxtPtr ctxt = reader->ctxt; @@ -749,6 +756,7 @@ node_found: node->content, xmlStrlen(node->content)); } } +#endif /* LIBXML_REGEXP_ENABLED */ return(1); node_end: return(0);