Freeciv-3.2
|
#include "support.h"
Go to the source code of this file.
Functions | |
void | luascript_func_init (struct fc_lua *fcl) |
void | luascript_func_free (struct fc_lua *fcl) |
bool | luascript_func_check (struct fc_lua *fcl, struct strvec *missing_func_required, struct strvec *missing_func_optional) |
void | luascript_func_add_valist (struct fc_lua *fcl, const char *func_name, bool required, int nargs, int nreturns, va_list args) |
void | luascript_func_add (struct fc_lua *fcl, const char *func_name, bool required, int nargs, int nreturns,...) |
bool | luascript_func_call_valist (struct fc_lua *fcl, const char *func_name, va_list args) |
bool | luascript_func_call (struct fc_lua *fcl, const char *func_name,...) |
bool | luascript_func_is_required (struct fc_lua *fcl, const char *func_name) |
void luascript_func_add | ( | struct fc_lua * | fcl, |
const char * | func_name, | ||
bool | required, | ||
int | nargs, | ||
int | nreturns, | ||
... | |||
) |
Add a lua function.
Definition at line 178 of file luascript_func.c.
Referenced by script_server_functions_define().
void luascript_func_add_valist | ( | struct fc_lua * | fcl, |
const char * | func_name, | ||
bool | required, | ||
int | nargs, | ||
int | nreturns, | ||
va_list | args | ||
) |
Add a lua function.
Definition at line 130 of file luascript_func.c.
Referenced by luascript_func_add().
Call a lua function; return value is TRUE if no errors occurred, otherwise FALSE.
Example call to the lua function 'user_load()': success = luascript_func_call(L, "user_load", pconn, &password);
Definition at line 269 of file luascript_func.c.
Call a lua function; return value is TRUE if no errors occurred, otherwise FALSE.
Example call to the lua function 'user_load()': success = luascript_func_call(L, "user_load", pconn, &password);
Definition at line 220 of file luascript_func.c.
Referenced by luascript_func_call(), script_fcdb_call(), and script_server_call().
bool luascript_func_check | ( | struct fc_lua * | fcl, |
struct strvec * | missing_func_required, | ||
struct strvec * | missing_func_optional | ||
) |
Test if all function are defined. If it fails (return value FALSE), the missing functions are listed in 'missing_func_required' and 'missing_func_optional'.
Definition at line 94 of file luascript_func.c.
Free the function definitions.
Definition at line 192 of file luascript_func.c.
Referenced by luascript_destroy().
Initialize the structures needed to save functions definitions.
Definition at line 203 of file luascript_func.c.
Referenced by script_fcdb_init(), and script_server_init().