Browse Source

AP_Scripting: Add missing const in member functions

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
c415-sdk
Patrick José Pereira 4 years ago committed by Andrew Tridgell
parent
commit
bffda55639
  1. 2
      libraries/AP_Scripting/lua_repl.cpp
  2. 2
      libraries/AP_Scripting/lua_scripts.h

2
libraries/AP_Scripting/lua_repl.cpp

@ -44,7 +44,7 @@ static int msghandler(lua_State *L) { @@ -44,7 +44,7 @@ static int msghandler(lua_State *L) {
** Interface to 'lua_pcall', which sets appropriate message function
** and C-signal handler. Used to run all chunks.
*/
int lua_scripts::docall(lua_State *L, int narg, int nres) {
int lua_scripts::docall(lua_State *L, int narg, int nres) const {
int status;
int base = lua_gettop(L) - narg; /* function index */
lua_rawgeti(L, LUA_REGISTRYINDEX, sandbox_ref);

2
libraries/AP_Scripting/lua_scripts.h

@ -99,7 +99,7 @@ private: @@ -99,7 +99,7 @@ private:
int pushline(lua_State *L, int firstline);
int incomplete(lua_State *L, int status);
const char * get_prompt(lua_State *L, int firstline);
int docall(lua_State *L, int narg, int nres);
int docall(lua_State *L, int narg, int nres) const;
int sandbox_ref;
script_info *scripts; // linked list of scripts to be run, sorted by next run time (soonest first)

Loading…
Cancel
Save