summaryrefslogtreecommitdiff
path: root/python/libxml2-py.c
diff options
context:
space:
mode:
Diffstat (limited to 'python/libxml2-py.c')
-rw-r--r--python/libxml2-py.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/python/libxml2-py.c b/python/libxml2-py.c
index e0559a0..853a894 100644
--- a/python/libxml2-py.c
+++ b/python/libxml2-py.c
@@ -2412,6 +2412,20 @@ libxml_xmlSaveFormatFile(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
#endif /* defined(LIBXML_OUTPUT_ENABLED) */
PyObject *
+libxml_xmlPathToURI(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
+ PyObject *py_retval;
+ xmlChar * c_retval;
+ xmlChar * path;
+
+ if (!PyArg_ParseTuple(args, (char *)"z:xmlPathToURI", &path))
+ return(NULL);
+
+ c_retval = xmlPathToURI(path);
+ py_retval = libxml_xmlCharPtrWrap((xmlChar *) c_retval);
+ return(py_retval);
+}
+
+PyObject *
libxml_xmlParseXMLDecl(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
xmlParserCtxtPtr ctxt;
PyObject *pyobj_ctxt;
@@ -2535,7 +2549,7 @@ libxml_xmlXPathOrderDocElems(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
doc = (xmlDocPtr) PyxmlNode_Get(pyobj_doc);
c_retval = xmlXPathOrderDocElems(doc);
- py_retval = libxml_intWrap((int) c_retval);
+ py_retval = libxml_longWrap((long) c_retval);
return(py_retval);
}
@@ -4253,7 +4267,7 @@ libxml_xmlByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
c_retval = xmlByteConsumed(ctxt);
- py_retval = libxml_intWrap((int) c_retval);
+ py_retval = libxml_longWrap((long) c_retval);
return(py_retval);
}
@@ -7001,7 +7015,7 @@ libxml_xmlClearParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return(Py_None);
}
-#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED)
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
PyObject *
libxml_xmlValidateNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
@@ -7017,7 +7031,7 @@ libxml_xmlValidateNCName(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return(py_retval);
}
-#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) */
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) */
PyObject *
libxml_xmlStrlen(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
@@ -7365,7 +7379,7 @@ libxml_xmlTextReaderByteConsumed(PyObject *self ATTRIBUTE_UNUSED, PyObject *args
reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
c_retval = xmlTextReaderByteConsumed(reader);
- py_retval = libxml_intWrap((int) c_retval);
+ py_retval = libxml_longWrap((long) c_retval);
return(py_retval);
}
@@ -10291,6 +10305,18 @@ libxml_xmlXPtrNewRangeNodes(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
}
#endif /* defined(LIBXML_XPTR_ENABLED) */
+#if defined(LIBXML_HTML_ENABLED)
+PyObject *
+libxml_htmlNewParserCtxt(PyObject *self ATTRIBUTE_UNUSED, PyObject *args ATTRIBUTE_UNUSED) {
+ PyObject *py_retval;
+ htmlParserCtxtPtr c_retval;
+
+ c_retval = htmlNewParserCtxt();
+ py_retval = libxml_xmlParserCtxtPtrWrap((xmlParserCtxtPtr) c_retval);
+ return(py_retval);
+}
+
+#endif /* defined(LIBXML_HTML_ENABLED) */
PyObject *
libxml_xmlStringDecodeEntities(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
@@ -14082,7 +14108,7 @@ libxml_xmlGetLineNo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
node = (xmlNodePtr) PyxmlNode_Get(pyobj_node);
c_retval = xmlGetLineNo(node);
- py_retval = libxml_intWrap((int) c_retval);
+ py_retval = libxml_longWrap((long) c_retval);
return(py_retval);
}