pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_types.c,v 1.237 2005/12/07 09:38:24 grubba Exp $ + || $Id: pike_types.c,v 1.238 2006/07/06 16:07:17 marcus Exp $   */      #include "global.h" - RCSID("$Id: pike_types.c,v 1.237 2005/12/07 09:38:24 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.238 2006/07/06 16:07:17 marcus 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:1097:    goto no_is_implements;    ++*s;    if( **s == 's' ) {    ++*s;    if (**s != ' ') {    goto bad_type;    }    is = 1;    ++*s;    } else { -  if (strncmp(*s, "mplements ", 10)) { +  if (strncmp((const char *)*s, "mplements ", 10)) {    goto bad_type;    }    *s += 10;    }    while(ISSPACE(**s)) ++*s;    no_is_implements:    if( !**s )    goto bad_type; -  if (!strncmp(*s, "this_program", 12)) { +  if (!strncmp((const char *)*s, "this_program", 12)) {    id = Pike_compiler->new_program->id;    *s += 12;    } else { -  id = atoi( *s ); +  id = atoi( (const char *)*s );    while( **s >= '0' && **s <= '9' )    ++*s;    }    while(ISSPACE(**s)) ++*s;    if( !**s || **s != ')' )    goto bad_type;    ++*s;    push_object_type(is, id);    }    else
pike.git/src/pike_types.c:4643:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    /* Leaf type */    *cont = type_string+1;    return mk_type(type, NULL, NULL, 0);       case T_INT:    *cont = type_string + 9; /* 2*sizeof(INT32) + 1 */    return mk_type(T_INT, -  (void *)(ptrdiff_t)extract_type_int(type_string+1), -  (void *)(ptrdiff_t)extract_type_int(type_string+5), 0); +  (void *)(ptrdiff_t)extract_type_int((char *)type_string+1), +  (void *)(ptrdiff_t)extract_type_int((char *)type_string+5), 0);    case T_OBJECT:    *cont = type_string + 6; /* 1 + sizeof(INT32) + 1 */    return mk_type(T_OBJECT, (void *)(ptrdiff_t)(type_string[1]), -  (void *)(ptrdiff_t)extract_type_int(type_string+2), 0); +  (void *)(ptrdiff_t)extract_type_int((char *)type_string+2), 0);    case PIKE_T_NAME:    {    int size_shift = type_string[1] & 0x3;    struct pike_string *str;    INT32 bytes;    /* bit 0 & 1: size_shift    * bit 2 ==> little endian.    *    * The loops check the lsb first, since it's most likely to    * be non-zero.    */    switch(type_string[1]) {    case 0: case 4: -  bytes = strlen(type_string+2); +  bytes = strlen((char *)type_string+2);    break;    case 1:    for(bytes=0; ; bytes+=2)    if(!type_string[bytes+3] && !type_string[bytes+2])    break;    break;    case 5:    for(bytes=0; ; bytes+=2)    if(!type_string[bytes+2] && !type_string[bytes+3])    break;