This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients larry, zach.ware
Date 2014-01-27.18:30:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390847418.07.0.605398644696.issue20410@psf.upfronthosting.co.za>
In-reply-to
Content
It would be nice to have a 'self' return converter for simple functions like winreg.HKEYType.__enter__ (which is implemented as "Py_XINCREF(self); return self;").  With the typedef and type_object specifications now required for the class directive, 'self' is passed to that function as a PyHKEYObject *, but impl is expected to return a PyObject *.

In this particular instance, I can solve the problem (which is a compiler warning) with a custom self_return_converter that casts _return_value to PyObject *.  I think a generic solution would be better in the long run and useful in more places, though.
History
Date User Action Args
2014-01-27 18:30:18zach.waresetrecipients: + zach.ware, larry
2014-01-27 18:30:18zach.waresetmessageid: <1390847418.07.0.605398644696.issue20410@psf.upfronthosting.co.za>
2014-01-27 18:30:18zach.warelinkissue20410 messages
2014-01-27 18:30:17zach.warecreate