4 Commits

Author SHA1 Message Date
Adrien Boulanger
fc63e2906b U201-012: Ensure frame state when calling python function.
Most of the commands can only be called if we have the GIL:
retrieve it.
Add a controlled type to automatically retrieve/free the GIL.
Lock every call using Py_INCREF/Py_DECREF.

Change-Id: I8989fcb3eacf6aedbb90056469536144a2795a3f
2021-02-25 11:17:13 +01:00
Nicolas Roche
8796288dae Fix style issues
Part of S821-014

Change-Id: If7ffaa320df0922afe50067c116de1d265d34f55
2020-05-27 07:00:24 +00:00
Nicolas Roche
955181d8af Move Py_Initialize and Py_Finalize to GNATCOLL.Python.Lifecycle
Part of S821-014

Change-Id: I5c62565f7af598a692d96a560d7482d349ebd4ee
2020-05-25 12:29:19 +00:00
Nicolas Roche
e259adfecb Fix issue with binding of the interpreter lifecycle functions
* Py_SetProgramName expect a *wchar_t
* Py_SetPythonhome expect a *wchar_t
* Py_Main except decoded arguments as  *wchar_t
* Expose function Py_DecodeLocale

Part of T518-013

Change-Id: I3ad1df239203ecf70e5de7dfe78aed202cd21666
2020-05-22 16:05:10 +00:00