Skip to content

Instantly share code, notes, and snippets.

@arn-e
Created January 22, 2013 01:34
Show Gist options
  • Save arn-e/4591279 to your computer and use it in GitHub Desktop.
Save arn-e/4591279 to your computer and use it in GitHub Desktop.
env_create_struct_jintarray.c
struct jintArray create_jintArray(int size)
{
struct jintArray jvm_array;
jvm_array.size = size;
jvm_array.elements = malloc(size * sizeof(int));
for (int i = 0; i < (jvm_array.size); i ++){
jvm_array.elements[i] = i;
}
return jvm_array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment