diff options
author | Mike Hommey <glandium@debian.org> | 2006-04-29 21:57:40 +0200 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2006-04-29 21:57:40 +0200 |
commit | 07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e (patch) | |
tree | 7b377fd8e804a983cb2c57a43be1093ef179c5fd /python | |
parent | c5d565931c4823dc8f62fffcb65aecfec516f7b9 (diff) | |
download | libxml2-07a67fa4bcc1b8bf2651ab41e5fc54a05059cf7e.tar.gz |
Load /tmp/libxml2-2.6.24 intoupstream/2.6.24.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'python')
-rw-r--r-- | python/Makefile.in | 30 | ||||
-rw-r--r-- | python/libxml.c | 4 | ||||
-rw-r--r-- | python/libxml.py | 2 | ||||
-rw-r--r-- | python/libxml2-py.c | 38 | ||||
-rwxr-xr-x | python/setup.py | 2 | ||||
-rw-r--r-- | python/tests/Makefile.in | 4 | ||||
-rw-r--r-- | python/types.c | 8 |
7 files changed, 52 insertions, 36 deletions
diff --git a/python/Makefile.in b/python/Makefile.in index 36cac59..9451aaf 100644 --- a/python/Makefile.in +++ b/python/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.2 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,8 +14,6 @@ @SET_MAKE@ -SOURCES = $(libxml2mod_la_SOURCES) - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -70,11 +68,11 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link --tag=CC $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libxml2mod_la_SOURCES) DIST_SOURCES = $(am__libxml2mod_la_SOURCES_DIST) @@ -452,7 +450,13 @@ uninstall-info-am: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -464,7 +468,7 @@ $(RECURSIVE_TARGETS): local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ @@ -472,7 +476,13 @@ $(RECURSIVE_TARGETS): mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -493,7 +503,7 @@ maintainer-clean-recursive: local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ diff --git a/python/libxml.c b/python/libxml.c index ad8ac7c..88b29cf 100644 --- a/python/libxml.c +++ b/python/libxml.c @@ -2323,13 +2323,13 @@ static PyObject * libxml_properties(ATTRIBUTE_UNUSED PyObject * self, PyObject * args) { PyObject *resultobj, *obj; - xmlNodePtr cur = NULL; + xmlNodePtr cur; xmlAttrPtr res; if (!PyArg_ParseTuple(args, (char *) "O:properties", &obj)) return NULL; cur = PyxmlNode_Get(obj); - if (cur->type == XML_ELEMENT_NODE) + if ((cur != NULL) && (cur->type == XML_ELEMENT_NODE)) res = cur->properties; else res = NULL; diff --git a/python/libxml.py b/python/libxml.py index 0c2a19a..997e15f 100644 --- a/python/libxml.py +++ b/python/libxml.py @@ -212,7 +212,7 @@ class SAXCallback: def warning(self, msg): #print msg - pass + pass def error(self, msg): raise parserError(msg) diff --git a/python/libxml2-py.c b/python/libxml2-py.c index b5bf52f..19617ce 100644 --- a/python/libxml2-py.c +++ b/python/libxml2-py.c @@ -2292,7 +2292,6 @@ libxml_xmlEncodeEntitiesReentrant(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg return(py_retval); } -#if defined(LIBXML_TREE_ENABLED) PyObject * libxml_xmlRemoveProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -2309,7 +2308,6 @@ libxml_xmlRemoveProp(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { return(py_retval); } -#endif /* defined(LIBXML_TREE_ENABLED) */ #if defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) PyObject * libxml_xmlACatalogDump(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { @@ -6500,6 +6498,24 @@ libxml_xmlReaderForDoc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* defined(LIBXML_READER_ENABLED) */ +#if defined(LIBXML_SCHEMAS_ENABLED) +PyObject * +libxml_xmlRelaxNGParse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { + PyObject *py_retval; + xmlRelaxNGPtr c_retval; + xmlRelaxNGParserCtxtPtr ctxt; + PyObject *pyobj_ctxt; + + if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGParse", &pyobj_ctxt)) + return(NULL); + ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt); + + c_retval = xmlRelaxNGParse(ctxt); + py_retval = libxml_xmlRelaxNGPtrWrap((xmlRelaxNGPtr) c_retval); + return(py_retval); +} + +#endif /* defined(LIBXML_SCHEMAS_ENABLED) */ PyObject * libxml_xmlAddDocEntity(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; @@ -10872,24 +10888,6 @@ libxml_xmlSaveFormatFileEnc(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { } #endif /* defined(LIBXML_OUTPUT_ENABLED) */ -#if defined(LIBXML_SCHEMAS_ENABLED) -PyObject * -libxml_xmlRelaxNGParse(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { - PyObject *py_retval; - xmlRelaxNGPtr c_retval; - xmlRelaxNGParserCtxtPtr ctxt; - PyObject *pyobj_ctxt; - - if (!PyArg_ParseTuple(args, (char *)"O:xmlRelaxNGParse", &pyobj_ctxt)) - return(NULL); - ctxt = (xmlRelaxNGParserCtxtPtr) PyrelaxNgParserCtxt_Get(pyobj_ctxt); - - c_retval = xmlRelaxNGParse(ctxt); - py_retval = libxml_xmlRelaxNGPtrWrap((xmlRelaxNGPtr) c_retval); - return(py_retval); -} - -#endif /* defined(LIBXML_SCHEMAS_ENABLED) */ PyObject * libxml_xmlParseNmtoken(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { PyObject *py_retval; diff --git a/python/setup.py b/python/setup.py index a41ab3f..2b715c9 100755 --- a/python/setup.py +++ b/python/setup.py @@ -226,7 +226,7 @@ else: setup (name = "libxml2-python", # On *nix, the version number is created from setup.py.in # On windows, it is set by configure.js - version = "2.6.23", + version = "2.6.24", description = descr, author = "Daniel Veillard", author_email = "veillard@redhat.com", diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in index 60338e4..5b84cc2 100644 --- a/python/tests/Makefile.in +++ b/python/tests/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.2 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. +# 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/python/types.c b/python/types.c index 329d270..8a6a9a0 100644 --- a/python/types.c +++ b/python/types.c @@ -398,7 +398,9 @@ libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj) case XPATH_RANGE: case XPATH_LOCATIONSET: default: +#ifdef DEBUG printf("Unable to convert XPath object type %d\n", obj->type); +#endif Py_INCREF(Py_None); ret = Py_None; } @@ -443,7 +445,9 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj) cur = NULL; if (PyCObject_Check(node)) { +#ifdef DEBUG printf("Got a CObject\n"); +#endif cur = PyxmlNode_Get(node); } else if (PyInstance_Check(node)) { PyInstanceObject *inst = (PyInstanceObject *) node; @@ -463,7 +467,9 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj) } } } else { +#ifdef DEBUG printf("Unknown object in Python return list\n"); +#endif } if (cur != NULL) { xmlXPathNodeSetAdd(set, cur); @@ -471,7 +477,9 @@ libxml_xmlXPathObjectPtrConvert(PyObject * obj) } ret = xmlXPathWrapNodeSet(set); } else { +#ifdef DEBUG printf("Unable to convert Python Object to XPath"); +#endif } Py_DECREF(obj); return (ret); |