[Andrew Kuchling] > Four modules define insint() functions to insert an integer into a Five or macro > dictionary in order to initialize constants in their module > dictionaries: > > kronos Modules>grep -l insint *.c > pcremodule.c > shamodule.c > socketmodule.c > zlibmodule.c > kronos Modules> It's actually a macro in shamodule. Missing is _winreg.c (in the PC directory). The perils of duplication manifest in subtle differences among these guys (like _winreg's inserts a long while the others insert an int -- and _winreg is certainly more correct here because a Python int *is* a C long; and they differ in treatment of errors, and it's not at all clear that's intentional). > ... > This duplication bugs me. Shall I submit a patch to add an API > convenience function to do this, and change the modules to use it? > Suggested prototype and name: PyDict_InsertInteger( dict *, string, > long) +1, provided the treatment of errors is clearly documented.
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