Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass
- See Examples/octave/callback/runme.m: a.run() calls Octave callback, but due to changes in behaviour to subsref() a.Callback.run() can no longer be used to call C callback unless a.Callback actually exists; subsrefs() just gets the "Callback" call whereas prior to Octave 4.4 it would get both the "Callback" and "run" calls. So now a.Callback is set to the original base class (with own=0) so that it can be accessed
This commit is contained in:
parent
ce67bce72e
commit
84aab22f66
1 changed files with 4 additions and 0 deletions
|
|
@ -484,8 +484,12 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
|
|||
}
|
||||
types.insert(types.end(), rhs.types.begin(), rhs.types.end());
|
||||
members.insert(rhs.members.begin(), rhs.members.end());
|
||||
#if SWIG_OCTAVE_PREREQ(4,4,0)
|
||||
assign(rhs.swig_type_name(), rhs.as_value());
|
||||
#else
|
||||
rhs.types.clear();
|
||||
rhs.members.clear();
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef member_map::const_iterator swig_member_const_iterator;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue