1
0
Fork 0
Commit Graph

125 Commits

Author SHA1 Message Date
Tycho b480148116 Fixed warnings 2014-03-07 10:26:07 -08:00
madmaxoft ecfe17b096 cLuaState: Made public the GetStackValue() functions. 2014-03-04 21:55:24 +01:00
andrew 68b75f7b7a Manually exported g_Block tables 2014-03-02 11:12:29 +02:00
madmaxoft aaddc98b46 Attempted fix for several GCC warnings. 2014-02-26 21:37:38 +01:00
madmaxoft 865ae82114 Add Lua plugin path to package.path and .cpath.
Fixes #693.
2014-02-17 23:12:46 +01:00
madmaxoft 33c84aaa4d Added cLuaState::CheckParamFunctionOrNil().
Also fixed error reporting for the two function-checking functions.
2014-02-11 15:03:35 +01:00
madmaxoft b41bb3bb44 Fixed nested plugin function calls. 2014-02-11 08:52:14 +01:00
madmaxoft 589a4839df cLuaState: Stack traces don't include ghost 0-th element. 2014-02-10 22:44:56 +01:00
madmaxoft 310a25c456 cLuaState::cRef can be unbound and re-bound.
This will allow us to store Lua references as member variables in classes and initialize those later than in the constructor.
2014-02-09 18:39:22 +01:00
madmaxoft 010e64be11 Removed a useless check in cLuaState. 2014-02-04 22:24:03 +01:00
madmaxoft 3dc1452790 Fixed calling plugins with userdata params. 2014-02-04 14:26:36 +01:00
madmaxoft 1dbfd7eb76 Removed a leftover debug message. 2014-02-04 11:37:34 +01:00
madmaxoft 69c85e5169 Fixed error handling in cPluginManager:CallPlugin() API.
Fixed: When the called function malfunctioned, the entire plugin's call was aborted.
2014-02-04 10:29:10 +01:00
madmaxoft aa19f4fd04 Improved error resistance in cPluginManager:CallPlugin().
Fixed: If the call failed, all the next plugin calls would fail as well.
2014-02-04 09:18:32 +01:00
madmaxoft b61a74d6a2 Lua: Fixed an error in table-functions callbacks. 2014-01-29 22:56:38 +01:00
madmaxoft 2a018cfa49 Implemented cPluginManager:CallPlugin() API.
This function supersedes cPlugin:Call(), is safer to use in regards to multithreading and once again removes the need for the cPlugin class being exported at all.
2014-01-21 23:00:35 +01:00
madmaxoft 4a01879911 cLuaState can now check function params. 2014-01-19 23:45:26 +01:00
madmaxoft 332c1c59eb cCreeper is no longer available in API.
Has been replaced by cMonster.
2014-01-13 17:25:16 +01:00
madmaxoft 023ba17688 Lua errors display stack trace.
Fixes #418.
2014-01-11 23:10:40 +01:00
madmaxoft b2b7e45757 Removed internal methods from public cLuaState interface.
PushFunction(), CallFunction() and GetReturn() are not to be called independently, but rather only by using the Call() templated overrides.
Push() needs to be left in the public part, it is used for pushing results in the ManualBindings.

Preparation for #418.
2014-01-11 22:51:10 +01:00
madmaxoft bcd41dc1aa LuaState can push strings with embedded NULs.
This also marginally improves performance, since a strlen() isn't called (inside lua_pushstring()), the string length is stored in the AString object directly.
2014-01-07 17:07:48 +01:00
STRWarrior 020a8b457d implemented the recommendations Xoft gave. 2013-12-31 14:53:10 +01:00
madmaxoft 1cf6502be2 Made cmake compilation possible on Windows. 2013-12-27 11:51:08 +01:00
madmaxoft 4608beb3c6 Fixed tolua++ compilation.
Duplicate files, wrong includes, const-incorrect code...
2013-12-08 18:24:56 +01:00
madmaxoft 044fd237b6 Moved bindings-related to a Bindings subfolder.
Ref.: #407
2013-12-08 12:17:54 +01:00