patch request

Heran Quan <[email protected]> Sun, 30 Oct 2011 00:17:03 -0700
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Hi all,

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.

Thanks,
Heran

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
pil.diff (text/x-patch, 479 B)
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);
 }