From 575615c5a41592f3701853f90e1762c6dce4abe4 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Fri, 12 Jan 2018 18:36:46 +0330 Subject: you can now run objects that are loaded into bruiser from a shared library from lua. right now very simple examples work. i have to figure out how to handles runtime pointer recasts. --- bfd/test/test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bfd/test') diff --git a/bfd/test/test.c b/bfd/test/test.c index 7b1e01c..fa9f74d 100644 --- a/bfd/test/test.c +++ b/bfd/test/test.c @@ -6,7 +6,8 @@ int myfunc3(void) {return 3;} int myfunc4(void) {return 4;} int myfunc5(void) {return 5;} int myfunc6(void) {return 6;} -int myfunc7(int a, int b) {return a + b;} +int add2(int a, int b) {return a + b;} +int sub2(int a, int b) {return a - b;} int myvar1 = 1; int myvar2 = 2; @@ -15,7 +16,7 @@ int myvar4 = 4; int main(int argc, char** argv) { int sum; - sum = myfunc7(10, 20); + sum = add2(10, 20); printf("i live!\n"); - return myfunc7(10, 20); + return sub2(20, 10); } -- cgit v1.2.3