Skip to content

Instantly share code, notes, and snippets.

@arn-e
Created January 22, 2013 01:36
Show Gist options
  • Save arn-e/4591289 to your computer and use it in GitHub Desktop.
Save arn-e/4591289 to your computer and use it in GitHub Desktop.
env_main.c
int main(int argc, char const *argv[])
{
struct jintArray jvm_array;
jvm_array = create_jintArray(5);
struct env_type env_struct = create_env_structure();
struct env_type *env_ptr = &env_struct;
struct env_type **env = &env_ptr;
int *native_array;
native_array = (*env)->GetIntArrayElements(jvm_array);
(*env)->ReleaseIntArrayElements(jvm_array, native_array);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment