// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz // http://chaosforge.org/ // // This file is part of NV Libraries. // For conditions of distribution and use, see copyright notice in nv.hh #include "nv/lua/lua_object.hh" #include "nv/lua/lua_raw.hh" void nv::lua::detail::push_object ( lua_State *L, object* o ) { if ( o == nullptr ) { lua_pushnil( L ); } else { lua_rawgeti( L, LUA_REGISTRYINDEX, o->get_lua_index() ); } }