#ifndef _ardour_lua_script_params_h_
#define _ardour_lua_script_params_h_
+#include "lua/luastate.h"
+
#include "ardour/libardour_visibility.h"
#include "ardour/luascripting.h"
LIBARDOUR_API LuaScriptParamList script_params (const LuaScriptInfoPtr&, const std::string &);
LIBARDOUR_API LuaScriptParamList script_params (const std::string &, const std::string &, bool file=true);
+ LIBARDOUR_API LuaScriptParamList script_params (LuaState&, const std::string &, const std::string &, bool file=true);
LIBARDOUR_API void params_to_ref (luabridge::LuaRef *tbl_args, const LuaScriptParamList&);
LIBARDOUR_API void ref_to_params (LuaScriptParamList&, luabridge::LuaRef *tbl_args);
LuaScriptParamList
LuaScriptParams::script_params (const std::string& s, const std::string &pname, bool file)
+{
+ LuaState lua;
+ return LuaScriptParams::script_params (lua, s, pname, file);
+}
+
+LuaScriptParamList
+LuaScriptParams::script_params (LuaState& lua, const std::string& s, const std::string &pname, bool file)
{
LuaScriptParamList rv;
- LuaState lua;
lua_State* L = lua.getState();
lua.sandbox (true);
lua.do_command ("function ardour () end");