File tree Expand file tree Collapse file tree 5 files changed +10
-11
lines changed Expand file tree Collapse file tree 5 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 11.SUFFIXES : .c .cc .o .d .h .cd
22OBJS =RESTProcessExample.o SimpleBufferExample.o pyExample.o
33CFLAGS =-g -I.. -I. -I../json5_parser/json5_parser -I/usr/local/include -fPIC -pthread
4- LIBS+ =-L/usr/local/lib64 -lboost_thread -lpthread
4+ LIBS+ =-L/usr/local/lib64 -lboost_system - lboost_thread -lpthread
55VPATH =..
66EXES =RESTProcess SimpleBuffer pyExample.so
77
Original file line number Diff line number Diff line change 1717#include " signature.h"
1818#include < deque>
1919#include < numeric>
20- // #ifdef MXE
21- // #include <MXEPython.h>
22- // #else
23- // #include <Python.h>
24- // #endif
20+ #ifdef MXE
2521#include " pythonCAPI.h"
22+ #else
23+ #include < Python.h>
24+ #endif
2625
2726#define CLASSDESC_PY_EXCEPTION_ABSORB (ret ) \
2827 catch (const std::exception& ex) \
@@ -252,9 +251,9 @@ namespace classdesc
252251 else
253252 {
254253 auto dir (PyObject_Dir (pyObject));
255- for (Py_ssize_t i=0 ; i<PySequence_Size (dir); ++i)
254+ for (Py_ssize_t i=0 ; dir && i<PySequence_Size (dir); ++i)
256255 {
257- auto key=PySequence_GetItem (pyObject , i);
256+ auto key=PySequence_GetItem (dir , i);
258257 PyObjectRef keyRef (PyObject_Str (key));
259258 string keyStr=PyUnicode_AsUTF8AndSize (keyRef,nullptr );
260259 obj[keyStr]=PythonBuffer (PyObject_GetAttr (pyObject, key)).get <json_pack_t >();
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ CFLAGS=-g `pkg-config --cflags python3` -I.. -I. -I../json5_parser/json5_parser
44VPATH =..
55
66example.so : $(OBJS )
7- g++ -fPIC -shared -Wl,-soname,example $^ ` pkg-config --libs python3` -lboost_python-py3 -o $@
7+ g++ -fPIC -shared -Wl,-soname,example $^ ` pkg-config --libs python3` -lboost_python-py3 -lboost_system -o $@
88
99.h.cd :
1010 ../classdesc -I .. -typeName -use_mbr_pointers -onbase -overload python < $< > $@
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ MPIEXES=mpibuf_array
1616OBJS =testXMLcd_other.o
1717
1818# note the internal type example cannot be correctly linked with g++ or icc!
19- LIBS =-L.. -L/usr/X11R6/lib ` pkg-config --libs libtirpc ` -lboost_thread
19+ LIBS =-L.. -L/usr/X11R6/lib ` pkg-config --libs libtirpc ` -lboost_system - lboost_thread
2020CFLAGS =-g -I.. -I. -I../json5_parser/json5_parser -I/usr/X11R6/include -DRECUR_MAX=50 -DTR1 -DHAVE_LONGLONG
2121
2222ifdef GCOV
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ DIRS=$(HOME)/usr /usr/local /usr
2626LIBS+ =$(foreach dir,$(DIRS ) ,-L$(dir ) /lib) ../../xdr_pack.o -lm
2727CFLAGS+ =$(foreach dir,$(DIRS ) ,-I$(dir ) /include)
2828
29- LIBS+ =` pkg-config --libs libtirpc `
29+ LIBS+ =` pkg-config --libs libtirpc ` -lboost_system
3030
3131JSON_HEADER =$(firstword $(foreach dir,$(DIRS ) ,$(wildcard $(dir ) /include/json_spirit.h) ) )
3232
You can’t perform that action at this time.
0 commit comments