@yuuang/ffi-rs-linux-arm64-musl
Advanced tools
Comparing version 1.0.23 to 1.0.24
{ | ||
"name": "@yuuang/ffi-rs-linux-arm64-musl", | ||
"version": "1.0.23", | ||
"version": "1.0.24", | ||
"os": [ | ||
@@ -5,0 +5,0 @@ "linux" |
@@ -370,3 +370,4 @@ # ffi-rs | ||
```cpp | ||
typedef void (*FunctionPointer)(int a, bool b, char *c, char **d, int *e); | ||
typedef void (*FunctionPointer)(int a, bool b, char *c, char **d, int *e, | ||
Person *p); | ||
@@ -379,2 +380,3 @@ extern "C" void callFunction(FunctionPointer func) { | ||
strcpy(c, "Hello, World!"); | ||
// double a = 100.11; | ||
char **stringArray = (char **)malloc(sizeof(char *) * 2); | ||
@@ -387,3 +389,4 @@ stringArray[0] = strdup("Hello"); | ||
i32Array[2] = 303; | ||
func(a, b, c, stringArray, i32Array); | ||
Person *p = createPerson(); | ||
func(a, b, c, stringArray, i32Array, p); | ||
} | ||
@@ -395,4 +398,4 @@ ``` | ||
```js | ||
const func = (a, b, c, d, e) => { | ||
console.log('func params', a, b, c, d, e) | ||
const func = (a, b, c, d, e, f) => { | ||
console.log('func params', a, b, c, d, e, f) | ||
equal(a, 100) | ||
@@ -403,2 +406,3 @@ equal(b, false) | ||
deepStrictEqual(e, [101, 202, 303]) | ||
deepStrictEqual(f, newP) | ||
} | ||
@@ -414,2 +418,13 @@ | ||
arrayConstructor({ type: DataType.I32Array, length: 3 }), | ||
{ | ||
doubleArray: arrayConstructor({ type: DataType.DoubleArray, length: 3 }), | ||
age: DataType.I32, | ||
doubleProps: DataType.Double, | ||
name: DataType.String, | ||
stringArray: arrayConstructor({ type: DataType.StringArray, length: 2 }), | ||
i32Array: arrayConstructor({ type: DataType.I32Array, length: 3 }), | ||
testnum: DataType.I32, | ||
boolTrue: DataType.Boolean, | ||
boolFalse: DataType.Boolean, | ||
} | ||
], | ||
@@ -416,0 +431,0 @@ retType: DataType.Void |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
566911
432