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

Add PointerWrapper type #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

goto1134
Copy link
Contributor

@goto1134 goto1134 commented Aug 30, 2017

You can extend PointerWrapper for typesafe pointer. Example:

public interface TestLib {
      CustomPointer ptr_malloc(@size_t int size);
      void ptr_free(CustomPointer ptr);

      class CustomPointer extends PointerWrapper {
          private CustomPointer(Pointer pointer) {
              super(pointer);
          }
      }
  }
}

You can extend PointerWrapper for typesafe pointer. Example:
 public interface TestLib {
      CustomPointer ptr_malloc(@size_t int size);
      void ptr_free(CustomPointer ptr);

      class CustomPointer extends PointerWrapper {
          private CustomPointer(Pointer pointer) {
              super(pointer);
          }
      }
  }
 }

(cherry picked from commit 98ca7da)
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.

None yet

1 participant