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
UPBGE: Remove use of void * in python attributes callbacks.
Previously all the python callbacks were using void pointer to the instance to
work from, but using a void * failed in some cast case.
For example if you have a diamond inheritance solved by using a virtual inheritance
the cast to void * then later to the class type will failed giving a correct
base class:
Base *base = new Final();
static_cast<Final *>(base) --> valid access to Final
static_cast<Final *>((void *)base) --> invalid access to Final
This behaviour is due of the C cast behavior for void * which is different than
the C++ cast behavior.
To solve any of these tenious issue, the usage of void * is replaced by
PyObjectPlus * in all the python attributes functions. This as also the advantage
to let static_cast check at compilation cast incompatiblity like the error in
BL_ArmatureConstraint detected and solved in this commit.
0 commit comments