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. Cheers, -g On Fri, Jun 30, 2000 at 10:48:54AM -0700, Fred L. Drake wrote: > Update of /cvsroot/python/python/dist/src/PC > In directory slayer.i.sourceforge.net:/tmp/cvs-serv11047/PC > > Modified Files: > msvcrtmodule.c _winreg.c > Log Message: > [*** Not tested as I don't have Windows running right now! ***] > > Trent Mick <trentm@activestate.com>: > > Fix PC/msvcrtmodule.c and PC/winreg.c for Win64. Basically: > > - sizeof(HKEY) > sizeof(long) on Win64, so use PyLong_FromVoidPtr() > instead of PyInt_FromLong() to return HKEY values on Win64 > > - Check for string overflow of an arbitrary registry value (I know > that ensuring that a registry value does not overflow 2**31 characters > seems ridiculous but it is *possible*). > > Closes SourceForge patch #100517. >... -- 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