mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
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
This commit is contained in:
@ -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>
|
Tue Feb 4 16:31:55 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* valid.c: fixing bug #103969 forgot to add an epsilon transition
|
* valid.c: fixing bug #103969 forgot to add an epsilon transition
|
||||||
|
@ -586,6 +586,7 @@ if test "$with_schemas" = "yes" ; then
|
|||||||
TEST_SCHEMAS="Schemastests Relaxtests"
|
TEST_SCHEMAS="Schemastests Relaxtests"
|
||||||
with_regexps=yes
|
with_regexps=yes
|
||||||
else
|
else
|
||||||
|
echo "Disabled Schemas/Relax-NG support"
|
||||||
WITH_SCHEMAS=0
|
WITH_SCHEMAS=0
|
||||||
TEST_SCHEMAS=
|
TEST_SCHEMAS=
|
||||||
fi
|
fi
|
||||||
|
@ -77,6 +77,7 @@ typedef struct {
|
|||||||
xmlCatalogPtr obj;
|
xmlCatalogPtr obj;
|
||||||
} Pycatalog_Object;
|
} Pycatalog_Object;
|
||||||
|
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
#define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \
|
#define PyxmlReg_Get(v) (((v) == Py_None) ? NULL : \
|
||||||
(((PyxmlReg_Object *)(v))->obj))
|
(((PyxmlReg_Object *)(v))->obj))
|
||||||
|
|
||||||
@ -84,6 +85,7 @@ typedef struct {
|
|||||||
PyObject_HEAD
|
PyObject_HEAD
|
||||||
xmlRegexpPtr obj;
|
xmlRegexpPtr obj;
|
||||||
} PyxmlReg_Object;
|
} PyxmlReg_Object;
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
|
|
||||||
#define PyxmlTextReader_Get(v) (((v) == Py_None) ? NULL : \
|
#define PyxmlTextReader_Get(v) (((v) == Py_None) ? NULL : \
|
||||||
(((PyxmlTextReader_Object *)(v))->obj))
|
(((PyxmlTextReader_Object *)(v))->obj))
|
||||||
@ -153,7 +155,9 @@ PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj);
|
|||||||
PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri);
|
PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri);
|
||||||
PyObject * libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer);
|
PyObject * libxml_xmlOutputBufferPtrWrap(xmlOutputBufferPtr buffer);
|
||||||
PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer);
|
PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer);
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp);
|
PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp);
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader);
|
PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader);
|
||||||
PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator);
|
PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator);
|
||||||
|
|
||||||
|
@ -531,6 +531,7 @@ libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer)
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
|
libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
|
||||||
{
|
{
|
||||||
@ -548,6 +549,7 @@ libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp)
|
|||||||
(char *) "xmlRegexpPtr", NULL);
|
(char *) "xmlRegexpPtr", NULL);
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader)
|
libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader)
|
||||||
|
2
valid.c
2
valid.c
@ -5133,6 +5133,7 @@ xmlValidGetElemDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
|
|||||||
return(elemDecl);
|
return(elemDecl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
/**
|
/**
|
||||||
* xmlValidatePushElement:
|
* xmlValidatePushElement:
|
||||||
* @ctxt: the validation context
|
* @ctxt: the validation context
|
||||||
@ -5342,6 +5343,7 @@ xmlValidatePopElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlValidateOneElement:
|
* xmlValidateOneElement:
|
||||||
|
@ -422,6 +422,7 @@ xmlTextReaderPushData(xmlTextReaderPtr reader) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
xmlTextReaderValidatePush(xmlTextReaderPtr reader) {
|
xmlTextReaderValidatePush(xmlTextReaderPtr reader) {
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
xmlNodePtr node = reader->node;
|
xmlNodePtr node = reader->node;
|
||||||
|
|
||||||
if ((node->ns == NULL) || (node->ns->prefix == NULL)) {
|
if ((node->ns == NULL) || (node->ns->prefix == NULL)) {
|
||||||
@ -438,6 +439,7 @@ xmlTextReaderValidatePush(xmlTextReaderPtr reader) {
|
|||||||
if (qname != NULL)
|
if (qname != NULL)
|
||||||
xmlFree(qname);
|
xmlFree(qname);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* xmlTextReaderValidatePop:
|
* xmlTextReaderValidatePop:
|
||||||
@ -447,6 +449,7 @@ xmlTextReaderValidatePush(xmlTextReaderPtr reader) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
xmlTextReaderValidatePop(xmlTextReaderPtr reader) {
|
xmlTextReaderValidatePop(xmlTextReaderPtr reader) {
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
xmlNodePtr node = reader->node;
|
xmlNodePtr node = reader->node;
|
||||||
|
|
||||||
if ((node->ns == NULL) || (node->ns->prefix == NULL)) {
|
if ((node->ns == NULL) || (node->ns->prefix == NULL)) {
|
||||||
@ -463,6 +466,7 @@ xmlTextReaderValidatePop(xmlTextReaderPtr reader) {
|
|||||||
if (qname != NULL)
|
if (qname != NULL)
|
||||||
xmlFree(qname);
|
xmlFree(qname);
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* xmlTextReaderValidateEntity:
|
* xmlTextReaderValidateEntity:
|
||||||
@ -474,6 +478,7 @@ xmlTextReaderValidatePop(xmlTextReaderPtr reader) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
|
xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
xmlNodePtr oldnode = reader->node;
|
xmlNodePtr oldnode = reader->node;
|
||||||
xmlNodePtr node = reader->node;
|
xmlNodePtr node = reader->node;
|
||||||
xmlParserCtxtPtr ctxt = reader->ctxt;
|
xmlParserCtxtPtr ctxt = reader->ctxt;
|
||||||
@ -543,6 +548,7 @@ xmlTextReaderValidateEntity(xmlTextReaderPtr reader) {
|
|||||||
} while ((node != NULL) && (node != oldnode));
|
} while ((node != NULL) && (node != oldnode));
|
||||||
} while ((node != NULL) && (node != oldnode));
|
} while ((node != NULL) && (node != oldnode));
|
||||||
reader->node = oldnode;
|
reader->node = oldnode;
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -735,6 +741,7 @@ node_found:
|
|||||||
reader->depth++;
|
reader->depth++;
|
||||||
goto get_next_node;
|
goto get_next_node;
|
||||||
}
|
}
|
||||||
|
#ifdef LIBXML_REGEXP_ENABLED
|
||||||
if ((reader->ctxt->validate) && (reader->node != NULL)) {
|
if ((reader->ctxt->validate) && (reader->node != NULL)) {
|
||||||
xmlNodePtr node = reader->node;
|
xmlNodePtr node = reader->node;
|
||||||
xmlParserCtxtPtr ctxt = reader->ctxt;
|
xmlParserCtxtPtr ctxt = reader->ctxt;
|
||||||
@ -749,6 +756,7 @@ node_found:
|
|||||||
node->content, xmlStrlen(node->content));
|
node->content, xmlStrlen(node->content));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* LIBXML_REGEXP_ENABLED */
|
||||||
return(1);
|
return(1);
|
||||||
node_end:
|
node_end:
|
||||||
return(0);
|
return(0);
|
||||||
|
Reference in New Issue
Block a user