Lua-Objective-C bridge on the iphone

Posted by John Smith on Stack Overflow See other posts from Stack Overflow or by John Smith
Published on 2010-05-09T23:50:33Z Indexed on 2010/05/09 23:58 UTC
Read the original article Hit count: 162

Filed under:
|
|
|
|

I have partially ported the LuaObjCBridge to the iPhone. Most things work but there are still some issues I have to deal with.

There are sections where #defines are defined with-respect-to intel or ppc. Is the ARM chip closer to intel or ppc?

Here is the most relevant section where most of the defines are:

#if defined(__ppc__)||defined(__PPC__)||defined(__powerpc__)
    #define LUA_OBJC_METHODCALL_INT_IS_SHORTEST_INTEGRAL_TYPE
    #define LUA_OBJC_METHODCALL_PASS_FLOATS_IN_MARG_HEADER
    #define LUA_OBJC_POWER_ALIGNMENT
#elif defined(__i386__)||defined(__arm__)       
    #warning LuaObjCBridge is not fully tested for use on Intel chips.
    #define LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY // Use this or the code was crashing for me for structs LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY_LIMIT 
    #define LUA_OBJC_METHODCALL_USE_OBJC_MSGSENDV_FPRET
    #define LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY_LIMIT 8
    #define LUA_OBJC_INTEL_ALIGNMENT
#endif

For now I added arm with i386, but I could be wrong

© Stack Overflow or respective owner

Related posts about lua

Related posts about objective-c