cinvoke-svn
[Top][All Lists]
Advanced

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

[cinvoke-svn] r37 - trunk/cinvoke/bindings/lua


From: will
Subject: [cinvoke-svn] r37 - trunk/cinvoke/bindings/lua
Date: 21 Jun 2006 01:34:34 -0400

Author: will
Date: 2006-06-21 01:34:33 -0400 (Wed, 21 Jun 2006)
New Revision: 37

Modified:
   trunk/cinvoke/bindings/lua/cinvoke_lua.c
   trunk/cinvoke/bindings/lua/test.lua
Log:
small lua fix


Modified: trunk/cinvoke/bindings/lua/cinvoke_lua.c
===================================================================
--- trunk/cinvoke/bindings/lua/cinvoke_lua.c    2006-06-21 05:18:24 UTC (rev 36)
+++ trunk/cinvoke/bindings/lua/cinvoke_lua.c    2006-06-21 05:34:33 UTC (rev 37)
@@ -450,6 +450,7 @@
 
        lua_getfield(l, 1, "ud");
        fs = lua_touserdata(l, -1);
+       lua_pop(l, 1);
 
        lua_getfield(l, 1, "return");
        index = lua_gettop(l);
@@ -576,6 +577,7 @@
 }
 
 int luaopen_cinvoke_lua(lua_State *l) {
+       // XXX might want to put these in the cinv class to prevent typo errors
        declbasic(l, "Cchar", CINV_T_CHAR, 'c', 1);
        declbasic(l, "Cshort", CINV_T_SHORT, 's', sizeof(short));
        declbasic(l, "Cint", CINV_T_INT, 'i', sizeof(int));

Modified: trunk/cinvoke/bindings/lua/test.lua
===================================================================
--- trunk/cinvoke/bindings/lua/test.lua 2006-06-21 05:18:24 UTC (rev 36)
+++ trunk/cinvoke/bindings/lua/test.lua 2006-06-21 05:34:33 UTC (rev 37)
@@ -2,7 +2,7 @@
 
 libc = clibrary.new("libc.so.6")
 
-getpass = libc:get_function(Cstring, "getpass", CString)
+getpass = libc:get_function(Cstring, "getpass", Cstring)
 
 pass = getpass("Enter a password: ")
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]