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

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


Author: scoder
Date: Sat Oct 20 14:53:53 2007
New Revision: 47640

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

Modified: lxml/trunk/src/lxml/pyclasslookup.pyx
==============================================================================
--- lxml/trunk/src/lxml/pyclasslookup.pyx	(original)
+++ lxml/trunk/src/lxml/pyclasslookup.pyx	Sat Oct 20 14:53:53 2007
@@ -103,10 +103,8 @@
         result = []
         while c_node is not NULL and c < stop:
             if tree._isElement(c_node):
-                ret = python.PyList_Append(
+                python.PyList_Append(
                     result, _newProxy(self._source_proxy, c_node))
-                if ret:
-                    raise
                 c = c + 1
             c_node = c_node.next
         return result
@@ -163,16 +161,13 @@
         order.
         """
         cdef tree.xmlNode* c_node
-        cdef int ret
         self._assertNode()
         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, _newProxy(self._source_proxy, c_node))
-                if ret:
-                    raise
             c_node = c_node.next
         return result
 


More information about the lxml-checkins mailing list