
Mikhail Sobolev wrote:
Hi Martijn
On Thu, Jun 16, 2005 at 08:33:05PM +0200, Martijn Faassen wrote:
I've attached the two patches. Apply the pyrex-0.9.2.1-gcc4.patch first (it does apply against 0.9.3 too), and then my gcc-4.0-hack.patch. I'd be happy to hear reports on whether this works for others!
I seem to not understand something... The ubuntu package has this patch. I'm lost...
It has the second patch as well? That's surprising as I just wrote it myself. :) In that case lxml should compile; it does on my box.. i.e. I mean this patch (the second one of the two I attached): --- Pyrex-0.9.3/Pyrex/Compiler/ExprNodes.py 2005-06-16 20:24:03.592791856 +0200 +++ Pyrex-0.9.3.patched/Pyrex/Compiler/ExprNodes.py 2005-06-16 20:23:45.027614192 +0200 @@ -1580,18 +1580,16 @@ return NameNode.is_ephemeral(self) def result_code(self): - return self.select_code()[0] + return self.select_code() def result_as_extension_type(self): return self.uncast_select_code() def select_code(self): - orig_code = self.uncast_select_code() + code = self.uncast_select_code() if self.type.is_extension_type: - code = "((PyObject *)%s)" % orig_code - else: - code = orig_code - return code, orig_code + code = "((PyObject *)%s)" % code + return code def uncast_select_code(self): obj_type = self.obj.type @@ -1644,13 +1642,13 @@ code.error_goto(self.pos))) rhs.generate_disposal_code(code) else: - select_code, orig_code = self.select_code() + select_code = self.select_code() if self.type.is_pyobject: rhs.make_owned_reference(code) code.put_decref(select_code, self.type) code.putln( "%s = %s;" % ( - orig_code, + select_code, rhs.result)) rhs.generate_post_assignment_code(code) self.obj.generate_disposal_code(code) Regards, Martijn