Remove dependency on marshal and many other async changes
authorShadowNinja <shadowninja@minetest.net>
Tue, 15 Apr 2014 17:41:07 +0000 (13:41 -0400)
committerShadowNinja <shadowninja@minetest.net>
Sun, 27 Apr 2014 20:15:53 +0000 (16:15 -0400)
commit6ab3b4c83856b5c8a1a526c0e4dc55babe79d50d
tree90e64f78dd3ceac12dbb21ac6b045500de0ca603
parentdb4ea4658c58772ee447ff0eff8bb39b692081ec
Remove dependency on marshal and many other async changes

This makes a number of changes:
  * Remove the dependency on marshal by using string.dump and loadstring.
  * Use lua_tolstring rather than having Lua functions pass string lengths to C++.
  * Move lua_api/l_async_events.* to cpp_api/s_async.*, where it belongs.
  * Make AsyncWorkerThread a child of ScriptApiBase, this removes some duplicate functionality.
  * Don't wait for async threads to shut down.  (Is this safe?  Might result in corruption if the thread is writing to a file.)
  * Pop more unused items from the stack
  * Code style fixes
  * Other misc changes
16 files changed:
builtin/async_env.lua
builtin/async_event.lua
src/guiEngine.cpp
src/httpfetch.cpp
src/script/cpp_api/CMakeLists.txt
src/script/cpp_api/s_async.cpp [new file with mode: 0644]
src/script/cpp_api/s_async.h [new file with mode: 0644]
src/script/lua_api/CMakeLists.txt
src/script/lua_api/l_async_events.cpp [deleted file]
src/script/lua_api/l_async_events.h [deleted file]
src/script/lua_api/l_mainmenu.cpp
src/script/lua_api/l_util.cpp
src/script/lua_api/marshall.c [deleted file]
src/script/scripting_game.cpp
src/script/scripting_mainmenu.cpp
src/script/scripting_mainmenu.h