liquid_feedback_frontend
changeset 1643:d0a85bdf78ae
merge
author | bsw |
---|---|
date | Tue Feb 09 21:09:47 2021 +0100 (2021-02-09) |
parents | 45287f1037fb ab837b075cf7 |
children | 678c7146f27b |
files |
line diff
1.1 --- a/lib/mldap/mldap.c Tue Feb 09 21:07:16 2021 +0100 1.2 +++ b/lib/mldap/mldap.c Tue Feb 09 21:09:47 2021 +0100 1.3 @@ -79,7 +79,7 @@ 1.4 lua_State *L, // pointer to lua_State variable 1.5 int idx, // stack index of the table containing the named arguments 1.6 const char *argname, // name of the argument 1.7 - int mandatory // if not 0, then the argument is mandatory and an error is raised if it isn't found 1.8 + bool mandatory // if not 0, then the argument is mandatory and an error is raised if it isn't found 1.9 1.10 // leaves the string as new element on top of the stack 1.11 ) { 1.12 @@ -114,8 +114,8 @@ 1.13 lua_State *L, // pointer to lua_State variable 1.14 int idx, // stack index of the table containing the named arguments 1.15 const char *argname, // name of the argument 1.16 - int mandatory, // if not 0, then the argument is mandatory and an error is raised if it isn't found 1.17 - lua_Number default_value // default value to return, if the argument is not mandatory and nil or false 1.18 + bool mandatory, // if not 0, then the argument is mandatory and an error is raised if it isn't found 1.19 + lua_Number default_value // default value to return, if the argument is not mandatory and nil 1.20 1.21 // opposed to 'mldap_get_named_string_arg', this function leaves no element on the stack 1.22 ) { 1.23 @@ -145,6 +145,8 @@ 1.24 } 1.25 1.26 // remove unnecessary element from stack (not needed to avoid garbage collection): 1.27 + lua_pop(L, 1); 1.28 + 1.29 return value; 1.30 1.31 // leaves no new elements on the stack 1.32 @@ -157,7 +159,7 @@ 1.33 lua_State *L, // pointer to lua_State variable 1.34 int idx, // stack index of the table containing the named arguments 1.35 const char *argname, // name of the argument 1.36 - int mandatory, // if not 0, then the argument is mandatory and an error is raised if it isn't found 1.37 + bool mandatory, // if not 0, then the argument is mandatory and an error is raised if it isn't found 1.38 bool default_value // default value to return, if the argument is not mandatory and nil 1.39 1.40 // opposed to 'mldap_get_named_string_arg', this function leaves no element on the stack