Skip to content

More (unnecessary?) NAPI_PREAMBLE() calls #238

Closed
@gabrielschulhof

Description

@gabrielschulhof

We have

  • napi_is_array (val->IsArray())
  • napi_is_buffer (node::Buffer::HasInstance())
  • napi_is_arraybuffer (val->IsArrayBuffer())
  • napi_is_typedarray (val->IsTypedArray())

that have NAPI_PREAMBLE(), whereas

  • napi_is_error (val->IsNativeError())

does not have it.

I don't believe the ones above that have NAPI_PREAMBLE() need it, for the same reason that napi_typeof() doesn't need it. What do @nodejs/addon-api think?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions