1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-19 05:43:19 +03:00

fixed doc comment problems adding RelaxNG wrappers added a specific test

* xpath.c: fixed doc comment problems
* python/generator.py python/libxml_wrap.h python/types.c: adding
  RelaxNG wrappers
* python/tests/Makefile.am python/tests/relaxng.py: added a specific
  test of those early Python RelaxNG bindings
Daniel
This commit is contained in:
Daniel Veillard
2003-02-09 23:33:36 +00:00
parent 6581e1b881
commit 591b4be0fe
8 changed files with 176 additions and 4 deletions

View File

@ -587,3 +587,57 @@ libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator)
return (ret);
}
#ifdef LIBXML_SCHEMAS_ENABLED
PyObject *
libxml_xmlRelaxNGPtrWrap(xmlRelaxNGPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlRelaxNGPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlRelaxNGPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlRelaxNGParserCtxtPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlRelaxNGParserCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlRelaxNGValidCtxtPtrWrap: valid = %p\n", valid);
#endif
if (valid == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) valid,
(char *) "xmlRelaxNGValidCtxtPtr", NULL);
return (ret);
}
#endif /* LIBXML_SCHEMAS_ENABLED */