forked from lune-org/lune
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use camel case naming on ffi test (lune-org#243)
- Loading branch information
Showing
9 changed files
with
83 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
#include<stdio.h> | ||
|
||
typedef int (*lua_callback_t)(int, int); | ||
typedef void (*lua_hello_world_callback_t)(); | ||
|
||
int closure(lua_callback_t lua_closure) { | ||
typedef int (*lua_closure_t)(int, int); | ||
int call_closure(lua_closure_t lua_closure) { | ||
return lua_closure(12, 24) * 2; | ||
} | ||
|
||
void hello_world(lua_hello_world_callback_t lua_closure) { | ||
typedef void (*lua_hello_world_t)(); | ||
void call_hello_world(lua_hello_world_t lua_closure) { | ||
lua_closure(); | ||
} | ||
|
||
typedef int (*lua_closure_with_pointer_t)(int, int*); | ||
int call_closure_with_pointer(lua_closure_with_pointer_t lua_closure) { | ||
int b = 24; | ||
return lua_closure(12, &b) * 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters