A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-April/144360.html below:

[Python-Dev] Inconsistency of PyModule_AddObject()

[Python-Dev] Inconsistency of PyModule_AddObject() [Python-Dev] Inconsistency of PyModule_AddObject()Berker Peksağ berker.peksag at gmail.com
Wed Apr 27 06:00:29 EDT 2016
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
More information about the Python-Dev mailing list

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