Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove FakeJni::Field and FakeJni::Function for native class member registration #62

Open
Matthewacon opened this issue Oct 22, 2019 · 0 comments
Assignees
Labels
core enhancement New feature or request housekeeping Code cleanup, no functional changes
Milestone

Comments

@Matthewacon
Copy link
Member

Right now you must use the Function<&MyClass::myFunction> {} and Field<&MyClass::myField> {} breeder templates to register members on a native class. This change was made to mitigate an issue with implicit conversions from static member function pointers to void * and the subsequent incorrect registration as a void * field. This can be properly mitigated using CX::IsFunction, without the API boilerplate of breeder templates.

Note: the Constructor<MyClass, [Args...]> {} breeder template is still required to register constructors for native classes.

@Matthewacon Matthewacon added enhancement New feature or request housekeeping Code cleanup, no functional changes high priority labels Oct 22, 2019
@Matthewacon Matthewacon added this to the 0.1.0 milestone Oct 22, 2019
@Matthewacon Matthewacon self-assigned this Oct 22, 2019
@Matthewacon Matthewacon changed the title Remove FakeJni::_CX::Field and FakeJni::_CX::Function for native class member registration Remove FakeJni::Field and FakeJni::Function for native class member registration Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request housekeeping Code cleanup, no functional changes
Projects
None yet
Development

No branches or pull requests

1 participant