diff --git a/include/addon-tools.hpp b/include/addon-tools.hpp index 5c218fa..e8cbe66 100644 --- a/include/addon-tools.hpp +++ b/include/addon-tools.hpp @@ -13,10 +13,19 @@ #define JS_STR(...) Nan::New(__VA_ARGS__).ToLocalChecked() +#define JS_UTF8(...) Nan::New(__VA_ARGS__).ToLocalChecked() #define JS_INT(val) Nan::New(val) +#define JS_INT32(val) Nan::New(val) +#define JS_UINT32(val) Nan::New(val) #define JS_NUM(val) Nan::New(val) +#define JS_OFFS(val) Nan::New(val) +#define JS_FLOAT(val) Nan::New(val) +#define JS_DOUBLE(val) Nan::New(val) #define JS_EXT(val) Nan::New(reinterpret_cast(val)) #define JS_BOOL(val) (val) ? Nan::True() : Nan::False() +#define JS_FUN(val) Nan::New(val).ToLocalChecked() +#define JS_OBJ(val) Nan::New(val).ToLocalChecked() +#define JS_ARRV(val) Nan::New(val).ToLocalChecked() #define REQ_ARGS(N) \ @@ -133,6 +142,9 @@ if ( ! info.IsConstructCall() ) \ return Nan::ThrowTypeError(T " must be called with the 'new' keyword."); +#define DES_CHECK \ + if (_isDestroyed) return; + #define SETTER_CHECK(C, T) \ if ( ! value->C ) \ return Nan::ThrowTypeError("Value must be " T); diff --git a/package.json b/package.json index ce2ebfb..312c40c 100644 --- a/package.json +++ b/package.json @@ -1,31 +1,31 @@ { - "name": "addon-tools-raub", - "author": "Luis Blanco ", - "description": "A set of extra tools for Node.js addons", - "version": "0.0.9", - "main": "index.js", - "keywords": [ - "node", - "addon", - "header", - "include", - "platform", - "build", - "paths" - ], - "maintainers": [ - { - "name": "Luis Blanco", - "email": "raubtierxxx@gmail.com", - "skype": "rauber666" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/raub/node-addon-tools.git" - }, - "dependencies": { - "nan": "2.8.0" - } + "name": "addon-tools-raub", + "author": "Luis Blanco ", + "description": "A set of extra tools for Node.js addons", + "version": "0.1.0", + "main": "index.js", + "keywords": [ + "node", + "addon", + "header", + "include", + "platform", + "build", + "paths" + ], + "maintainers": [ + { + "name": "Luis Blanco", + "email": "raubtierxxx@gmail.com", + "skype": "rauber666" + } + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/raub/node-addon-tools.git" + }, + "dependencies": { + "nan": "2.8.0" + } }