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.168 2001/03/27 20:18:37 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.169 2001/03/27 22:07:55 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:66:   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;   PMOD_EXPORT struct pike_type *mixed_type_string;   PMOD_EXPORT struct pike_type *void_type_string;   PMOD_EXPORT struct pike_type *zero_type_string;   PMOD_EXPORT struct pike_type *any_type_string;   PMOD_EXPORT struct pike_type *weak_type_string; /* array|mapping|multiset|function */    + #if defined(USE_PIKE_TYPE) && defined(DEBUG_MALLOC) + struct pike_type_location *all_pike_type_locations = NULL; + #endif /* USE_PIKE_TYPE && DEBUG_MALLOC */ +    static struct pike_type *a_markers[10], *b_markers[10];      static struct program *implements_a;   static struct program *implements_b;      #ifdef PIKE_DEBUG   void TYPE_STACK_DEBUG(const char *fun)   {   #if 0    fprintf(stderr, "%25s(): stack_depth:%ld mark_stack_depth:%ld\n",
pike.git/src/pike_types.c:7743:    type_type_string = CONSTTYPE(tType(tMix));    void_type_string = CONSTTYPE(tVoid);    zero_type_string = CONSTTYPE(tZero);    any_type_string = CONSTTYPE(tOr(tVoid,tMix));    weak_type_string = CONSTTYPE(tOr4(tArray,tMultiset,tMapping,    tFuncV(tNone,tZero,tOr(tMix,tVoid))));   }      void cleanup_pike_types(void)   { + #if defined(USE_PIKE_TYPE) && defined(DEBUG_MALLOC) +  struct pike_type *t = all_pike_type_locations; +  +  while(t) { +  free_type(t->t); +  t = t->next; +  } + #endif /* USE_PIKE_TYPE && DEBUG_MALLOC */ +     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);