[vala] lua: add bindings for lua reference system



commit 343033c93e82109b55937d7333e4cc5c338a36d1
Author: Joshua Simmons <simmons 44 gmail com>
Date:   Thu Jul 15 14:44:29 2010 -0700

    lua: add bindings for lua reference system
    
    Fixes bug 624411.

 vapi/lua.vapi |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/vapi/lua.vapi b/vapi/lua.vapi
index 71c0813..c4791c3 100644
--- a/vapi/lua.vapi
+++ b/vapi/lua.vapi
@@ -38,6 +38,15 @@ namespace Lua {
 	// option for multiple returns in `lua_pcall' and `lua_call'
 	public const int MULTRET;
 
+	[CCode (cheader_filename = "lauxlib.h")]
+	public enum Reference
+	{
+		[CCode (cname = "LUA_REFNIL")]
+		NIL,
+		[CCode (cname = "LUA_NOREF")]
+		NONE
+	}
+
 	// pseudo-indices
 
 	[CCode (cheader_filename = "lua.h")]
@@ -394,5 +403,9 @@ namespace Lua {
 		public bool do_file (string filename);
 		[CCode (cname = "luaL_dostring", cheader_filename = "lauxlib.h")]
 		public bool do_string (string str);
+		[CCode (cname = "luaL_ref", cheader_filename = "lauxlib.h")]
+		public int reference (int t);
+		[CCode (cname = "luaL_unref", cheader_filename = "lauxlib.h")]
+		public void unreference (int t);
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]