Enlightenment CVS committal

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

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


Modified Files:
        emotion.c_emotion.pyx 


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-emotion/emotion/emotion.c_emotion.pyx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- emotion.c_emotion.pyx       7 Aug 2008 03:13:11 -0000       1.10
+++ emotion.c_emotion.pyx       10 Aug 2008 14:59:12 -0000      1.11
@@ -81,10 +81,10 @@
     def __repr__(self):
         x, y, w, h = self.geometry_get()
         r, g, b, a = self.color_get()
-        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, "
                 "file=%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(), self.file_get(), x, y, w, h, r, g, b, a,
                 self.layer_get(), self.clip_get(), 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