[Image-SIG] patch request

hquan at purdue.edu hquan at purdue.edu
Wed Nov 2 04:36:47 CET 2011


Hi,

This may be a duplicated because I can't find previous email in archive.
I guess I found a bug in _image.c. CObject is already deprecated and
Capsules should be used. It seems in Python 3.2.2 CObject is removed.
The attachment is the diff file for this. Hope this is helpful. In case 
attachment is filtered out, I attach the diff file at the end.

Thanks,
Heran

===============
diff -r cd403356263f _imaging.c
--- a/_imaging.c    Tue Jun 28 11:51:48 2011 +0200
+++ b/_imaging.c    Sun Oct 30 00:14:28 2011 -0700
@@ -3083,7 +3083,7 @@
     if (strcmp(name, "id") == 0)
     return PyLong_FromLong((long) self->image);
     if (strcmp(name, "ptr") == 0)
-        return PyCObject_FromVoidPtrAndDesc(self->image, IMAGING_MAGIC, 
NULL);
+        return PyCapsule_New(self->image, IMAGING_MAGIC, NULL);

     return PyObject_GenericGetAttr((PyObject*) self, nameobj);
}
=============== 



More information about the Image-SIG mailing list