Serhiy Storchaka <storchaka <at> gmail.com> writes: > But are you sure, that your code uses PyModule_AddObject() correctly? > Only two modules in the stdlib (_json and _tkinter) used it correctly. > Other modules have bugs even in tries to use PyModule_AddObject() > correctly for some operations. For the list, this is the extent of this horrible "bug": diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c --- a/Modules/_decimal/_decimal.c +++ b/Modules/_decimal/_decimal.c @@ -5804,8 +5804,7 @@ PyObject_CallObject((PyObject *)&PyDecContext_Type, NULL)); init_basic_context(basic_context_template); Py_INCREF(basic_context_template); - CHECK_INT(PyModule_AddObject(m, "BasicContext", - basic_context_template)); + CHECK_INT(-1); $ valgrind --suppressions=Misc/valgrind-python.supp ./python -c "import decimal" [...] ==16945== LEAK SUMMARY: ==16945== definitely lost: 0 bytes in 0 blocks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [...] Stefan Krah
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