consistent lua binding name (nil is a reserved word in lua)
[ardour.git] / libs / ardour / lua_api.cc
index a21dbfb3eaec7524fd340b5868b6e5d5aa4c9ba9..8a52a2ccb787f8953418ce6eadb1ffc709d88bd0 100644 (file)
@@ -36,6 +36,31 @@ using namespace ARDOUR;
 using namespace PBD;
 using namespace std;
 
+int
+ARDOUR::LuaAPI::datatype_ctor_null (lua_State *L)
+{
+       DataType dt (DataType::NIL);
+       luabridge::Stack <DataType>::push (L, dt);
+       return 1;
+}
+
+int
+ARDOUR::LuaAPI::datatype_ctor_audio (lua_State *L)
+{
+       DataType dt (DataType::AUDIO);
+       // NB luabridge will copy construct the object and manage lifetime.
+       luabridge::Stack <DataType>::push (L, dt);
+       return 1;
+}
+
+int
+ARDOUR::LuaAPI::datatype_ctor_midi (lua_State *L)
+{
+       DataType dt (DataType::MIDI);
+       luabridge::Stack <DataType>::push (L, dt);
+       return 1;
+}
+
 boost::shared_ptr<Processor>
 ARDOUR::LuaAPI::new_luaproc (Session *s, const string& name)
 {