From 51d054cafba56d9e6e45c607d1b3ab3330713e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sun, 17 May 2009 19:14:52 +0000 Subject: [PATCH] Add linkage and implementation sections. --- pep-0384.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/pep-0384.txt b/pep-0384.txt index 1e0c412b7..193f821d1 100644 --- a/pep-0384.txt +++ b/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_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 =========