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
Björn Lindqvist 2014-08-07 00:27:25 +02:00 committed by Doug Coleman
parent d9271046be
commit d63a6a20ee
2 changed files with 14 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);