summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Fries <robert_fries@partech.com>2021-05-12 19:44:17 -0400
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2021-12-05 22:19:40 +0000
commit852eab7db33c5cfe073a9c8af983b7482a854075 (patch)
treeffa33de1432923940bd93c2af90c8e9771fbdb7a
parent883b42dc708199db0f05f7fc0e72974b75eac001 (diff)
downloadswig-852eab7db33c5cfe073a9c8af983b7482a854075.tar.gz
Allow swig wrapped modules to compile with -Bsymbolic
-rw-r--r--Lib/octave/octrun.swg8
-rw-r--r--Lib/octave/octruntime.swg2
2 files changed, 10 insertions, 0 deletions
diff --git a/Lib/octave/octrun.swg b/Lib/octave/octrun.swg
index 1069e0e54..a7291df14 100644
--- a/Lib/octave/octrun.swg
+++ b/Lib/octave/octrun.swg
@@ -1178,6 +1178,10 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
#endif
{ return ptr->print(os, pr_as_read_syntax); }
+#if SWIG_OCTAVE_PREREQ(4,4,0)
+ static void set_type_id(int type_id) { t_id=type_id; }
+#endif
+
virtual type_conv_info numeric_conversion_function(void) const {
return octave_base_value::type_conv_info (default_numeric_conversion_function,
octave_scalar::static_type_id ());
@@ -1285,6 +1289,10 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
# endif
#endif
+#if SWIG_OCTAVE_PREREQ(4,4,0)
+ static void set_type_id(int type_id) { t_id=type_id; }
+#endif
+
private:
#if !SWIG_OCTAVE_PREREQ(4,0,0)
DECLARE_OCTAVE_ALLOCATOR;
diff --git a/Lib/octave/octruntime.swg b/Lib/octave/octruntime.swg
index a397fb7c1..ca69e44c4 100644
--- a/Lib/octave/octruntime.swg
+++ b/Lib/octave/octruntime.swg
@@ -295,9 +295,11 @@ DEFUN_DLD( SWIG_name, args, nargout, SWIG_name_usage ) {
for (int i = 0; i < types.numel(); ++i) {
if (types(i) == octave_swig_ref::static_type_name()) {
register_octave_swig_ref = false;
+ octave_swig_ref::set_type_id(i);
}
if (types(i) == octave_swig_packed::static_type_name()) {
register_octave_swig_packed = false;
+ octave_swig_packed::set_type_id(i);
}
}
if (register_octave_swig_ref) {