[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- 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
> support?
I think Gavin Wraith once used MAPM in RiscLua:
http://lua-users.org/lists/lua-l/2006-04/msg00168.html
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.