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/benchmark/napi/function_call/napi_binding.c at master · electic/node Expand file tree/ Copy pathnapi_binding.cMore file actions 26 lines (23 loc) · 702 Bytes / Copy pathnapi_binding.cFile metadata and controls26 lines (23 loc) · 702 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #include <assert.h> #include <node_api.h> static int32_t increment = 0; static napi_value Hello(napi_env env, napi_callback_info info) { napi_value result; napi_status status = napi_create_int32(env, increment++, &result); assert(status == napi_ok); return result; } NAPI_MODULE_INIT() { napi_value hello; napi_status status = napi_create_function(env, "hello", NAPI_AUTO_LENGTH, Hello, NULL, &hello); assert(status == napi_ok); status = napi_set_named_property(env, exports, "hello", hello); assert(status == napi_ok); 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. |