summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Wette <karl.wette@ligo.org>2020-05-01 21:29:41 +1000
committerKarl Wette <karl.wette@ligo.org>2020-05-31 06:43:15 +1000
commit30132bf77730addafb6150ecd751b855c05394f3 (patch)
tree9a8c367d87c32fdeecf7584557d6fcf3b7482b8d
parente0d85fc939e0c3ea43f645bde0589f4249fd484a (diff)
downloadswig-30132bf77730addafb6150ecd751b855c05394f3.tar.gz
octrun.swg: remove octave_value type-id from octave_swig_bound_func
- The {DECLARE|DEFINE}_OV_TYPEID_FUNCTIONS_AND_DATA declarations attached to this class cause a seg-fault in the module_load Octave example. Removing these declarations fixes the seg-fault. - While cause of seg-fault is unknown, note that (in Octave 5.1.0) the declaration of octave_function, which is the base class for octave_swig_bound_func, does not use these declarations. So it's possible they simply are not required for this type of subclass.
-rw-r--r--Lib/octave/octrun.swg4
-rw-r--r--Lib/octave/octruntime.swg7
2 files changed, 0 insertions, 11 deletions
diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg
index 325a4cca3..162772d98 100644
--- a/Lib/octave/octrun.swg
+++ b/Lib/octave/octrun.swg
@@ -203,11 +203,7 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
std::set<std::string> dispatch_classes;
- private:
-
- DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
};
- DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_swig_bound_func, "octave_swig_bound_func", "octave_swig_bound_func");
#else
#define SWIG_OCTAVE_BOUND_FUNC(func, args) octave_value(func)
#endif
diff --git a/Lib/octave/octruntime.swg b/Lib/octave/octruntime.swg
index f98bf4fe4..6e07aaa70 100644
--- a/Lib/octave/octruntime.swg
+++ b/Lib/octave/octruntime.swg
@@ -376,7 +376,6 @@ DEFUN_DLD( SWIG_name, args, nargout, SWIG_name_usage ) {
string_vector types = typeinfo.installed_type_names();
bool register_octave_swig_ref = true;
bool register_octave_swig_packed = true;
- bool register_octave_swig_bound_func = true;
for (int i = 0; i < types.numel(); ++i) {
if (types(i) == octave_swig_ref::static_type_name()) {
register_octave_swig_ref = false;
@@ -384,9 +383,6 @@ DEFUN_DLD( SWIG_name, args, nargout, SWIG_name_usage ) {
if (types(i) == octave_swig_packed::static_type_name()) {
register_octave_swig_packed = false;
}
- if (types(i) == octave_swig_bound_func::static_type_name()) {
- register_octave_swig_bound_func = false;
- }
}
if (register_octave_swig_ref) {
octave_swig_ref::register_type();
@@ -394,9 +390,6 @@ DEFUN_DLD( SWIG_name, args, nargout, SWIG_name_usage ) {
if (register_octave_swig_packed) {
octave_swig_packed::register_type();
}
- if (register_octave_swig_bound_func) {
- octave_swig_bound_func::register_type();
- }
}
#else
octave_swig_ref::register_type();