mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Activate Python "Limited API" in PL/Python
This allows building PL/Python against any Python 3.x version and using another Python 3.x version at run time. This is useful for installers that want to run against a separately downloaded Python, so that they don't have to bundle it themselves. This builds on the earlier patch to only use APIs supported by the Limited API. At the moment, this is not activated on MSVC because that leads to build failures that no one could explain or cared enough to address. This could be done later. Reviewed-by: Jakob Egger <jakob@eggerapps.at> Discussion: https://www.postgresql.org/message-id/flat/ee410de1-1e0b-4770-b125-eeefd4726a24@eisentraut.org
This commit is contained in:
@ -19,6 +19,15 @@
|
|||||||
#error Python.h must be included via plpython.h
|
#error Python.h must be included via plpython.h
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enable Python Limited API
|
||||||
|
*
|
||||||
|
* XXX currently not enabled on MSVC because of build failures
|
||||||
|
*/
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
|
#define Py_LIMITED_API 0x03020000
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pull in Python headers via a wrapper header, to control the scope of
|
* Pull in Python headers via a wrapper header, to control the scope of
|
||||||
* the system_header pragma therein.
|
* the system_header pragma therein.
|
||||||
|
Reference in New Issue
Block a user