File tree 5 files changed +10
-11
lines changed
5 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
1
.SUFFIXES : .c .cc .o .d .h .cd
2
2
OBJS =RESTProcessExample.o SimpleBufferExample.o pyExample.o
3
3
CFLAGS =-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
5
5
VPATH =..
6
6
EXES =RESTProcess SimpleBuffer pyExample.so
7
7
Original file line number Diff line number Diff line change 17
17
#include " signature.h"
18
18
#include < deque>
19
19
#include < numeric>
20
- // #ifdef MXE
21
- // #include <MXEPython.h>
22
- // #else
23
- // #include <Python.h>
24
- // #endif
20
+ #ifdef MXE
25
21
#include " pythonCAPI.h"
22
+ #else
23
+ #include < Python.h>
24
+ #endif
26
25
27
26
#define CLASSDESC_PY_EXCEPTION_ABSORB (ret ) \
28
27
catch (const std::exception & ex) \
@@ -252,9 +251,9 @@ namespace classdesc
252
251
else
253
252
{
254
253
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)
256
255
{
257
- auto key=PySequence_GetItem (pyObject , i);
256
+ auto key=PySequence_GetItem (dir , i);
258
257
PyObjectRef keyRef (PyObject_Str (key));
259
258
string keyStr=PyUnicode_AsUTF8AndSize (keyRef,nullptr );
260
259
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
4
4
VPATH =..
5
5
6
6
example.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 $@
8
8
9
9
.h.cd :
10
10
../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
16
16
OBJS =testXMLcd_other.o
17
17
18
18
# 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
20
20
CFLAGS =-g -I.. -I. -I../json5_parser/json5_parser -I/usr/X11R6/include -DRECUR_MAX=50 -DTR1 -DHAVE_LONGLONG
21
21
22
22
ifdef GCOV
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ DIRS=$(HOME)/usr /usr/local /usr
26
26
LIBS+ =$(foreach dir,$(DIRS ) ,-L$(dir ) /lib) ../../xdr_pack.o -lm
27
27
CFLAGS+ =$(foreach dir,$(DIRS ) ,-I$(dir ) /include)
28
28
29
- LIBS+ =` pkg-config --libs libtirpc `
29
+ LIBS+ =` pkg-config --libs libtirpc ` -lboost_system
30
30
31
31
JSON_HEADER =$(firstword $(foreach dir,$(DIRS ) ,$(wildcard $(dir ) /include/json_spirit.h) ) )
32
32
You can’t perform that action at this time.
0 commit comments