views:

254

answers:

1

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

+1  A: 

I can offer you the link to [objc explain]: objc_msgSend_fpret which should give you a bit understanding what some of the stuff means, like LUA_OBJC_METHODCALL_USE_OBJC_MSGSENDV_FPRET.

catlan