You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted in the code for #183 , virtual single inheritance is broken:
classA {
public:virtualintfoo() { return1; }
};
classB : virtual public A {
};
If you create a class(B) :: b and call b%foo(), the proxy code for A%foo will be passed a pointer B*. However, the _swig_A_foo wrapper reinterpret-casts the pointer as A*. This is fine for regular classes where A* and B* have the same address, but not fine for virtual classes where the pointers have to be offset. Not sure what the right approach here is...
The text was updated successfully, but these errors were encountered:
As noted in the code for #183 , virtual single inheritance is broken:
If you create a
class(B) :: b
and callb%foo()
, the proxy code forA%foo
will be passed a pointerB*
. However, the_swig_A_foo
wrapper reinterpret-casts the pointer asA*
. This is fine for regular classes whereA*
andB*
have the same address, but not fine for virtual classes where the pointers have to be offset. Not sure what the right approach here is...The text was updated successfully, but these errors were encountered: