patch request

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

patch request

Heran Quan

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.


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,
+        return PyCapsule_New(self->image, IMAGING_MAGIC, NULL);

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

Image-SIG maillist  -  [hidden email]