Branch: Tag:

1999-06-03

1999-06-03 01:39:39 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

bugfix + zero_type update

Rev: src/interpret.c:1.126
Rev: src/las.c:1.81
Rev: src/pike_types.c:1.56
Rev: src/pike_types.h:1.20
Rev: src/svalue.c:1.42
Rev: src/svalue.h:1.27

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.80 1999/05/01 17:53:00 grubba Exp $"); + RCSID("$Id: las.c,v 1.81 1999/06/03 01:39:35 hubbe Exp $");      #include "language.h"   #include "interpret.h"
2409:      static struct svalue *is_stupid_func(node *n,    int args, -  int vargs) +  int vargs, +  struct pike_string *type)   {    node *a,*b;    int tmp;
2445:    n=CAR(n);    if(!n || n->token != F_CONSTANT) return 0;    -  if((count_arguments(n->type) < 0) == !!vargs) -  return &n->u.sval; +  if((count_arguments(n->type) < 0) == !vargs) +  return 0;    -  +  if(minimum_arguments(type) < minimum_arguments(n->type))    return 0; -  +  +  return &n->u.sval;   }      int dooptcode(struct pike_string *name,
2488:    }else{    n=mknode(F_ARG_LIST,n,0);    -  if((foo=is_stupid_func(n, args, vargs))) +  if((foo=is_stupid_func(n, args, vargs, type)))    {    if(foo->type == T_FUNCTION && foo->subtype==FUNCTION_BUILTIN)    {