[Python-Dev] Issue #23903 - stable API is incomplete
steve.dower at python.org
Wed Dec 21 10:41:17 EST 2016
"Ok, now why should _Py_PrintReferences() function be exported?"
It probably shouldn't, but it needs an #ifndef Py_LIMITED_API check so it is excluded from the headers (my list was automatically generated).
And ideally, private functions that are deliberately exported would have comments, or if they're new, a version check on Py_LIMITED_API.
Top-posted from my Windows Phone
From: "Victor Stinner" <victor.stinner at gmail.com>
Sent: 12/21/2016 6:25
To: "Serhiy Storchaka" <storchaka at gmail.com>
Cc: "Python Dev" <python-dev at python.org>
Subject: Re: [Python-Dev] Issue #23903 - stable API is incomplete
2016-12-21 14:06 GMT+01:00 Serhiy Storchaka <storchaka at gmail.com>:
>> These functions are private. Would it be possible to not export them?
> Private functions used in public macros (like _Py_NewReference) should be
Ah, _Py_NewReference is used in the PyObject_INIT(op, typeobj) *macro*, right.
IMO it's an issue with our public API: for the stable ABI, we should
replace such macro with a function which hides implementation details.
Example from pystate.h:
# define PyThreadState_GET() \
# define PyThreadState_GET() PyThreadState_Get()
Ok, now why should _Py_PrintReferences() function be exported? This
private function is only called from Py_FinalizeEx(). It is not used
in a macro.
Python-Dev mailing list
Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev