pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #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"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:2402:    if(!n) return 1;    if(n->token==F_CAST && n->type==void_type_string)    return is_null_branch(CAR(n));    if(n->token==F_ARG_LIST)    return is_null_branch(CAR(n)) && is_null_branch(CDR(n));    return 0;   }      static struct svalue *is_stupid_func(node *n,    int args, -  int vargs) +  int vargs, +  struct pike_string *type)   {    node *a,*b;    int tmp;    while(1)    {    if(!n) return 0;       if(n->token == F_ARG_LIST)    {    if(is_null_branch(CAR(n)))
pike.git/src/las.c:2438:    n=CAR(n);       if(!n || n->token != F_APPLY) return 0;       tmp=stupid_args(CDR(n),0,vargs);    if(!(vargs?tmp==65535:tmp==args)) return 0;       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,    node *n,    struct pike_string *type,    int modifiers)   {    union idptr tmp;    int args, vargs, ret;    struct svalue *foo;
pike.git/src/las.c:2481: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if(a_flag > 4)    {    fprintf(stderr,"Making prototype (pass 1) for: ");    print_tree(n);    }   #endif    }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)    {    tmp.c_fun=foo->u.efun->function;    ret=define_function(name,    type,    modifiers,    IDENTIFIER_C_FUNCTION | vargs,    &tmp);    free_node(n);