Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on marshal and push the Lua error handler only once #1226

Closed
wants to merge 4 commits into from

Conversation

ShadowNinja
Copy link
Member

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.
  • Only push the error handler once per Lua stack by storing it's index in ScriptApiBase::m_errorhandler.
  • Code style fixes
  • Pop some more items from the stack
  • Other misc changes

I am unsure of whether the check for broken LuaJIT versions is still relevant, as string.dump may not be broken on those versions.

@ShadowNinja ShadowNinja changed the title [WIP] Remove dependency on marshal and push the Lua error handler only once Remove dependency on marshal and push the Lua error handler only once Apr 24, 2014
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
@ShadowNinja
Copy link
Member Author

db4ea46 6ab3b4c f2b93b7 0d6e4ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant