Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : proto/python-efl

Dir     : e17/proto/python-efl/python-evas/evas


Modified Files:
        evas.c_evas_canvas.pxi evas.c_evas_object.pxi 


Log Message:
Fix way to get the address of python objects.

Cython changed the way casts are interpreted some time ago and
<unsigned long>object is not valid anymore because it would check for
an integer-capable object (ie: __init__()).

Instead we must make it a void pointer (<void *>object) and then cast
this to the integer type.


===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/evas/evas.c_evas_canvas.pxi,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- evas.c_evas_canvas.pxi      7 Aug 2008 03:13:12 -0000       1.18
+++ evas.c_evas_canvas.pxi      10 Aug 2008 14:59:12 -0000      1.19
@@ -106,9 +106,9 @@
 
     def __repr__(self):
         w, h = self.size_get()
-        return ("%s(0x%x, refcount=%d, Evas_Object=0x%x, size=(%d, %d), "
+        return ("%s(%#x, refcount=%d, Evas_Object=%#x, size=(%d, %d), "
                 "method=%r)") % \
-               (self.__class__.__name__, <unsigned long>self,
+               (self.__class__.__name__, <unsigned long><void *>self,
                 PY_REFCOUNT(self), <unsigned long>self.obj,
                 w, h, self.output_method_get())
 
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/evas/evas.c_evas_object.pxi,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- evas.c_evas_object.pxi      7 Aug 2008 03:13:12 -0000       1.26
+++ evas.c_evas_object.pxi      10 Aug 2008 14:59:12 -0000      1.27
@@ -246,10 +246,10 @@
         x, y, w, h = self.geometry_get()
         r, g, b, a = self.color_get()
         clip = bool(self.clip_get() is not None)
-        return ("%s(0x%x, type=%r, refcount=%d, Evas_Object=0x%x, name=%r, "
+        return ("%s(%#x, type=%r, refcount=%d, Evas_Object=%#x, name=%r, "
                 "geometry=(%d, %d, %d, %d), color=(%d, %d, %d, %d), "
                 "layer=%s, clip=%r, visible=%s)") % \
-               (self.__class__.__name__, <unsigned long>self,
+               (self.__class__.__name__, <unsigned long><void *>self,
                 self.type_get(), PY_REFCOUNT(self), <unsigned long>self.obj,
                 self.name_get(), x, y, w, h, r, g, b, a, self.layer_get(),
                 clip, self.visible_get())



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to