[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to implement this with LuaMacro?
- From: Peter Cawley <lua@...>
- Date: Fri, 22 Jan 2010 12:53:52 +0000
On Fri, Jan 22, 2010 at 12:51 PM, Pavel Shevaev <pacha.shevaev@gmail.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);