MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / SetInstanceData

Method SetInstanceData

napi-inl.h:720–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718#if NAPI_VERSION > 5
719template <typename T, BasicEnv::Finalizer<T> fini>
720inline void BasicEnv::SetInstanceData(T* data) const {
721 napi_status status = napi_set_instance_data(
722 _env,
723 data,
724 [](napi_env env, void* data, void*) { fini(env, static_cast<T*>(data)); },
725 nullptr);
726 NAPI_FATAL_IF_FAILED(
727 status, "BasicEnv::SetInstanceData", "invalid arguments");
728}
729
730template <typename DataType,
731 typename HintType,

Callers 3

InitMethod · 0.80
InitializeMethod · 0.80
InitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected