GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/test/node-api/test_instance_data/addon.c at master · fredericp/node Expand file tree/ Copy pathaddon.cMore file actions 22 lines (20 loc) · 611 Bytes / Copy pathaddon.cFile metadata and controls22 lines (20 loc) · 611 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #include <stdio.h> #include <stdlib.h> #include <node_api.h> static void addon_free(napi_env env, void* data, void* hint) { napi_ref* ref = data; napi_delete_reference(env, *ref); free(ref); fprintf(stderr, "addon_free"); } napi_value addon_new(napi_env env, napi_value exports, bool ref_first) { napi_ref* ref = malloc(sizeof(*ref)); if (ref_first) { napi_create_reference(env, exports, 1, ref); napi_set_instance_data(env, ref, addon_free, NULL); } else { napi_set_instance_data(env, ref, addon_free, NULL); napi_create_reference(env, exports, 1, ref); } return exports; } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |