Skip to content
Snippets Groups Projects
Commit 1fac8d04 authored by Luigi Scarso's avatar Luigi Scarso
Browse files

revert to the old luaffi (trunk).

parent bd24a213
No related branches found
No related tags found
No related merge requests found
...@@ -217,7 +217,7 @@ cfunction compile_callback(lua_State* L, int fidx, int ct_usr, const struct ctyp ...@@ -217,7 +217,7 @@ cfunction compile_callback(lua_State* L, int fidx, int ct_usr, const struct ctyp
| load32 r3, mt | load32 r3, mt
| mov r2, #0 // -1 - ct_usr | mov r2, #0 // -1 - ct_usr
| mvn r1, #1 // -2 - val | mvn r1, #1 // -2 - val
| lcall extern check_typed_pointer | lcall extern to_typed_pointer
| mov DATA, r0 | mov DATA, r0
| mvn r1, #3 // -4 - remove 3 (upval table, ret val, usr value) | mvn r1, #3 // -4 - remove 3 (upval table, ret val, usr value)
| lcall extern lua_settop | lcall extern lua_settop
...@@ -235,7 +235,7 @@ cfunction compile_callback(lua_State* L, int fidx, int ct_usr, const struct ctyp ...@@ -235,7 +235,7 @@ cfunction compile_callback(lua_State* L, int fidx, int ct_usr, const struct ctyp
| load32 r3, mt | load32 r3, mt
| mvn r2, #0 // -1 - ct_usr | mvn r2, #0 // -1 - ct_usr
| mvn r1, #1 // -2 - val | mvn r1, #1 // -2 - val
| lcall extern check_enum | lcall extern to_enum
| mov DATA, r0 | mov DATA, r0
| mvn r1, #3 // -4 - remove 3 (upval table, ret val, usr value) | mvn r1, #3 // -4 - remove 3 (upval table, ret val, usr value)
| lcall extern lua_settop | lcall extern lua_settop
...@@ -271,7 +271,7 @@ cfunction compile_callback(lua_State* L, int fidx, int ct_usr, const struct ctyp ...@@ -271,7 +271,7 @@ cfunction compile_callback(lua_State* L, int fidx, int ct_usr, const struct ctyp
case INTPTR_TYPE: case INTPTR_TYPE:
| mvn r1, #0 // -1 | mvn r1, #0 // -1
| lcall extern check_uintptr | lcall extern check_intptr
goto single; goto single;
case FLOAT_TYPE: case FLOAT_TYPE:
...@@ -393,11 +393,11 @@ void compile_function(lua_State* L, cfunction func, int ct_usr, const struct cty ...@@ -393,11 +393,11 @@ void compile_function(lua_State* L, cfunction func, int ct_usr, const struct cty
| mov r0, L_ARG | mov r0, L_ARG
if (mt->pointers || mt->is_reference) { if (mt->pointers || mt->is_reference) {
| bl extern check_typed_pointer | bl extern to_typed_pointer
} else if (mt->type == FUNCTION_PTR_TYPE) { } else if (mt->type == FUNCTION_PTR_TYPE) {
| bl extern check_typed_cfunction | bl extern to_typed_function
} else if (mt->type == ENUM_TYPE) { } else if (mt->type == ENUM_TYPE) {
| bl extern check_enum | bl extern to_enum
} }
| str r0, [DATA], #4 | str r0, [DATA], #4
...@@ -456,7 +456,7 @@ void compile_function(lua_State* L, cfunction func, int ct_usr, const struct cty ...@@ -456,7 +456,7 @@ void compile_function(lua_State* L, cfunction func, int ct_usr, const struct cty
break; break;
case INTPTR_TYPE: case INTPTR_TYPE:
| lcall extern check_uintptr | lcall extern check_intptr
| str r0, [DATA], #4 | str r0, [DATA], #4
break; break;
......
...@@ -579,19 +579,19 @@ static const char *const extnames[] = { ...@@ -579,19 +579,19 @@ static const char *const extnames[] = {
"push_float", "push_float",
"lua_pushnumber", "lua_pushnumber",
"lua_callk", "lua_callk",
"check_typed_pointer", "to_typed_pointer",
"lua_settop", "lua_settop",
"check_enum", "to_enum",
"check_uint32", "check_uint32",
"check_int32", "check_int32",
"check_uint64", "check_uint64",
"check_int64", "check_int64",
"check_uintptr", "check_intptr",
"check_float", "check_float",
"check_double", "check_double",
"lua_gettop", "lua_gettop",
"luaL_error", "luaL_error",
"check_typed_cfunction", "to_typed_function",
"unpack_varargs_stack", "unpack_varargs_stack",
"SetLastError", "SetLastError",
"FUNCTION", "FUNCTION",
......
...@@ -148,7 +148,7 @@ static void (lua_remove)(lua_State *L, int idx) { ...@@ -148,7 +148,7 @@ static void (lua_remove)(lua_State *L, int idx) {
/* See ffi.c: replace luaopen_ffi with a stub */ /* See ffi.c: replace luaopen_ffi with a stub */
/* if FFI_ENABLE_LUATEX_INTERFACE is not defined */ /* if FFI_ENABLE_LUATEX_INTERFACE is not defined */
#if (defined ARCH_X86 || defined ARCH_X64 ||defined ARCH_ARM) && (defined OS_CE || defined OS_WIN || defined OS_LINUX || defined OS_BSD || defined OS_POSIX || defined OS_OSX) #if (defined ARCH_X86 || defined ARCH_X64) && (defined OS_CE || defined OS_WIN || defined OS_LINUX || defined OS_BSD || defined OS_POSIX || defined OS_OSX)
#define FFI_ENABLE_LUATEX_INTERFACE #define FFI_ENABLE_LUATEX_INTERFACE
#endif #endif
/* for the moment */ /* for the moment */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment