1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-18 16:08:59 +03:00

Applied patch from Torkel Lyng to add Schemas support to the Python

* xmlschemas.c include/libxml/xmlschemas.h python/generator.py
  python/libxml.c python/libxml_wrap.h python/types.c
  python/tests/schema.py python/tests/Makefile.am: Applied patch
  from Torkel Lyng to add Schemas support to the Python bindings
  and extend the schemas error API, registered a new test.
* doc/* elfgcchack.h: rebuilt to regenerate the bindings
Daniel
This commit is contained in:
Daniel Veillard
2004-08-18 09:13:18 +00:00
parent c14c3892a2
commit 259f0dfa8b
91 changed files with 2706 additions and 1812 deletions

View File

@@ -640,6 +640,63 @@ libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)
(char *) "xmlRelaxNGValidCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlSchemaPtrWrap(xmlSchemaPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlSchemaPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlSchemaPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlSchemaParserCtxtPtrWrap(xmlSchemaParserCtxtPtr ctxt)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlSchemaParserCtxtPtrWrap: ctxt = %p\n", ctxt);
#endif
if (ctxt == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
(char *) "xmlSchemaParserCtxtPtr", NULL);
return (ret);
}
PyObject *
libxml_xmlSchemaValidCtxtPtrWrap(xmlSchemaValidCtxtPtr valid)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlSchemaValidCtxtPtrWrap: valid = %p\n", valid);
#endif
if (valid == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) valid,
(char *) "xmlSchemaValidCtxtPtr", NULL);
return (ret);
}
#endif /* LIBXML_SCHEMAS_ENABLED */
PyObject *