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

scoder at codespeak.net scoder at codespeak.net
Sat Oct 20 14:50:20 CEST 2007


Author: scoder
Date: Sat Oct 20 14:50:19 2007
New Revision: 47638

Modified:
   lxml/trunk/src/lxml/etree.pyx
   lxml/trunk/src/lxml/objectify.pyx
Log:
fix error handling on PyList_Append()

Modified: lxml/trunk/src/lxml/etree.pyx
==============================================================================
--- lxml/trunk/src/lxml/etree.pyx	(original)
+++ lxml/trunk/src/lxml/etree.pyx	Sat Oct 20 14:50:19 2007
@@ -845,10 +845,8 @@
         result = []
         while c_node is not NULL and c < stop:
             if _isElement(c_node):
-                ret = python.PyList_Append(
+                python.PyList_Append(
                     result, _elementFactory(self._doc, c_node))
-                if ret:
-                    raise
                 c = c + 1
             c_node = c_node.next
         return result
@@ -992,15 +990,12 @@
         code should use ``list(element)`` or simply iterate over elements.
         """
         cdef xmlNode* c_node
-        cdef int ret
         result = []
         c_node = self._c_node.children
         while c_node is not NULL:
             if _isElement(c_node):
-                ret = python.PyList_Append(
+                python.PyList_Append(
                     result, _elementFactory(self._doc, c_node))
-                if ret:
-                    raise
             c_node = c_node.next
         return result
 

Modified: lxml/trunk/src/lxml/objectify.pyx
==============================================================================
--- lxml/trunk/src/lxml/objectify.pyx	(original)
+++ lxml/trunk/src/lxml/objectify.pyx	Sat Oct 20 14:50:19 2007
@@ -193,15 +193,12 @@
         returned in document order.
         """
         cdef tree.xmlNode* c_node
-        cdef int ret
         result = []
         c_node = self._c_node.children
         while c_node is not NULL:
             if tree._isElement(c_node):
-                ret = python.PyList_Append(
+                python.PyList_Append(
                     result, cetree.elementFactory(self._doc, c_node))
-                if ret:
-                    raise
             c_node = c_node.next
         return result
 


More information about the lxml-checkins mailing list