pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.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: pike_types.c,v 1.113 1999/12/26 18:53:33 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.114 1999/12/29 17:59:33 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"   #include "constants.h"   #include "object.h"   #include "multiset.h"
pike.git/src/pike_types.c:2633:    {    INT32 i;    if(n->token == F_ARROW)    {    /* FIXME: make this stricter */    if((i=FIND_LFUN(p,LFUN_ARROW))!=-1)    {    /* FIXME: function_type_string should be replaced with something    * derived from type_string    */ -  if(i!=-1 && (tmp=check_call(function_type_string, ID_FROM_INT(p, i)->type))) +  if(i!=-1 && +  (tmp=check_call(function_type_string, ID_FROM_INT(p, i)->type, +  0)))    return tmp;       reference_shared_string(mixed_type_string);    return mixed_type_string;    }    }else{    if((i=FIND_LFUN(p,LFUN_INDEX)) != -1)    {    /* FIXME: function_type_string should be replaced with something    * derived from type_string    */ -  if(i!=-1 && (tmp=check_call(function_type_string, ID_FROM_INT(p, i)->type))) +  if(i!=-1 && +  (tmp=check_call(function_type_string, ID_FROM_INT(p, i)->type, +  0)))    return tmp;       reference_shared_string(mixed_type_string);    return mixed_type_string;    }    }    if(CDR(n)->token == F_CONSTANT && CDR(n)->u.sval.type==T_STRING)    {    i=find_shared_string_identifier(CDR(n)->u.sval.u.string, p);    if(i==-1)
pike.git/src/pike_types.c:3060: Inside #if 0
  #if 0    fprintf(stderr,"minimum_arguments(");    simple_describe_type(s);    fprintf(stderr," ) -> %d\n",ret);   #endif       return ret;   }      struct pike_string *check_call(struct pike_string *args, -  struct pike_string *type) +  struct pike_string *type, +  int strict)   {    check_type_string(args);    check_type_string(type);    clear_markers();    type_stack_mark();    max_correct_args=0;       if(low_get_return_type(type->str,args->str))    { -  if (lex.pragmas & ID_STRICT_TYPES) { +  if (strict) {    if (!strict_check_call(type->str, args->str)) {    struct pike_string *type_t = describe_type(type);       if (!low_pike_types_le(type->str, tFuncV(tNone,tZero,tMix), 0, 0)) {    yywarning("Calling non-function value.");    yywarning("Type called: %s", type_t->str);    } else {    struct pike_string *arg_t = describe_type(args);    yywarning("Arguments not strictly compatible.");    yywarning("Expected: %s", type_t->str);
pike.git/src/pike_types.c:3100:    pop_stack_mark();    return 0;    }   }      INT32 get_max_args(struct pike_string *type)   {    INT32 ret,tmp=max_correct_args;    check_type_string(type);    clear_markers(); -  type=check_call(function_type_string, type); +  type = check_call(function_type_string, type, 0);    if(type) free_string(type);    ret=max_correct_args;    max_correct_args=tmp;    return tmp;   }         struct pike_string *zzap_function_return(char *a, INT32 id)   {    switch(EXTRACT_UCHAR(a))