Author markgrandi
Recipients markgrandi, steve.dower, tim.golden, zach.ware
Date 2014-12-10.20:13:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418242433.97.0.849861872047.issue23026@psf.upfronthosting.co.za>
In-reply-to
Content
The winreg module has constants for the different Windows registry types: https://docs.python.org/3/library/winreg.html?highlight=winreg#value-types

It also links to the Microsoft documentation on the registry types, and I noticed that python doesn't have constants for 2 of the types (really just 1), REG_QWORD and REG_QWORD_LITTLE_ENDIAN (same as REG_QWORD).

So I added the constants in winreg.c, which I think is right, as its the same format as the other ones, and I edited the documentation inside of winreg.c, which is the same changes i made to the docs in winreg.rst, except it doesn't have the markdown/rst/whatever formatting markers. I also made notes on REG_DWORD_LITTLE_ENDIAN that it is equivalent to REG_DWORD.

I also tested to make sure that the documentation builds fine, but I haven't tested building python with the winreg.c changes, as I don't have access to a windows computer that can compile it at the moment. 

Some concerns: 

1: I have no idea if REG_QWORD is defined on 32 bit windows, I would assume it would be, but I can't check at the moment. 

2: There should probably be some switch statement entries in the Reg2Py() and Py2Reg() functions that deal with QWORDs, and dealing with if the python build is 32 bit vs 64 bit. I'm not comfortable with the python C internals to do that myself.

My initial patch is attached, with the documentation + changes to winreg.c that just add the constants to the module
History
Date User Action Args
2014-12-10 20:13:54markgrandisetrecipients: + markgrandi, tim.golden, zach.ware, steve.dower
2014-12-10 20:13:53markgrandisetmessageid: <1418242433.97.0.849861872047.issue23026@psf.upfronthosting.co.za>
2014-12-10 20:13:53markgrandilinkissue23026 messages
2014-12-10 20:13:53markgrandicreate