Commits

Elisée Maurer committed 86c8b3b

Re-apply changes made for CraftStudio

Comments (0)

Files changed (5)

LuaInterface/CheckType.cs

             {
                 if (luatype == LuaTypes.LUA_TTABLE)
                     return extractValues[runtimeHandleValue];
+                else if (luatype == LuaTypes.LUA_TNIL)
+                    return extractNetObject; // tkopal - silently convert nil to a null table
             }
             else if (paramType == typeof(LuaUserData))
             {

lua-5.1.5/Release/lua51.dll

Binary file modified.

lua-5.1.5/src/lbaselib.c

     lua_pop(L, 1);  /* pop result */
   }
   fputs("\n", stdout);
+  
+  // elisee - Flush stdout so that it updates in real-time
+  fflush(stdout);
   return 0;
 }
 

lua-5.1.5/src/linit.c

 #include "lauxlib.h"
 
 
+/* elisee - Some libs disabled to prevent messing with the system too much */
 static const luaL_Reg lualibs[] = {
   {"", luaopen_base},
-  {LUA_LOADLIBNAME, luaopen_package},
+  //{LUA_LOADLIBNAME, luaopen_package},
   {LUA_TABLIBNAME, luaopen_table},
-  {LUA_IOLIBNAME, luaopen_io},
+  //{LUA_IOLIBNAME, luaopen_io},
   {LUA_OSLIBNAME, luaopen_os},
   {LUA_STRLIBNAME, luaopen_string},
   {LUA_MATHLIBNAME, luaopen_math},
-  {LUA_DBLIBNAME, luaopen_debug},
+  //{LUA_DBLIBNAME, luaopen_debug},
   {NULL, NULL}
 };
 

lua-5.1.5/src/loslib.c

   exit(luaL_optint(L, 1, EXIT_SUCCESS));
 }
 
+/* elisee - Some functions disabled to prevent messing with the system too much */
 static const luaL_Reg syslib[] = {
   {"clock",     os_clock},
   {"date",      os_date},
   {"difftime",  os_difftime},
-  {"execute",   os_execute},
+  /*{"execute",   os_execute},
   {"exit",      os_exit},
   {"getenv",    os_getenv},
   {"remove",    os_remove},
   {"rename",    os_rename},
-  {"setlocale", os_setlocale},
+  {"setlocale", os_setlocale},*/
   {"time",      os_time},
-  {"tmpname",   os_tmpname},
+  /*{"tmpname",   os_tmpname},*/
   {NULL, NULL}
 };