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.15 1997/01/30 03:51:36 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.16 1997/03/05 05:29:42 hubbe 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:1081:    reset_type_stack();    max_correct_args=0;    if(low_get_return_type(type->str,args->str))    {    return pop_type();    }else{    return 0;    }   }    - void check_array_type(struct array *a) - { -  push_type(T_MIXED); - } -  +    struct pike_string *get_type_of_svalue(struct svalue *s)   {    struct pike_string *ret;    switch(s->type)    {    case T_FUNCTION:    if(s->subtype == FUNCTION_BUILTIN)    {    ret=s->u.efun->type;    }else{
pike.git/src/pike_types.c:1110:    {    ret=int_type_string;    }else{    ret=ID_FROM_INT(p,s->subtype)->type;    }    }    reference_shared_string(ret);    return ret;       case T_ARRAY: -  check_array_type(s->u.array); +  type_stack_mark(); +  push_type(T_MIXED);    push_type(T_ARRAY); -  return pop_type(); +  return pop_unfinished_type();       case T_MULTISET: -  check_array_type(s->u.multiset->ind); +  type_stack_mark(); +  push_type(T_MIXED);    push_type(T_MULTISET); -  return pop_type(); +  return pop_unfinished_type();       case T_MAPPING: -  +  type_stack_mark();    push_type(T_MIXED);    push_type(T_MIXED);    push_type(T_MAPPING); -  return pop_type(); +  return pop_unfinished_type();       case T_OBJECT: -  +  type_stack_mark(); +  if(s->u.object->prog) +  { +  push_type_int(s->u.object->prog->id); +  }else{    push_type_int(0); -  +  }    push_type(T_OBJECT); -  return pop_type(); +  return pop_unfinished_type();       case T_INT:    if(s->u.integer)    {    ret=int_type_string;    }else{    ret=mixed_type_string;    }    reference_shared_string(ret);    return ret;       default: -  +  type_stack_mark();    push_type(s->type); -  return pop_type(); +  return pop_unfinished_type();    }   }         char *get_name_of_type(int t)   {    switch(t)    {    case T_ARRAY: return "array";    case T_FLOAT: return "float";