Commit Graph

7 Commits

Author SHA1 Message Date
Nicolas Roche
af397296fd Move declaration of python thread related bindings under GNATCOLL.Python
* Move PyEval_SaveThread to GNATCOLL.Python.Eval
* Move PyEval_RestoreThread to GNATCOLL.Python.Eval
* Move PyThreadState to GNATCOLL.Python
* Remove binding to PyEval_InitThreads (not needed since 3.7)
* Remove Has_Thread_Support (we assume python 3 always have thread
support)

Part of S821-014

Change-Id: I037b19be518a36600663df20d34f233c91bc4139
2020-05-27 07:00:24 +00:00
Nicolas Roche
d17cadce7f Move PyErr_Occured to GNATCOLL.Python.Errors
Part of S821-014

Change-Id: Ibff41518354899137b19782803247dce39654614
2020-05-27 07:00:24 +00:00
Nicolas Roche
74d32011ca Renames GetTypeObject into Py_TYPE.
This ensures function name maps to C API.
Also renames Dummy type into PyObject_Opaque as the type will be
used in other units.

Part of S821-014

Change-Id: I14a2d05897480c4dbfb3f04a2fe45567d2385a7b
2020-05-25 12:33:38 +00:00
Nicolas Roche
092c3262db Fix issue with Initialize_Py_And_Module.
Replace wrong cast from char* to wchar_t* by Py_DecodeLocale call

Part of S821-014

Change-Id: I574c93587640284c78b0bd04bc0b3c082441186b
2020-05-25 12:29:19 +00:00
Nicolas Roche
0c7be0a295 Remove reference to Python 2.x in python3/python_support.c
Part of S821-014
Change-Id: Ifc5e6a65f5802455a3c23e61c9b75cdba20c23f6
2020-05-25 07:39:02 +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
Nicolas Roche
4981602c6d Split support for Python 3.x and Python 2.x
Part of S821-014

Change-Id: I17a26eb45043f7fe48b5b33db57425abe8cd9b78
2020-02-07 10:26:11 +01:00