diff options
author | Sampson Gao <sampsong@ca.ibm.com> | 2017-09-11 09:57:38 -0400 |
---|---|---|
committer | Michael Dawson <mdawson@devrus.com> | 2017-09-18 17:47:34 -0400 |
commit | 19766547fa2a783b8e7472c31ad246ee118230ee (patch) | |
tree | ed10e4408d30883de3ac60524b433920c7c2a68d /src/node_api.h | |
parent | c75f87cc4c8d3699e081d37bb5bf47a70d830fdb (diff) | |
download | node-new-19766547fa2a783b8e7472c31ad246ee118230ee.tar.gz |
n-api: add optional string length parameters
PR-URL: https://github.com/nodejs/node/pull/15343
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Diffstat (limited to 'src/node_api.h')
-rw-r--r-- | src/node_api.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/node_api.h b/src/node_api.h index e1a40983a9..82f2e1900e 100644 --- a/src/node_api.h +++ b/src/node_api.h @@ -109,7 +109,9 @@ napi_get_last_error_info(napi_env env, const napi_extended_error_info** result); NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location, - const char* message); + size_t location_len, + const char* message, + size_t message_len); // Getters for defined singletons NAPI_EXTERN napi_status napi_get_undefined(napi_env env, napi_value* result); @@ -154,6 +156,7 @@ NAPI_EXTERN napi_status napi_create_symbol(napi_env env, napi_value* result); NAPI_EXTERN napi_status napi_create_function(napi_env env, const char* utf8name, + size_t length, napi_callback cb, void* data, napi_value* result); @@ -336,6 +339,7 @@ NAPI_EXTERN napi_status napi_get_new_target(napi_env env, NAPI_EXTERN napi_status napi_define_class(napi_env env, const char* utf8name, + size_t length, napi_callback constructor, void* data, size_t property_count, |