pythonless
This commit is contained in:
parent
b54439d909
commit
927a43933c
@ -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 )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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" )
|
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "_YAP_NOT_INSTALLED_=1;HAVE_CONFIG_H=1;_GNU_SOURCE;YAP_KERNEL=1" )
|
||||||
else()
|
else()
|
||||||
add_lib(YAP++ ${CXX_SOURCES} )
|
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++
|
MY_install(TARGETS YAP++
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
@ -10,7 +10,7 @@ extern "C" {
|
|||||||
#include "android/log.h"
|
#include "android/log.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if YAP_PYTHON
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -457,9 +457,11 @@ bool YAPEngine::call(YAPPredicate ap, YAPTerm ts[]) {
|
|||||||
|
|
||||||
bool YAPEngine::mgoal(Term t, Term tmod) {
|
bool YAPEngine::mgoal(Term t, Term tmod) {
|
||||||
sigjmp_buf buf, *oldp = LOCAL_RestartEnv;
|
sigjmp_buf buf, *oldp = LOCAL_RestartEnv;
|
||||||
PyThreadState *_save;
|
#if YAP_PYTHON
|
||||||
|
//PyThreadState *_save;
|
||||||
|
|
||||||
// _save = PyEval_SaveThread();
|
// _save = PyEval_SaveThread();
|
||||||
|
#endif
|
||||||
try {
|
try {
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
BACKUP_MACHINE_REGS();
|
BACKUP_MACHINE_REGS();
|
||||||
|
@ -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);
|
PyObject *ip = term_to_python(trhs, eval, o, cvt);
|
||||||
if (PySequence_Check(v)) {
|
if (PySequence_Check(v)) {
|
||||||
#if PY_MAJOR_VERSION < 3
|
#if PY_MAJOR_VERSION < 3
|
||||||
if (PyLong_Check(ip) {
|
if (PyLong_Check(ip)) {
|
||||||
min = PyLong_AsLong(ip);
|
min = PyLong_AsLong(ip);
|
||||||
} else if (PyInt_Check(ip) {
|
} else if (PyInt_Check(ip) {
|
||||||
min = PyInt_asInt(ip);
|
min = PyInt_asInt(ip);
|
||||||
|
Reference in New Issue
Block a user