On Wed, Apr 27, 2016 at 10:14 AM, Serhiy Storchaka <storchaka at gmail.com> wrote: > I think that we can resolve this issue by following steps: > > 1. Add a new function PyModule_AddObject2(), that steals a reference even on > failure. +1 It would be good to document PyModule_AddObject's current behavior in 3.5+ (already attached a patch). > 2. Introduce a special macro like PY_SSIZE_T_CLEAN (any suggestions about a > name?). If it is defined, define PyModule_AddObject as PyModule_AddObject2. > Define this macro before including Python.h in all CPython modules except > _json, _io, and _tkinter. +1 > 3. Make old PyModule_AddObject to emit a warning about possible leak and a > suggestion to define above macro. +0
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