koffi 1.0.0 → 1.0.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/README.md CHANGED
@@ -53,7 +53,7 @@ Once you have installed koffi with `npm install koffi`, you can start by loading
53
53
  const koffi = require('koffi');
54
54
  ```
55
55
 
56
- Below you can find two examples:
56
+ Below you can find three examples:
57
57
 
58
58
  * The first one runs on Linux. The functions are declared with the C-like prototype language.
59
59
  * The second one runs on Windows, and uses the node-ffi like syntax to declare functions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koffi",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Fast and simple FFI (foreign function interface) for Node.js",
5
5
  "keywords": [
6
6
  "foreign",
package/src/ffi.cc CHANGED
@@ -319,7 +319,7 @@ static bool ParseClassicFunction(Napi::Env env, Napi::String name, Napi::Value r
319
319
  }
320
320
  #endif
321
321
 
322
- func->name = DuplicateString(std::string(name).c_str(), &instance->str_alloc).ptr;
322
+ func->name = DuplicateString(name.ToString().Utf8Value().c_str(), &instance->str_alloc).ptr;
323
323
 
324
324
  func->ret.type = ResolveType(instance, ret);
325
325
  if (!func->ret.type)