koffi 2.1.2 → 2.1.3

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.
Files changed (34) hide show
  1. package/ChangeLog.md +6 -0
  2. package/build/qemu/2.1.3/koffi_darwin_arm64.tar.gz +0 -0
  3. package/build/qemu/2.1.3/koffi_darwin_x64.tar.gz +0 -0
  4. package/build/qemu/2.1.3/koffi_freebsd_arm64.tar.gz +0 -0
  5. package/build/qemu/2.1.3/koffi_freebsd_ia32.tar.gz +0 -0
  6. package/build/qemu/2.1.3/koffi_freebsd_x64.tar.gz +0 -0
  7. package/build/qemu/2.1.3/koffi_linux_arm32hf.tar.gz +0 -0
  8. package/build/qemu/2.1.3/koffi_linux_arm64.tar.gz +0 -0
  9. package/build/qemu/2.1.3/koffi_linux_ia32.tar.gz +0 -0
  10. package/build/qemu/2.1.3/koffi_linux_riscv64hf64.tar.gz +0 -0
  11. package/build/qemu/2.1.3/koffi_linux_x64.tar.gz +0 -0
  12. package/build/qemu/2.1.3/koffi_openbsd_ia32.tar.gz +0 -0
  13. package/build/qemu/2.1.3/koffi_openbsd_x64.tar.gz +0 -0
  14. package/build/qemu/2.1.3/koffi_win32_arm64.tar.gz +0 -0
  15. package/build/qemu/2.1.3/koffi_win32_ia32.tar.gz +0 -0
  16. package/build/qemu/2.1.3/koffi_win32_x64.tar.gz +0 -0
  17. package/package.json +2 -2
  18. package/src/ffi.cc +2 -2
  19. package/src/ffi.hh +1 -1
  20. package/build/qemu/2.1.2/koffi_darwin_arm64.tar.gz +0 -0
  21. package/build/qemu/2.1.2/koffi_darwin_x64.tar.gz +0 -0
  22. package/build/qemu/2.1.2/koffi_freebsd_arm64.tar.gz +0 -0
  23. package/build/qemu/2.1.2/koffi_freebsd_ia32.tar.gz +0 -0
  24. package/build/qemu/2.1.2/koffi_freebsd_x64.tar.gz +0 -0
  25. package/build/qemu/2.1.2/koffi_linux_arm32hf.tar.gz +0 -0
  26. package/build/qemu/2.1.2/koffi_linux_arm64.tar.gz +0 -0
  27. package/build/qemu/2.1.2/koffi_linux_ia32.tar.gz +0 -0
  28. package/build/qemu/2.1.2/koffi_linux_riscv64hf64.tar.gz +0 -0
  29. package/build/qemu/2.1.2/koffi_linux_x64.tar.gz +0 -0
  30. package/build/qemu/2.1.2/koffi_openbsd_ia32.tar.gz +0 -0
  31. package/build/qemu/2.1.2/koffi_openbsd_x64.tar.gz +0 -0
  32. package/build/qemu/2.1.2/koffi_win32_arm64.tar.gz +0 -0
  33. package/build/qemu/2.1.2/koffi_win32_ia32.tar.gz +0 -0
  34. package/build/qemu/2.1.2/koffi_win32_x64.tar.gz +0 -0
package/ChangeLog.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## History
4
4
 
5
+ ### Koffi 2.1.3
6
+
7
+ **Main changes:**
8
+
9
+ - Support up to 16 output parameters (instead of 8)
10
+
5
11
  ### Koffi 2.1.2
6
12
 
7
13
  **Main changes:**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koffi",
3
- "version": "2.1.2",
4
- "stable": "2.1.2",
3
+ "version": "2.1.3",
4
+ "stable": "2.1.3",
5
5
  "description": "Fast and simple C FFI (foreign function interface) for Node.js",
6
6
  "keywords": [
7
7
  "foreign",
package/src/ffi.cc CHANGED
@@ -684,7 +684,7 @@ static bool ParseClassicFunction(Napi::Env env, Napi::String name, Napi::Value r
684
684
  return false;
685
685
  }
686
686
  if ((param.directions & 2) && ++func->out_parameters >= MaxOutParameters) {
687
- ThrowError<Napi::TypeError>(env, "Functions cannot have more than out %1 parameters", MaxOutParameters);
687
+ ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 output parameters", MaxOutParameters);
688
688
  return false;
689
689
  }
690
690
 
@@ -1031,7 +1031,7 @@ static Napi::Value TranslateVariadicCall(const Napi::CallbackInfo &info)
1031
1031
  return env.Null();
1032
1032
  }
1033
1033
  if (RG_UNLIKELY((param.directions & 2) && ++func.out_parameters >= MaxOutParameters)) {
1034
- ThrowError<Napi::TypeError>(env, "Functions cannot have more than out %1 parameters", MaxOutParameters);
1034
+ ThrowError<Napi::TypeError>(env, "Functions cannot have more than %1 output parameters", MaxOutParameters);
1035
1035
  return env.Null();
1036
1036
  }
1037
1037
 
package/src/ffi.hh CHANGED
@@ -28,7 +28,7 @@ static const int DefaultMaxAsyncCalls = 64;
28
28
 
29
29
  static const int MaxAsyncCalls = 256;
30
30
  static const Size MaxParameters = 32;
31
- static const Size MaxOutParameters = 8;
31
+ static const Size MaxOutParameters = 16;
32
32
  static const Size MaxTrampolines = 16;
33
33
 
34
34
  extern const int TypeInfoMarker;