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

Kotlin Generator: make CppProxy public #20

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

matzf
Copy link
Collaborator

@matzf matzf commented Oct 10, 2024

Make CppProxy public, so that the static method nativeDestroy can legally be called from the NativeObjectManager.
Otherwise, this results in IllegalAccessException, for example:

Exception in native cleanup of io.openmobilemaps.mapscore.shared.map.LayerInterface.CppProxy: java.lang.IllegalAccessException: class com.snapchat.djinni.NativeObjectManager$NativeObjectWrapper cannot access a member of class io.openmobilemaps.mapscore.shared.map.LayerInterface$CppProxy with modifiers "public static final native"

Note: the Java generator also creates the corresponding inner class as public (public static final class CppProxy...).

Make CppProxy public, so that the static method `nativeDestroy` can
legally be called from the NativeObjectManager.
Otherwise, this results in IllegalAccessException, for example:

  Exception in native cleanup of io.openmobilemaps.mapscore.shared.map.LayerInterface.CppProxy: java.lang.IllegalAccessException: class com.snapchat.djinni.NativeObjectManager$NativeObjectWrapper cannot access a member of class io.openmobilemaps.mapscore.shared.map.LayerInterface$CppProxy with modifiers "public static final native"
@matzf matzf merged commit e0093b3 into master Oct 11, 2024
@matzf matzf deleted the feature/kotlin-cppproxy-public branch October 11, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants