Add linkage and implementation sections.
This commit is contained in:
parent
4c23af68bd
commit
51d054cafb
33
pep-0384.txt
33
pep-0384.txt
|
@ -238,6 +238,39 @@ In addition, the following macros are available:
|
||||||
- Py_BEGIN_ALLOW_THREADS, Py_BLOCK_THREADS, Py_UNBLOCK_THREADS,
|
- Py_BEGIN_ALLOW_THREADS, Py_BLOCK_THREADS, Py_UNBLOCK_THREADS,
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
|
|
||||||
|
Linkage
|
||||||
|
-------
|
||||||
|
|
||||||
|
On Windows, applications shall link with python3.dll; an import
|
||||||
|
library python3.lib will be available. This DLL will redirect all of
|
||||||
|
its API functions through /export linker options to the full
|
||||||
|
interpreter DLL, i.e. python3y.dll.
|
||||||
|
|
||||||
|
XXX is it possible to redirect global variables in the same way?
|
||||||
|
If not, python3.dll would have to copy them, and we should verify
|
||||||
|
that all available global variables are read-only.
|
||||||
|
|
||||||
|
On Unix systems, the ABI is typically provided by the python
|
||||||
|
executable itself. PyModule_Create is changed to pass ``3`` as the API
|
||||||
|
version if the extension module was compiled with Py_LIMITED_API; the
|
||||||
|
version check for the API version will accept either 3 or the current
|
||||||
|
PYTHON_API_VERSION as conforming. If Python is compiled as a shared
|
||||||
|
library, it is installed as both libpython3.so, and libpython3.y.so;
|
||||||
|
applications conforming to this PEP should then link to the former.
|
||||||
|
|
||||||
|
XXX is it possible to make the soname libpython.so.3, and still
|
||||||
|
have some applications link to libpython3.y.so?
|
||||||
|
|
||||||
|
Implementation Strategy
|
||||||
|
=======================
|
||||||
|
|
||||||
|
This PEP will be implemented in a branch, allowing users to check
|
||||||
|
whether their modules conform to the ABI. To simplify this testing, an
|
||||||
|
additional macro Py_LIMITED_API_WITH_TYPES will expose the existing
|
||||||
|
type object layout, to let users postpone rewriting all types. When
|
||||||
|
the this branch is merged into the 3.2 code base, this macro will
|
||||||
|
be removed.
|
||||||
|
|
||||||
Copyright
|
Copyright
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue