tags 298084 +patch
thanks

The attached patch solves the problem with the dbus compilation with gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/pyrex-0.9.3/Pyrex/Compiler/Code.py 
./Pyrex/Compiler/Code.py
--- ../tmp-orig/pyrex-0.9.3/Pyrex/Compiler/Code.py      2003-07-08 
10:31:27.000000000 +0200
+++ ./Pyrex/Compiler/Code.py    2005-03-04 18:54:10.974097796 +0100
@@ -224,7 +224,7 @@
     def put_init_var_to_py_none(self, entry, template = "%s"):
         code = template % entry.cname
         if entry.type.is_extension_type:
-            code = "((PyObject*)%s)" % code
+            code = "(%s)" % code
         self.put_init_to_py_none(code)
 
     def put_pymethoddef(self, entry, term):
diff -urN ../tmp-orig/pyrex-0.9.3/Pyrex/Compiler/ExprNodes.py 
./Pyrex/Compiler/ExprNodes.py
--- ../tmp-orig/pyrex-0.9.3/Pyrex/Compiler/ExprNodes.py 2004-05-01 
12:15:07.000000000 +0200
+++ ./Pyrex/Compiler/ExprNodes.py       2005-03-04 18:54:10.975097603 +0100
@@ -735,7 +735,7 @@
         result = self.entry.cname
         if self.type.is_extension_type and \
             not self.entry.is_declared_generic:
-                result = "((PyObject *)%s)" % result
+                result = "(%s)" % result
         return result
     
     def result_as_extension_type(self):
@@ -1279,7 +1279,7 @@
         result = "%s(%s)" % (self.function.result,
             join(arg_list_code, ","))
         if self.type.is_extension_type and not as_extension_type:
-            result = "((PyObject *)%s)" % result
+            result = "(%s)" % result
         return result
     
     def generate_result_code(self, code):
diff -urN ../tmp-orig/pyrex-0.9.3/Pyrex/Compiler/Nodes.py 
./Pyrex/Compiler/Nodes.py
--- ../tmp-orig/pyrex-0.9.3/Pyrex/Compiler/Nodes.py     2004-07-11 
09:26:29.000000000 +0200
+++ ./Pyrex/Compiler/Nodes.py   2005-03-04 18:57:39.798790778 +0100
@@ -484,8 +484,7 @@
         self.generate_self_cast(scope, code)
         type = scope.parent_type
         if type.vtabslot_cname:
-            code.putln("(struct %s *)p->%s = %s;" % (
-                type.vtabstruct_cname,
+            code.putln("p->%s = %s;" % (
                 type.vtabslot_cname,
                 type.vtabptr_cname))
         for entry in scope.var_entries:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to