sylveon / member_thunk

Dynamically creates executable code to allow C callbacks to call C++ member functions without the need for a user data parameter
MIT License
13 stars 2 forks source link

Verify if return type is scalar or void #14

Closed sylveon closed 4 years ago

sylveon commented 4 years ago

Not easily fixable, a function pointer has a different ABI than a virtual or instance call for non-scalar types, even if they fit within a register, but this doesn't applies when directly returning scalar types or void.

Should instead disable usage when a non-scalar or non-void return type is used.