On Sat, Jul 01, 2000 at 11:23:21PM +1000, Mark Hammond wrote: > > While I'm very glad that I suggested PyLong_FromVoidPtr() for issues like > > this, I think that returning an HKEY should probably use a PyCObject. You > > will then be able to supply a "free" function that can close the HKEY. > > This is exactly what we do. Trents patches are just for the functions that > return the underlying handle value as an integer (which is definately a > useful thing to be able to do!) But I don't understand why you want an integer. From the Python programmer's standpoint, they just want a handle, right? The safety of having the "free" function is quite nice. Without it, it would seem to be "easy" to leak handles. Without using PyCObject, we'd need a complete handle type (like the one in win32api or wherever). Cheers, -g -- Greg Stein, http://www.lyra.org/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4