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.262 2007/03/03 16:46:13 grubba Exp $ + || $Id: pike_types.c,v 1.263 2007/03/20 17:39:04 grubba Exp $   */      #include "global.h"   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"
pike.git/src/pike_types.c:48:   /* Number of entries in the struct pike_type hash-table. */   #define PIKE_TYPE_HASH_SIZE 32768         #ifdef PIKE_TYPE_DEBUG   static int indent=0;   #endif      int max_correct_args;    + PMOD_EXPORT struct pike_type *string0_type_string;   PMOD_EXPORT struct pike_type *string_type_string;   PMOD_EXPORT struct pike_type *int_type_string;   PMOD_EXPORT struct pike_type *float_type_string;   PMOD_EXPORT struct pike_type *function_type_string;   PMOD_EXPORT struct pike_type *object_type_string;   PMOD_EXPORT struct pike_type *program_type_string;   PMOD_EXPORT struct pike_type *array_type_string;   PMOD_EXPORT struct pike_type *multiset_type_string;   PMOD_EXPORT struct pike_type *mapping_type_string;   PMOD_EXPORT struct pike_type *type_type_string;
pike.git/src/pike_types.c:3762:    return int_type_string;       case T_MAPPING:    add_ref(t = t->cdr);    return t;       case T_ARRAY:    {    struct pike_type *a;    -  if(low_pike_types_le(string_type_string, index_type, 0, 0) && -  (a = low_index_type(t->car, string_type_string, n))) { +  if(low_pike_types_le(string0_type_string, index_type, 0, 0) && +  (a = low_index_type(t->car, string0_type_string, n))) {    /* Possible to index the array with a string. */    type_stack_mark();    push_finished_type(a);    free_type(a);    push_type(T_ARRAY);       if (low_match_types(int_type_string, index_type, 0)) {    /* Also possible to index the array with an int. */    push_finished_type(t->car);    push_type(T_OR);
pike.git/src/pike_types.c:5234:      void init_types(void)   {    /* Initialize hashtable here. */    pike_type_hash = (struct pike_type **)xalloc(sizeof(struct pike_type *) *    PIKE_TYPE_HASH_SIZE);    MEMSET(pike_type_hash, 0, sizeof(struct pike_type *) * PIKE_TYPE_HASH_SIZE);    pike_type_hash_size = PIKE_TYPE_HASH_SIZE;    init_pike_type_blocks();    -  string_type_string = CONSTTYPE(tString); +  string0_type_string = CONSTTYPE(tStr0); +  string_type_string = CONSTTYPE(tStr32);    int_type_string = CONSTTYPE(tInt);    object_type_string = CONSTTYPE(tObj);    program_type_string = CONSTTYPE(tPrg(tObj));    float_type_string = CONSTTYPE(tFloat);    mixed_type_string = CONSTTYPE(tMix);    array_type_string = CONSTTYPE(tArray);    multiset_type_string = CONSTTYPE(tMultiset);    mapping_type_string = CONSTTYPE(tMapping);    function_type_string = CONSTTYPE(tFunction);    type_type_string = CONSTTYPE(tType(tMix));
pike.git/src/pike_types.c:5263: Inside #if defined(DEBUG_MALLOC)
  {   #ifdef DEBUG_MALLOC    struct pike_type_location *t = all_pike_type_locations;       while(t) {    free_type(t->t);    t = t->next;    }   #endif /* DEBUG_MALLOC */    +  free_type(string0_type_string);    free_type(string_type_string);    free_type(int_type_string);    free_type(float_type_string);    free_type(function_type_string);    free_type(object_type_string);    free_type(program_type_string);    free_type(array_type_string);    free_type(multiset_type_string);    free_type(mapping_type_string);    free_type(type_type_string);