Commit Graph

2852 Commits

Author SHA1 Message Date
Nicolas Boulenguez
b3961ba4f5 readline: move Linker_Options from Ada source to project
This is consistent with other components.
2021-04-05 15:57:58 +02:00
Nicolas Boulenguez
aeea734354 Use ADAFLAGS CFLAGS CPPFLAGS LDFLAGS if they exist in the environment 2021-04-05 15:56:56 +02:00
Nicolas Boulenguez
1adbba0a53 python.gpr: compute one External_As_List instead of many Split.
This is more efficient and readable.
2021-04-05 15:55:44 +02:00
Nicolas Boulenguez
53d37d3ed4 Removed unused OS_Kind external variable.
The related part of setup.py is still required by the imported
gnatcoll.gpr.
2021-04-05 15:55:13 +02:00
Nicolas Boulenguez
bd6661cae4 In library projects, only set version in the relocatable case 2021-04-05 15:54:31 +02:00
Nicolas Boulenguez
92da3a0af8 Explicitly mark projects with the library qualifier 2021-04-05 15:46:19 +02:00
Dmitriy Anisimkov
335f34c0d2 Fix compilation issue in debug mode
no-tn-check

Add Unreferenced mark to unreferenced but necessary variable.

Change-Id: Ia27e62b67544a9ee78f0f7a2276771476a6e62b5
2021-03-23 16:51:44 +01:00
Adrien Boulanger
7a272ebf03 U305-023: Defensive code for the GIL
Trying to ensure/release the GIL when there is no interpreter will
raise an exception.

Change-Id: I4f85bfbfdd799b906848d2038b52825c4c709e54
2021-03-19 12:34:13 +01:00
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
Vadim Godunko
f83e315dfb T109-039 Protect calls to Python C API.
Change-Id: I96bd6fb7a4c7c5340b5c0f8d82ecb34ff682540e
2021-02-23 11:04:09 +03:00
Adrien Boulanger
45aaa42efc TC15-079: Remove forbidden flags METH_OLDARGS
METH_OLDARGS (0x0, i.e. no flag) was obsolete in python2
and is forbidden with python3.

(no-precommit-check)
Change-Id: I576042492d74ca69bd59ed6ea6264cb7562c650f
2021-02-12 11:18:02 +01:00
Adrien Boulanger
1b4bf35ad9 TC21-029: Fix PyAdaMethodDescrObject function call
The cfunc is stored inside the descriptor when doing:

f = Foo()
f.bar() => cfunc is retrieved via tp_descr_get
Foo.bar(f) => cfunc is retrieved via tp_call

Without defining tp_call it will try to call a
wrapping function without the proper flags.

Change-Id: I164492895cee66dd4d9946b505c6866c2fea768a
2021-02-12 11:14:20 +01:00
Dimitri Kokkonis
d0e71781e5 Migrate to Sphinx 3.2 and Python 3. T421-010
Change-Id: I96620da19b01be4b8a63de05ac4be8c6cb6a63c4
2020-12-08 16:28:28 +01:00
Dmitriy Anisimkov
00bef12c97 Detect ZLib inflate of truncated data
TC01-031

Change-Id: I2a071ba3f7ab05554a7646be424f4eabcadb025b
2020-12-04 23:47:29 +06:00
t-14
6436f54d03 List new components. no-tn-check
Change-Id: I18c6f3627095c64844a347c2bb328dd3a07e57da
2020-11-20 01:11:19 +01:00
Nicolas Setton
911e57fe44 TB10-016 do not link with the python .la in shared mode
Refinement on the previous change: do not pass the Python
static library to the linker if we are in the mode where
we are using the Python shared library.

Change-Id: I05a19d0f69a492106d04e612f299ea32ceeae1ea
2020-11-19 09:41:04 +00:00
Nicolas Setton
6e9769eb5a TB10-016 Make gnatcoll_python.gpr relocatable
Add a project variable to indicate the path to the libpython*.la,
and use this variable to find this when building.

Copy the .la file to the installation destination,
and use the variable to make sure the project generated by gprinstall
finds it.

Change-Id: Ic145f14339091ecb3bf6f10af14916de9fa176d4
2020-11-18 15:55:55 +00:00
Dmitriy Anisimkov
25459f07a2 Detect error when input data to inflate is zero length
TA13-028

Do not ignore Z_BUF_ERROR if no data on input.

Change-Id: I5741792e76e1ad115ff7f4b9c328b1074cebec57
2020-10-16 17:18:35 +06:00
Fabien Chouteau
c8425159d5 gnatcoll_*.gpr: rename external GNATCOLL_BUILD into GNATCOLL_BUILD_MODE
To avoid conflict with installed gnatcoll.gpr where GNATCOLL_BUILD means
library type.

Part of S709-037.

Change-Id: I5a0164505bee8e4a93409615e7a9d3b9a85c02f3
2020-09-10 18:41:55 +02:00
Fabien Chouteau
5262835c42 gnatcoll_*.gpr: introduce the GNATCOLL_BUILD external
Like for gnatcoll_core, these externals allow gnatcoll_*.gpr to be used
from a project that defines the BUILD external in an incompatible way.

Part of S709-037.

Change-Id: I409695393fb40d301e280a3f5ac7018e9d7bc81b
2020-08-25 16:07:04 +02:00
Fabien Chouteau
c2aeae9411 gnatcoll_{gmp|lzma|omp|readline|zlib}.gpr: unifiy default value for BUILD
Part of T717-016

Change-Id: I58296daba70577764d87a5ef2cef7aaca184cca0
2020-08-06 11:59:56 +02:00
Fabien Chouteau
3db68c45ea gnatcoll.gpr_{gmp|iconv|omp|readline|syslog}: set default LIBRARY_TYPE
Part of T717-016

Change-Id: I1c259b5e85e9c94214d970603c57ab5bf7510540
2020-08-06 11:58:40 +02:00
Adrien Boulanger
39e71d520d T416-023: Fix test
The test is creating a hidden property which can't be accessed
by at the python level => thus the last check is always wrong:
remove it.

Change-Id: I5dc8eff713e2e55cfcf97c5758a0fc6c463f69a2
2020-08-05 17:36:13 +02:00
Adrien Boulanger
7b0376a444 T416-023: Add python3-bindings tests
Change-Id: Id656b2905eaa4536e37ec00314479a9e248129e3
2020-07-08 17:06:58 +02:00
Adrien Boulanger
912c1b5e6a T612-027: Update library name for python3 bindings
The API between python2 and python3 has significantly changed
and having a different name will prevent dynamic linking issues.

Change-Id: I7ad5f5d470a658abfc67e65206a09919e0a68fe5
2020-07-08 16:53:44 +02:00