mirror of
https://github.com/lune-org/lune.git
synced 2025-04-08 04:20:54 +01:00
14 lines
266 B
C
14 lines
266 B
C
#include<stdio.h>
|
|
|
|
typedef int (*lua_callback_t)(int a, int b);
|
|
|
|
int closure_test(lua_callback_t callback) {
|
|
printf("%p\n", callback);
|
|
printf("%d\n", (*callback)(12, 24));
|
|
|
|
return (*callback)(12, 24) * 2;
|
|
}
|
|
|
|
int closure(int a, int b) {
|
|
return a+b;
|
|
}
|