Commit 565f5e51 authored by Ariel Rios's avatar Ariel Rios Committed by Ariel Rios

We now use func_def_count_arg to get the count number. Count variable was

1999-12-08  Ariel Rios <jarios@usa.net>

	* plugin.c: (func_marshal_func) We now use func_def_count_arg to get the count
          number. Count variable was replaced with min and max int vars.
          (scm_to_value): The float cast when returning a number was replaced
          with a float_t cast as per Michael's recomendation.
parent dac627fe
1999-12-08 Ariel Rios <jarios@usa.net>
* plugin.c: (func_marshal_func) We now use func_def_count_arg to get the count
number. Count variable was replaced with min and max int vars.
(scm_to_value): The float cast when returning a number was replaced
with a float_t cast as per Michael's recomendation.
1999-12-07 Ariel Rios <jarios@usa.net>
* functions.scm: The function fibonacci was corrected so it can always return numbers.
......
......@@ -130,7 +130,7 @@ scm_to_value (SCM scm)
//return value_new_int((int)scm_num2int(scm));
return value_new_float ((float)scm_num2dbl(scm, 0));
return value_new_float ((float_t)scm_num2dbl(scm, 0));
}
else if (SCM_NIMP(scm) && SCM_CONSP(scm))
{
......@@ -398,8 +398,10 @@ func_marshal_func (FunctionEvalInfo *ei, Value *argv[])
FunctionDefinition *fndef = ei->func_def;
SCM args = SCM_EOL, result, function;
CellRef dummy = { 0, 0, 0, 0 };
int i, count = strlen(fndef->args);
EvalPosition *old_eval_pos;
int i, min, max;
function_def_count_args(fndef, &min, &max);
l = g_list_find_custom(funclist, fndef, (GCompareFunc)fndef_compare);
if (l == NULL)
......@@ -407,7 +409,7 @@ func_marshal_func (FunctionEvalInfo *ei, Value *argv[])
function = ((FuncData*)l->data)->function;
for (i = count - 1; i >= 0; --i)
for (i = min - 1; i >= 0; --i)
args = scm_cons(value_to_scm(argv[i], dummy), args);
old_eval_pos = eval_pos;
......
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