node-addon-api 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/napi-inl.h +4 -0
- package/napi.h +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# node-addon-api Changelog
|
|
2
2
|
|
|
3
|
+
## 2019-07-23 Version 1.7.1, @NickNaso
|
|
4
|
+
|
|
5
|
+
### Notable changes:
|
|
6
|
+
|
|
7
|
+
#### API
|
|
8
|
+
|
|
9
|
+
- Fixed compilation problems that happen on Node.js with N-API version less than 4.
|
|
10
|
+
|
|
11
|
+
### Commmits
|
|
12
|
+
|
|
13
|
+
* [[`c20bcbd069`](https://github.com/nodejs/node-addon-api/commit/c20bcbd069)] - Merge pull request #518 from NickNaso/master (Nicola Del Gobbo)
|
|
14
|
+
* [[`6720d57253`](https://github.com/nodejs/node-addon-api/commit/6720d57253)] - Create the native threadsafe\_function for test only for N-API greater than 3. (NickNaso)
|
|
15
|
+
* [[`37b6c185ad`](https://github.com/nodejs/node-addon-api/commit/37b6c185ad)] - Fix compilation breakage on 1.7.0 (NickNaso)
|
|
16
|
+
|
|
3
17
|
## 2019-07-23 Version 1.7.0, @NickNaso
|
|
4
18
|
|
|
5
19
|
### Notable changes:
|
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ to ideas specified in the **ECMA262 Language Specification**.
|
|
|
46
46
|
- **[Contributors](#contributors)**
|
|
47
47
|
- **[License](#license)**
|
|
48
48
|
|
|
49
|
-
## **Current version: 1.7.
|
|
49
|
+
## **Current version: 1.7.1**
|
|
50
50
|
|
|
51
51
|
(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
|
|
52
52
|
|
package/napi-inl.h
CHANGED
|
@@ -125,6 +125,7 @@ struct FinalizeData {
|
|
|
125
125
|
Hint* hint;
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
+
#if (NAPI_VERSION > 3)
|
|
128
129
|
template <typename ContextType=void,
|
|
129
130
|
typename Finalizer=std::function<void(Env, void*, ContextType*)>,
|
|
130
131
|
typename FinalizerDataType=void>
|
|
@@ -196,6 +197,7 @@ struct ThreadSafeFinalize {
|
|
|
196
197
|
Finalizer callback;
|
|
197
198
|
napi_threadsafe_function* tsfn;
|
|
198
199
|
};
|
|
200
|
+
#endif
|
|
199
201
|
|
|
200
202
|
template <typename Getter, typename Setter>
|
|
201
203
|
struct AccessorCallbackData {
|
|
@@ -3740,6 +3742,7 @@ inline void AsyncWorker::OnWorkComplete(
|
|
|
3740
3742
|
}
|
|
3741
3743
|
}
|
|
3742
3744
|
|
|
3745
|
+
#if (NAPI_VERSION > 3)
|
|
3743
3746
|
////////////////////////////////////////////////////////////////////////////////
|
|
3744
3747
|
// ThreadSafeFunction class
|
|
3745
3748
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -4058,6 +4061,7 @@ inline void ThreadSafeFunction::CallJS(napi_env env,
|
|
|
4058
4061
|
Function(env, jsCallback).Call({});
|
|
4059
4062
|
}
|
|
4060
4063
|
}
|
|
4064
|
+
#endif
|
|
4061
4065
|
|
|
4062
4066
|
////////////////////////////////////////////////////////////////////////////////
|
|
4063
4067
|
// Memory Management class
|
package/napi.h
CHANGED
|
@@ -1830,6 +1830,7 @@ namespace Napi {
|
|
|
1830
1830
|
bool _suppress_destruct;
|
|
1831
1831
|
};
|
|
1832
1832
|
|
|
1833
|
+
#if (NAPI_VERSION > 3)
|
|
1833
1834
|
class ThreadSafeFunction {
|
|
1834
1835
|
public:
|
|
1835
1836
|
// This API may only be called from the main thread.
|
|
@@ -2029,6 +2030,7 @@ namespace Napi {
|
|
|
2029
2030
|
|
|
2030
2031
|
std::unique_ptr<napi_threadsafe_function> _tsfn;
|
|
2031
2032
|
};
|
|
2033
|
+
#endif
|
|
2032
2034
|
|
|
2033
2035
|
// Memory management.
|
|
2034
2036
|
class MemoryManagement {
|
package/package.json
CHANGED