Message207834
Thanks, Larry. Conversion proceeds apace in winreg.c, but I have a couple questions.
1) Since the comment above CConverter.format_unit says all custom converters should use 'O&' instead of defining format_unit, there must be another way to do this:
/*[python input]
class REGSAM_converter(CConverter):
type = 'REGSAM'
format_unit = 'i'
default = 0
def converter_init(self, *, key_name=""):
if key_name == "":
raise ValueError('must provide the key name')
self.doc_default = self.py_default = self.c_default = key_name
[python start generated code]*/
(see http://hg.python.org/sandbox/zware/rev/f0662bf33e65)
I don't know what the 'other way' is though :). The above works, but I don't understand it completely and thus don't like it. Also, it causes help(winreg.CreateKeyEx) to show "access='KEY_WRITE'" in the signature, when it should have no quotes (being a name).
2) Is there an easy way to give a function multiple names? OpenKey and OpenKeyEx are the same function, OpenKeyEx has been just defined by an extra methoddef pointing at OpenKey; for now I've just modified that line to make things work.
Neither of these is blocking progress, so not a huge deal other than getting a little bit of review done early. |
|
Date |
User |
Action |
Args |
2014-01-10 04:36:19 | zach.ware | set | recipients:
+ zach.ware, larry |
2014-01-10 04:36:19 | zach.ware | set | messageid: <1389328579.75.0.950165155963.issue20172@psf.upfronthosting.co.za> |
2014-01-10 04:36:19 | zach.ware | link | issue20172 messages |
2014-01-10 04:36:18 | zach.ware | create | |
|