This commit is contained in:
Vitor Santos Costa
2018-05-20 18:40:56 +01:00
parent bdf7088665
commit 518ce92bea
17 changed files with 770 additions and 806 deletions

View File

@@ -265,7 +265,7 @@ PyObject *term_to_python(term_t t, bool eval, PyObject *o, bool cvt) {
#if PY_MAJOR_VERSION < 3
if (PyLong_Check(ip)) {
min = PyLong_AsLong(ip);
} else if (PyInt_Check(ip) {
} else if (PyInt_Check(ip)) {
min = PyInt_asInt(ip);
}
#else

View File

@@ -1,6 +1,7 @@
/**
*
* @section Python Built-Ins
* @defgroup Py4YAP-Bips Python Built-Ins
* @ingroup Py4YAP
*
* The Python engine includes a large number of Python built-ins. Some
* of them are interfaced here.
@@ -1078,3 +1079,5 @@ PyObject *compound_to_pyeval(term_t t, PyObject *context, bool cvt) {
return rc;
}
}
// @}

View File

@@ -11,6 +11,7 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% file python.pl
%%%
:- module(python,
@@ -43,18 +44,19 @@
]).
/** <module> python
/** @defgroup Py4YAP A C-based Prolog interface to python.
@ingroup python
A C-based Prolog interface to python.
@{
@author Vitor Santos Costa
@version 0:0:5, 2012/10/8
@license Perl Artistic License
This is an interface to allow calling Python from Prolog. Please look
at the SWIG package if you want to embedd Prolog with Python.
at the YAP4PY SWIG package if you want to embedd Prolog with Python.
The interface should be activated by consulting the python lybrary. It
The interface should be activated by consulting the python library. It
immediately boots a Python image.
To best define the interface, one has to address two opposite goals:
@@ -170,3 +172,5 @@ add_cwd_to_python :-
% done
:- initialization( load_foreign_files(['YAPPython'], [], init_python_dll), now ).
%% @}