Commit Graph

21 Commits

Author SHA1 Message Date
Emmanuel Briot
a4bd6fffd2 Prevent link errors when the python library is compiled without support
for threads.
L521-010 and L522-013

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@189889 936e1b1b-40f2-da11-902a-00137254ae57
2012-05-22 10:34:49 +00:00
Emmanuel Briot
d7f735880d Fix missing 'return' statements in python_support.c, detected when
compiling with -Wall
(configure): use python-config --includes rather than --cflags, since
 the later also provides all the compilation flags used to build
 python itself, and which might not be compatible with the gcc version
 we use for gnatcoll. For instance, on linux python is now built with
 -fstack-protected, which apparently requires special linker switches
 as well.
(configure): export the include and lib flags needed to build python
 C files, in case the user needs to build some. L217-023
(configure): detect whether readline is supported on the system. This
 is currently unused by GNATCOLL, but is cheap to test and might be
 useful to users (for this, its result is exported in gnatcoll.gpr
 too). Also L217-023

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@185922 936e1b1b-40f2-da11-902a-00137254ae57
2012-02-17 15:48:55 +00:00
Nicolas Setton
580a829968 Bump to GPL v3.
For KC20-012.



git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@182693 936e1b1b-40f2-da11-902a-00137254ae57
2011-12-20 10:11:08 +00:00
Emmanuel Briot
e95c9f9a84 (ada_PyUnicode_FromString): do nothing for old versions of python
In particular, this function did not exist in python 2.5, installed on
 kani where the CRM runs


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@175303 936e1b1b-40f2-da11-902a-00137254ae57
2011-06-21 15:37:49 +00:00
Emmanuel Briot
f5c0170a2c Make unicode support work whether python was compiled with wide unicode
strings or not (UCS4 or UCS2)
K616-011

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@175219 936e1b1b-40f2-da11-902a-00137254ae57
2011-06-20 11:50:30 +00:00
Emmanuel Briot
9dfd2e9399 Add support for python unicode objects.
The previous hack was that PyString_Check also returns True for unicode
 objects, but then the functions PyString_AsString always returned NULL
 for a unicode object. So now PyString_Check only returns true for strings,
 and a new function PyUnicode_Check was added.
(PyBaseString_Check): new function, with the old behavior of PyString_Check
(PyUnicode_*): new functions
For K616-011

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@175218 936e1b1b-40f2-da11-902a-00137254ae57
2011-06-20 11:12:55 +00:00
Jerome Lambourg
86d80eaff8 (ada_pystring_check): Also accept unicode strings.
for K111-003


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@168952 936e1b1b-40f2-da11-902a-00137254ae57
2011-01-11 08:18:09 +00:00
Emmanuel Briot
97e8141b28 Fix support for mingwin python when using gcc, on Windows
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167613 936e1b1b-40f2-da11-902a-00137254ae57
2010-11-30 12:00:49 +00:00
Emmanuel Briot
ad3a01f71d Add support for exporting properties to python and GPS shell.
Those properties basically provide a simpler syntax around two
 setter() and getter() functions (or possibly just one to make the
 property read-only or write-only).
JB17-022

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167236 936e1b1b-40f2-da11-902a-00137254ae57
2010-11-18 11:20:51 +00:00
Emmanuel Briot
57c659818e (pybool_is_true): minor cleanup.
Python now provides a better function, which preserves the usual python
 semantic. This is more portable than our previous approach.

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167112 936e1b1b-40f2-da11-902a-00137254ae57
2010-11-16 13:23:41 +00:00
Emmanuel Briot
f932142e8b (List_Instance): new type
(Nth_Arg): can now accept lists as parameters to script functions,
 in addition to the usual simple types
JB15-028

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167055 936e1b1b-40f2-da11-902a-00137254ae57
2010-11-15 17:33:14 +00:00
Emmanuel Briot
5ed6316a31 (GNATCOLL.Scripts): now generates new-style classes in python
JB15-010

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167037 936e1b1b-40f2-da11-902a-00137254ae57
2010-11-15 14:56:33 +00:00
Arnaud Charlet
1991ff772f Update copyright notice.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@162804 936e1b1b-40f2-da11-902a-00137254ae57
2010-07-23 09:32:24 +00:00
Arnaud Charlet
21297c153f Minor reformatting.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@162803 936e1b1b-40f2-da11-902a-00137254ae57
2010-07-23 09:32:05 +00:00
Emmanuel Briot
8fd89eac92 Added support for boolean types (supported in python since 2.5). This is
needed to better handle calling python functions from Ada when they
 return a "bool"

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@152423 936e1b1b-40f2-da11-902a-00137254ae57
2009-11-18 08:34:26 +00:00
Olivier Ramonat
075a388512 Merge gnatpython changes
Add support for PyFloat
Add Py_Main function to start the python interpreter

git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@132647 936e1b1b-40f2-da11-902a-00137254ae57
2008-11-24 11:52:42 +00:00
Emmanuel Briot
9594a2968a Make use of Py_ssize_t optional, depending on python version
git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@128228 936e1b1b-40f2-da11-902a-00137254ae57
2008-09-01 13:53:06 +00:00
Emmanuel Briot
4750c182e4 (ada_PyEval_EvalCodeEx): fix types used to match python prototypes.
Fixes regression in the continuous builder in the hooks.1 test


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@128188 936e1b1b-40f2-da11-902a-00137254ae57
2008-08-29 13:25:04 +00:00
Emmanuel Briot
f4252deb3b Redo previous check in, including compile.h instead since code.h
did not exist on older versions of python apparently


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@126469 936e1b1b-40f2-da11-902a-00137254ae57
2008-07-08 08:03:01 +00:00
Emmanuel Briot
98e59381ba Added explicit #include for code.h, since on some versions of
python it doesn't seem to be included by default, which prevents
 compilation of this file (fails with Python 2.3.4)


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@126467 936e1b1b-40f2-da11-902a-00137254ae57
2008-07-08 07:50:51 +00:00
Emmanuel Briot
0c34b8e20f Added support for "make install" (G706-003)
No source file has changed, but they were moved so that they are all under src/
 now (and possibly subdirectories for those sources that depend on optional
 external libraries).
We now support building both static and relocatable libraries at the same time,
 using separate lib and obj directories to avoid conflicts. Also both can be
 installed in the same prefix, the choice between the two can be done by the
 user application


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@113225 936e1b1b-40f2-da11-902a-00137254ae57
2007-07-06 12:28:18 +00:00