Skip to content

Commit 06746fd

Browse files
Fix regression failures.
1 parent 8346ec8 commit 06746fd

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

RESTProcessExample/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.SUFFIXES: .c .cc .o .d .h .cd
22
OBJS=RESTProcessExample.o SimpleBufferExample.o pyExample.o
33
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
55
VPATH=..
66
EXES=RESTProcess SimpleBuffer pyExample.so
77

pythonBuffer.h

+6-7
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
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>();

pythonExample/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CFLAGS=-g `pkg-config --cflags python3` -I.. -I. -I../json5_parser/json5_parser
44
VPATH=..
55

66
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 $@
88

99
.h.cd:
1010
../classdesc -I .. -typeName -use_mbr_pointers -onbase -overload python <$< >$@

test/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ MPIEXES=mpibuf_array
1616
OBJS=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
2020
CFLAGS=-g -I.. -I. -I../json5_parser/json5_parser -I/usr/X11R6/include -DRECUR_MAX=50 -DTR1 -DHAVE_LONGLONG
2121

2222
ifdef GCOV

test/c++11/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DIRS=$(HOME)/usr /usr/local /usr
2626
LIBS+=$(foreach dir,$(DIRS),-L$(dir)/lib) ../../xdr_pack.o -lm
2727
CFLAGS+=$(foreach dir,$(DIRS),-I$(dir)/include)
2828

29-
LIBS+=`pkg-config --libs libtirpc`
29+
LIBS+=`pkg-config --libs libtirpc` -lboost_system
3030

3131
JSON_HEADER=$(firstword $(foreach dir,$(DIRS),$(wildcard $(dir)/include/json_spirit.h)))
3232

0 commit comments

Comments
 (0)