Commit 9de5c2f7 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

make this inline. (function_call_with_exprs) : load stub _after_ we get

2006-11-19  Jody Goldberg <jody@gnome.org>

	* src/func.c (gnm_func_load_if_stub) : make this inline.
	(function_call_with_exprs) : load stub _after_ we get the function def
	  Fixes crash on calling any vararg function.
parent ae6059ed
2006-11-19 Jody Goldberg <jody@gnome.org>
* src/func.c (gnm_func_load_if_stub) : make this inline.
(function_call_with_exprs) : load stub _after_ we get the function def
Fixes crash on calling any vararg function.
2006-11-19 Morten Welinder <terra@gnome.org>
* configure.in: Post-release bump.
......
......@@ -56,6 +56,13 @@ functions_shutdown (void)
global_symbol_table = NULL;
}
inline void
gnm_func_load_if_stub (GnmFunc *func)
{
if (func->fn_type == GNM_FUNC_TYPE_STUB)
gnm_func_load_stub (func);
}
static void
copy_hash_table_to_ptr_array (gpointer key, gpointer value, gpointer array)
{
......@@ -538,13 +545,6 @@ error_function_no_full_info (GnmFuncEvalInfo *ei,
return value_new_error (ei->pos, _("Function implementation not available."));
}
void
gnm_func_load_if_stub (GnmFunc *func)
{
if (func->fn_type == GNM_FUNC_TYPE_STUB)
gnm_func_load_stub (func);
}
void
gnm_func_load_stub (GnmFunc *func)
{
......@@ -891,8 +891,7 @@ function_def_count_args (GnmFunc const *fn_def,
* Return value: the type of the argument
**/
char
function_def_get_arg_type (GnmFunc const *fn_def,
int arg_idx)
function_def_get_arg_type (GnmFunc const *fn_def, int arg_idx)
{
char const *ptr;
......@@ -1037,12 +1036,12 @@ function_call_with_exprs (GnmFuncEvalInfo *ei, GnmExprEvalFlags flags)
g_return_val_if_fail (ei != NULL, NULL);
g_return_val_if_fail (ei->func_call != NULL, NULL);
gnm_func_load_if_stub ((GnmFunc *)fn_def);
argc = ei->func_call->argc;
argv = ei->func_call->argv;
fn_def = ei->func_call->func;
gnm_func_load_if_stub ((GnmFunc *)fn_def);
/* Functions that deal with ExprNodes */
if (fn_def->fn_type == GNM_FUNC_TYPE_NODES)
return fn_def->fn.nodes (ei, argc, argv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment