Commit Graph

8 Commits

Author SHA1 Message Date
Thomas Watson e66d2a1495 AP_Scripting: remove redundant memsets
Matches current generator behavior.
2024-07-30 09:55:25 +10:00
Thomas Watson 837b17e82e AP_Scripting: more intelligently manage Lua stack
The Lua stack is guaranteed to have at least LUA_MINSTACK (default 20)
slots upon entry to C. Check to see if we might need more than that
minimum and only in that case call the function to check and resize the
stack. In virtually all cases the check can then be optimized away.

Additionally remove the redundant "Out of stack" message. Lua already
says "stack overflow" and a null message is valid.

Saves ~330B.
2024-07-30 09:55:25 +10:00
Andrew Tridgell a2459c6e61 AP_Scripting: use NEW_NOTHROW for new(std::nothrow) 2024-06-04 09:20:21 +10:00
Peter Barker d519ab604e AP_Scripting: allow AP_SCRIPTING_ENABLED to come from hwdef files 2023-06-09 16:10:52 +10:00
Iampete1 41e36e3128 AP_Scripting: Parameter helper: allow optional param name in constructior 2022-09-14 13:59:40 +10:00
Iampete1 918b8a1a9c AP_Scripting: add binding and helper to get old params 2022-02-15 10:05:23 +11:00
Iampete1 37db2c5d4d AP_Scripting: Parameter helper: add configured and set defualt 2022-01-23 07:00:56 +11:00
Peter Hall 9dae370356 AP_Scripting: add param accesss helper 2021-01-05 10:55:36 +11:00