Skip to content

Instantly share code, notes, and snippets.

@si14
Created July 26, 2011 20:00
Show Gist options
  • Save si14/1107844 to your computer and use it in GitHub Desktop.
Save si14/1107844 to your computer and use it in GitHub Desktop.
unsigned char* bin_data;
bin_data = enif_make_new_binary(env, buflen, ret);
i = 0;
bin_data[i] = ctx->size;
i += sizeof(length_t);
bin_data[i] = ctx->begin;
i += sizeof(length_t);
bin_data[i] = ctx->filled;
i += sizeof(unsigned short int);
bin_data[i] = ctx->type;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment