pike.git / src / module.c

version» Context lines:

pike.git/src/module.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: module.c,v 1.48 2008/02/12 18:51:08 grubba Exp $ + || $Id: module.c,v 1.49 2008/02/15 17:37:04 grubba Exp $   */      #include "global.h"   #include "module.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "builtin_functions.h"   #include "main.h"   #include "svalue.h"   #include "interpret.h"
pike.git/src/module.c:210:    is_static = 1; \    if (x->refs != m->refs + is_static) { \    if (!leak_found) { \    fputs ("Leak(s) found at exit:\n", stderr); \    leak_found = 1; \    } \    fprintf (stderr, NAME " got %d unaccounted references: ", \    x->refs - (m->refs + is_static)); \    print_short_svalue (stderr, (union anything *) &x, T_TYPE); \    fputc ('\n', stderr); \ -  if (T_TYPE == T_PROGRAM) { \ -  struct program *p = (struct program *)x; \ -  if (p->parent) { \ -  fprintf(stderr, " Parent is: %p\n", p->parent); \ -  dump_program_tables(p->parent, 6); \ -  } \ -  fprintf(stderr, " Symbol tables:\n"); \ -  dump_program_tables(p, 4); \ -  } \ +  DO_IF_DEBUG(if (T_TYPE == T_PROGRAM) { \ +  struct program *p = (struct program *)x; \ +  if (p->parent) { \ +  fprintf(stderr, " Parent is: %p\n", \ +  p->parent); \ +  dump_program_tables(p->parent, 6); \ +  } \ +  fprintf(stderr, " Symbol tables:\n"); \ +  dump_program_tables(p, 4); \ +  }); \    DO_IF_DMALLOC (debug_malloc_dump_references (x, 2, 1, 0)); \    } \    } \    } \    } while (0)       REPORT_LINKED_LIST_LEAKS (array, first_array, STATIC_ARRAYS, T_ARRAY, "Array");    REPORT_LINKED_LIST_LEAKS (multiset, first_multiset, NOTHING, T_MULTISET, "Multiset");    REPORT_LINKED_LIST_LEAKS (mapping, first_mapping, NOTHING, T_MAPPING, "Mapping");    REPORT_LINKED_LIST_LEAKS (program, first_program, NOTHING, T_PROGRAM, "Program");