UDF iterate

This commit is contained in:
John Kerl 2016-09-05 10:42:50 -04:00
parent 4378317c28
commit 1069bc51be
3 changed files with 11 additions and 8 deletions

View file

@ -19,6 +19,10 @@
// xxx rework:
// See comments in rval_evaluators.h
// xxx morph these into methods:
static void check_arity_with_report(function_lookup_t fcn_lookup_table[], char* function_name,
int user_provided_arity);
// xxx rename:
static rval_evaluator_t* rval_evaluator_alloc_from_zary_func_name(char* function_name);
@ -258,7 +262,7 @@ static arity_check_t check_arity(function_lookup_t lookup_table[], char* functio
}
}
void check_arity_with_report(function_lookup_t fcn_lookup_table[], char* function_name,
static void check_arity_with_report(function_lookup_t fcn_lookup_table[], char* function_name,
int user_provided_arity)
{
int arity = -1;
@ -361,7 +365,7 @@ void fmgr_list_all_functions_raw(fmgr_t* pfmgr, FILE* output_stream) {
}
// ================================================================
rval_evaluator_t* rval_evaluator_alloc_from_operator_or_function(mlr_dsl_ast_node_t* pnode,
rval_evaluator_t* fmgr_alloc_from_operator_or_function(fmgr_t* pfmgr, mlr_dsl_ast_node_t* pnode,
int type_inferencing, int context_flags, function_lookup_t* fcn_lookup_table)
{

View file

@ -47,14 +47,12 @@ void fmgr_free(fmgr_t* pfmgr);
void fmgr_install_UDF(fmgr_t* pfmgr, char* name, rval_evaluator_t* pevaluator);
rval_evaluator_t* fmgr_alloc_evaluator(fmgr_t* pfmgr, char* name);
// xxx morph these into methods:
void fmgr_list_functions(fmgr_t* pfmgr, FILE* output_stream, char* leader);
// Pass function_name == NULL to get usage for all functions:
void fmgr_function_usage(fmgr_t* pfmgr, FILE* output_stream, char* function_name);
void fmgr_list_all_functions_raw(fmgr_t* pfmgr, FILE* output_stream);
void check_arity_with_report(function_lookup_t fcn_lookup_table[], char* function_name,
int user_provided_arity);
rval_evaluator_t* rval_evaluator_alloc_from_operator_or_function(mlr_dsl_ast_node_t* pnode,
int type_inferencing, int context_flags, function_lookup_t* fcn_lookup_table);
rval_evaluator_t* fmgr_alloc_from_operator_or_function(fmgr_t* pfmgr, mlr_dsl_ast_node_t* pnode,
int type_inferencing, int context_flags, function_lookup_t* fcn_lookup_table); // xxx elim tbl arg
#endif // FUNCTION_MANAGER_H

View file

@ -86,7 +86,8 @@ rval_evaluator_t* rval_evaluator_alloc_from_ast_aux(mlr_dsl_ast_node_t* pnode,
} else {
return rval_evaluator_alloc_from_operator_or_function(pnode, type_inferencing, context_flags, fcn_lookup_table);
return fmgr_alloc_from_operator_or_function(NULL, pnode, type_inferencing, context_flags,
fcn_lookup_table); // xxx rework ptr args
}
}