Skip to content

Commit

Permalink
napi: Property accessors and callback data (nodejs#45)
Browse files Browse the repository at this point in the history
 - Add support for property descriptors including accessor callbacks
 - Add a data pointer for function and accessor callbacks
 - Add API for defining a property using a property descriptor
 - Update the constructor API to use property descriptors
  • Loading branch information
jasongin committed Jan 26, 2017
1 parent 2fe8220 commit 0bdc1b8
Show file tree
Hide file tree
Showing 32 changed files with 740 additions and 284 deletions.
6 changes: 4 additions & 2 deletions src/node_api_helpers.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef SRC_NODE_API_HELPERS_H_
#ifndef SRC_NODE_API_HELPERS_H_
#define SRC_NODE_API_HELPERS_H_

////////////////////////////////////////////////////////////////////////////////
Expand All @@ -17,7 +17,9 @@
#include <assert.h>

#define NAPI_METHOD(name) \
void name(napi_env env, napi_func_cb_info info)
void name(napi_env env, napi_callback_info info)
#define NAPI_GETTER(name) NAPI_METHOD(name)
#define NAPI_SETTER(name) NAPI_METHOD(name)

#define NAPI_MODULE_INIT(name) \
void name(napi_env env, napi_value exports, napi_value module)
Expand Down
Loading

0 comments on commit 0bdc1b8

Please sign in to comment.