fixing #104096 to compile without regexps Daniel
* configure.in valid.c xmlreader.c python/libxml_wrap.h
python/types.c: fixing #104096 to compile without regexps
Daniel
diff --git a/ChangeLog b/ChangeLog
index 8e19273..e0e1f6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 4 17:12:56 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * 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 <daniel@veillard.com>
* valid.c: fixing bug #103969 forgot to add an epsilon transition
diff --git a/configure.in b/configure.in
index 59395a7..ad6f08f 100644
--- a/configure.in
+++ b/configure.in
@@ -586,6 +586,7 @@
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 c59b706..56950e9 100644
--- a/python/libxml_wrap.h
+++ b/python/libxml_wrap.h
@@ -77,6 +77,7 @@
xmlCatalogPtr obj;
} Pycatalog_Object;
+#ifdef LIBXML_REGEXP_ENABLED
#define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \
(((PyxmlReg_Object *)(v))->obj))
@@ -84,6 +85,7 @@
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_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 a05c48a..37c9e60 100644
--- a/python/types.c
+++ b/python/types.c
@@ -531,6 +531,7 @@
return (ret);
}
+#ifdef LIBXML_REGEXP_ENABLED
PyObject *
libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
{
@@ -548,6 +549,7 @@
(char *) "xmlRegexpPtr", NULL);
return (ret);
}
+#endif /* LIBXML_REGEXP_ENABLED */
PyObject *
libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader)
diff --git a/valid.c b/valid.c
index a462bdb..0f0fd23 100644
--- a/valid.c
+++ b/valid.c
@@ -5133,6 +5133,7 @@
return(elemDecl);
}
+#ifdef LIBXML_REGEXP_ENABLED
/**
* xmlValidatePushElement:
* @ctxt: the validation context
@@ -5342,6 +5343,7 @@
}
return(ret);
}
+#endif /* LIBXML_REGEXP_ENABLED */
/**
* xmlValidateOneElement:
diff --git a/xmlreader.c b/xmlreader.c
index 84aba20..94b564f 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -422,6 +422,7 @@
*/
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 @@
if (qname != NULL)
xmlFree(qname);
}
+#endif /* LIBXML_REGEXP_ENABLED */
}
/**
* xmlTextReaderValidatePop:
@@ -447,6 +449,7 @@
*/
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 @@
if (qname != NULL)
xmlFree(qname);
}
+#endif /* LIBXML_REGEXP_ENABLED */
}
/**
* xmlTextReaderValidateEntity:
@@ -474,6 +478,7 @@
*/
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 @@
} while ((node != NULL) && (node != oldnode));
} while ((node != NULL) && (node != oldnode));
reader->node = oldnode;
+#endif /* LIBXML_REGEXP_ENABLED */
}
@@ -735,6 +741,7 @@
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->content, xmlStrlen(node->content));
}
}
+#endif /* LIBXML_REGEXP_ENABLED */
return(1);
node_end:
return(0);