[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Converting C Code to Lua
- From: Pan Shi Zhu <pan.shizhu@...>
- Date: Tue, 6 Apr 2010 16:51:52 +0800
On Sat, Apr 3, 2010 at 12:35 PM, Vafa Khalighi <email@example.com> wrote:
>> In what sense? Do you want to use your compiled C function in Lua, or do
>> you want to convert a C procedure into its equivalent in Lua? If the latter,
>> it depends on how complex the code in question is: mathematic operations can
>> be copied and pasted with no changes, but things such as pointer arithmetic
>> will require heavy re-architecting of the code's design.
> Thanks. I meant the latter. It seems I have got to rewrite them then.
If you don't need cross-platform, then it may be better to write some
wrapper functions and compile your c code into a lua module.
IMO you need to translate c code into lua only if you need to run your
program on different cpu (intel/arm/mips) or different OSs