From: Daniel Elstner Date: Sun, 11 Oct 2015 12:31:18 +0000 (+0200) Subject: SWIG: Hack around SWIG segfault on private destructors X-Git-Tag: libsigrok-0.4.0~173 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4c9208a799064a4eb3c76701edf3a007811dbc85;p=libsigrok.git SWIG: Hack around SWIG segfault on private destructors Apparently this problem has been fixed in SWIG 3.0.6. However, until we can require that version, define "private" as "protected" when running the SWIG parser. --- diff --git a/Makefile.am b/Makefile.am index 582b38f7..b05890b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -651,7 +651,8 @@ $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \ $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS) -$(AM_V_at)rm -f $(java_cleanfiles) - $(AM_V_GEN)$(SWIG) -c++ -Dnoexcept= -java -package org.sigrok.core.classes \ + $(AM_V_GEN)$(SWIG) -c++ -Dnoexcept= -Dprivate=protected \ + -java -package org.sigrok.core.classes \ -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \ -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index c70fffca..e38acc75 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -87,8 +87,9 @@ setup( ext_modules = [ Extension('sigrok.core._classes', sources = [vpath('sigrok/core/classes.i')], - swig_opts = ['-c++', '-threads', '-Dnoexcept=', '-Isigrok/core', - '-I..', '-I' + srcdir_parent] + ['-I%s' % i for i in includes], + swig_opts = ['-c++', '-threads', '-Dnoexcept=', '-Dprivate=protected', + '-Isigrok/core', '-I..', '-I' + srcdir_parent] + + ['-I%s' % i for i in includes], extra_compile_args = ['-Wno-uninitialized'], include_dirs = includes, library_dirs = libdirs,