[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Help: Has someone knows how to replace lua_Number with a C++ class?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 21 May 2012 09:09:29 -0300
> I just have a idea that replace lua_Number as a GMP number or MAPM
> number, is that possible? I mean, A lua with native big number
I think Gavin Wraith once used MAPM in RiscLua:
I haven't tried this yet but it shoud be reasonably simple due to the
existence of the luai_num* macros in luaconf.h. However, I expect that
there will be some issues with memory management because Lua does not
garbage collect numbers and so you cannot tell the underlying library
to free big numbers.
Anyway, I'd like to hear about your efforts.