Branch: Tag:

1998-04-14

1998-04-14 22:10:50 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

fixed object(Stdio.File) to mean 'object which implements Stdio.File'

Rev: src/pike_types.c:1.39
Rev: src/program.c:1.80
Rev: src/program.h:1.40

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.38 1998/04/10 22:24:21 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.39 1998/04/14 22:10:49 hubbe Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"
645:    case T_FLOAT: my_strcat("float"); break;    case T_PROGRAM: my_strcat("program"); break;    case T_OBJECT: +  if(EXTRACT_INT(t+1)) +  { +  char buffer[100]; +  sprintf(buffer,"object(%s %ld)",*t?"is":"implements",(long)EXTRACT_INT(t+1)); +  my_strcat(buffer); +  }else{    my_strcat("object"); -  +  } +     t+=sizeof(INT32)+1;    /* Prog id */    break;
856:    if(!p) return 0;    i=FIND_LFUN(p, LFUN_CALL);    -  if(EXTRACT_UCHAR(t+1) || -  (p->identifier_references[i].id_flags & ID_NOMASK) || -  (ID_FROM_INT(p, i)->identifier_flags & IDENTIFIER_PROTOTYPED)) +     return ID_FROM_INT(p, i)->type; -  -  return 0; +    }      static struct pike_string *low_object_lfun_type(char *t, short lfun)
872:    if(!p) return 0;    i=FIND_LFUN(p, LFUN_CALL);    -  if(EXTRACT_UCHAR(t+1) || -  (p->identifier_references[i].id_flags & ID_NOMASK) || -  (ID_FROM_INT(p, i)->identifier_flags & IDENTIFIER_PROTOTYPED)) +     return ID_FROM_INT(p, i)->type; -  -  return 0; +    }      #define A_EXACT 1
1090:       if(EXTRACT_UCHAR(a+1))    { -  if(low_get_storage(bp,ap)==-1) +  if(!implements(ap,bp))    return 0;    }else{ -  if(low_get_storage(ap,bp)==-1) +  if(!implements(bp,ap))    return 0;    }    }