pythonless

This commit is contained in:
Vitor Santos Costa 2018-03-19 14:26:29 +00:00
parent b54439d909
commit 927a43933c
4 changed files with 11 additions and 5 deletions

View File

@ -901,7 +901,7 @@ endif(NOT ANDROID)
#
install(FILES ${INCLUDE_HEADERS} ${CONFIGURATION_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Yap )
install(FILES ${INCLUDE_HEADERS} ${CONFIGURATION_HEADERS} DESTINATION ${includedir}/Yap )

View File

@ -15,7 +15,11 @@ if ( WIN32 OR ANDROID)
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "_YAP_NOT_INSTALLED_=1;HAVE_CONFIG_H=1;_GNU_SOURCE;YAP_KERNEL=1" )
else()
add_lib(YAP++ ${CXX_SOURCES} )
target_link_libraries(YAP++ ${CMAKE_DL_LIBS} Py4YAP libYap)
if (WITH_PYTHON)
target_link_libraries(YAP++ Py4YAP )
endif()
target_link_libraries(YAP++ ${CMAKE_DL_LIBS} libYap)
MY_install(TARGETS YAP++
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

View File

@ -10,7 +10,7 @@ extern "C" {
#include "android/log.h"
#endif
#if 1
#if YAP_PYTHON
#include "Python.h"
#endif
@ -457,9 +457,11 @@ bool YAPEngine::call(YAPPredicate ap, YAPTerm ts[]) {
bool YAPEngine::mgoal(Term t, Term tmod) {
sigjmp_buf buf, *oldp = LOCAL_RestartEnv;
PyThreadState *_save;
#if YAP_PYTHON
//PyThreadState *_save;
// _save = PyEval_SaveThread();
#endif
try {
CACHE_REGS
BACKUP_MACHINE_REGS();

View File

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