ffi: test functions for bug #1021
Conflicts: vm/ffi_test.c vm/ffi_test.h Note: Let's add tests in basis/compiler/tests/alien.factor for this.db4
parent
d9271046be
commit
d63a6a20ee
|
@ -333,3 +333,14 @@ struct ulonglong_pair ffi_test_63() {
|
|||
return ullp;
|
||||
}
|
||||
|
||||
void* bug1021_test_1(void* x, int y) {
|
||||
return (void*)((y * y) + (long)x);
|
||||
}
|
||||
|
||||
int bug1021_test_2(int x, char *y, void *z) {
|
||||
return y[0];
|
||||
}
|
||||
|
||||
void* bug1021_test_3(int x) {
|
||||
return (void*)((long)x);
|
||||
}
|
||||
|
|
|
@ -231,3 +231,6 @@ struct ulonglong_pair {
|
|||
|
||||
FACTOR_EXPORT struct ulonglong_pair ffi_test_63();
|
||||
|
||||
FACTOR_EXPORT void* bug1021_test_1(void* x, int y);
|
||||
FACTOR_EXPORT int bug1021_test_2(int x, char* y, void *z);
|
||||
FACTOR_EXPORT void* bug1021_test_3(int x);
|
||||
|
|
Loading…
Reference in New Issue