47#define SPECHASH_TAG luascript_func
48#define SPECHASH_ASTR_KEY_TYPE
49#define SPECHASH_IDATA_TYPE struct luascript_func *
50#define SPECHASH_IDATA_FREE func_destroy
53#define luascript_func_hash_keys_iterate(phash, key) \
54 TYPED_HASH_KEYS_ITERATE(char *, phash, key)
55#define luascript_func_hash_keys_iterate_end \
82 if (
pfunc->arg_types) {
107#ifndef FREECIV_NDEBUG
114 if (
pfunc->required) {
240 if (
pfunc->required) {
256 pfunc->return_types, args);
298 return pfunc->required;
#define fc_assert_ret(condition)
#define fc_assert_ret_val(condition, val)
void luascript_pop_returns(struct fc_lua *fcl, const char *func_name, int nreturns, enum api_types *preturn_types, va_list args)
void luascript_push_args(struct fc_lua *fcl, int nargs, enum api_types *parg_types, va_list args)
bool luascript_check_function(struct fc_lua *fcl, const char *funcname)
void luascript_log(struct fc_lua *fcl, enum log_level level, const char *format,...)
int luascript_call(struct fc_lua *fcl, int narg, int nret, const char *code)
bool luascript_func_call_valist(struct fc_lua *fcl, const char *func_name, va_list args)
static void func_destroy(struct luascript_func *pfunc)
#define luascript_func_hash_keys_iterate_end
bool luascript_func_check(struct fc_lua *fcl, struct strvec *missing_func_required, struct strvec *missing_func_optional)
void luascript_func_init(struct fc_lua *fcl)
void luascript_func_add(struct fc_lua *fcl, const char *func_name, bool required, int nargs, int nreturns,...)
static struct luascript_func * func_new(bool required, int nargs, enum api_types *parg_types, int nreturns, enum api_types *preturn_types)
bool luascript_func_call(struct fc_lua *fcl, const char *func_name,...)
void luascript_func_add_valist(struct fc_lua *fcl, const char *func_name, bool required, int nargs, int nreturns, va_list args)
bool luascript_func_is_required(struct fc_lua *fcl, const char *func_name)
#define luascript_func_hash_keys_iterate(phash, key)
void luascript_func_free(struct fc_lua *fcl)
#define fc_calloc(n, esz)
void strvec_append(struct strvec *psv, const char *string)
enum api_types * arg_types
enum api_types * return_types