fix(lua): expose missing functions

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-11-04 21:33:33 -08:00
parent 56344c0541
commit 5a01f167df
4 changed files with 4 additions and 2 deletions

View file

@ -25,7 +25,7 @@ options & to_options(lua_State * L, int idx) {
return *static_cast<options*>(luaL_checkudata(L, idx, options_mt));
}
static int push_options(lua_State * L, options const & o) {
int push_options(lua_State * L, options const & o) {
void * mem = lua_newuserdata(L, sizeof(options));
new (mem) options(o);
luaL_getmetatable(L, options_mt);

View file

@ -11,5 +11,6 @@ class options;
void open_options(lua_State * L);
bool is_options(lua_State * L, int idx);
options & to_options(lua_State * L, int idx);
int push_options(lua_State * L, options const & o);
}
#endif

View file

@ -16,7 +16,7 @@ Author: Leonardo de Moura
namespace lean {
constexpr char const * sexpr_mt = "sexpr.mt";
static int push_sexpr(lua_State * L, sexpr const & e) {
int push_sexpr(lua_State * L, sexpr const & e) {
void * mem = lua_newuserdata(L, sizeof(sexpr));
new (mem) sexpr(e);
luaL_getmetatable(L, sexpr_mt);

View file

@ -11,5 +11,6 @@ class sexpr;
void open_sexpr(lua_State * L);
bool is_sexpr(lua_State * L, int idx);
sexpr & to_sexpr(lua_State * L, int idx);
int push_sexpr(lua_State * L, sexpr const & e);
}
#endif