[Lxml-checkins] r47891 - lxml/trunk/src/lxml

scoder at codespeak.net scoder at codespeak.net
Thu Oct 25 10:04:58 CEST 2007


Author: scoder
Date: Thu Oct 25 10:04:57 2007
New Revision: 47891

Modified:
   lxml/trunk/src/lxml/proxy.pxi
Log:
prevent exceptions from being dropped

Modified: lxml/trunk/src/lxml/proxy.pxi
==============================================================================
--- lxml/trunk/src/lxml/proxy.pxi	(original)
+++ lxml/trunk/src/lxml/proxy.pxi	Thu Oct 25 10:04:57 2007
@@ -181,7 +181,7 @@
             c_new_ns = c_new_ns.next
         c_parent = c_parent.parent
 
-cdef void moveNodeToDocument(_Document doc, xmlNode* c_element):
+cdef int moveNodeToDocument(_Document doc, xmlNode* c_element) except -1:
     """Fix the xmlNs pointers of a node and its subtree that were moved.
 
     Mainly copied from libxml2's xmlReconciliateNs().  Expects libxml2 doc
@@ -200,7 +200,7 @@
     cdef cstd.size_t i, c_cache_size, c_cache_last
 
     if not tree._isElementOrXInclude(c_element):
-        return
+        return 0
 
     c_doc = c_element.doc
     c_start_node = c_element
@@ -347,3 +347,5 @@
         python.PyMem_Free(c_ns_new_cache)
     if c_ns_old_cache is not NULL:
         python.PyMem_Free(c_ns_old_cache)
+
+    return 0


More information about the lxml-checkins mailing list