[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to implement this with LuaMacro?
- From: Pavel Shevaev <pacha.shevaev@...>
- Date: Fri, 22 Jan 2010 16:02:08 +0300
On Fri, Jan 22, 2010 at 3:53 PM, Peter Cawley <firstname.lastname@example.org> wrote:
> On Fri, Jan 22, 2010 at 12:51 PM, Pavel Shevaev <email@example.com> wrote:
>> While I know how to require 'macro'
>> library before any parsing in cli mode(using -l switch) I don't know
>> how to achieve it using Lua C api.
> You can just do a literal translation of require"macro" into the C API:
> lua_getglobal(L, "require");
> lua_pushliteral(L, "macro");
> lua_call(L, 1, 0);
It worked like a charm. Thank you all guys for being nice with a n00bie ;)
Best regards, Pavel