diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/octave/octrun.swg | 8 | ||||
-rw-r--r-- | Lib/octave/octruntime.swg | 2 |
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) { |