Commit Graph

35 Commits

Author SHA1 Message Date
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
06e7216f51 Add support for PyCapsule bindings
Part of S821-014
Part of T519-009

Change-Id: Ib05d2f9cb673eeef32ebb5ac82356f7423682bee
2020-05-25 17:29:29 +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
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
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
Joel Brobecker
d658e6f9f4 Fix minimum Python version in python3/ subdirectory
Change-Id: Idbf2bbd5c1095acf2f93c5619c29ee3ae9b40e41
TN: S821-014
2020-05-13 09:15:48 -07:00
Joel Brobecker
3c0738d979 replace "Import" aspects with simple pragma "Import".
This is to keep things consistent throughout the Python binding.
Eventually, we should switch imports to aspects, which are more
modern Ada, but this should be done for all imports at the same
time, to maintain consistency.

Change-Id: Id413db8e434a9e0e966773c2bf4e9429bd8a45f0
2020-02-14 19:32:52 +04: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