From: Armin R. <ar...@us...> - 2002-01-11 16:16:14
|
Update of /cvsroot/psyco/psyco/c In directory usw-pr-cvs1:/tmp/cvs-serv27534 Modified Files: psyco.h linuxmemchk.h linuxmemchk.c Log Message: Reorganized macro definitions: can now compile with "-DHEAVY_MEM_CHECK=n" or "-DVERBOSE_LEVEL=n" to override the values set in psyco.h by command-line arguments. Index: psyco.h =================================================================== RCS file: /cvsroot/psyco/psyco/c/psyco.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** psyco.h 2002/01/04 23:28:09 1.8 --- psyco.h 2002/01/11 16:16:10 1.9 *************** *** 15,27 **** # define ALL_CHECKS ! /* define for a few debugging outputs */ ! # define VERBOSE_LEVEL 1 /* 0, 1 or 2 */ #ifndef MS_WIN32 ! /* define for *heavy* memory checking */ ! # define HEAVY_MEM_CHECK ! /* define for **really** **heavy** memory checking */ ! /*#undef HEAVY_HEAVY_MEM_CHECK*/ #endif --- 15,30 ---- # define ALL_CHECKS ! /* level of debugging outputs: 0 = none, 1 = a few, 2 = a lot */ ! # ifndef VERBOSE_LEVEL ! # define VERBOSE_LEVEL 1 /* 0, 1 or 2 */ ! # endif #ifndef MS_WIN32 ! /* define for *heavy* memory checking: 0 = off, 1 = reasonably heavy, ! 2 = unreasonably heaving */ ! # ifndef HEAVY_MEM_CHECK ! # define HEAVY_MEM_CHECK 0 ! # endif #endif *************** *** 29,35 **** /* define to write produced blocks of code into a file See 'xam.py' */ ! # define CODE_DUMP_FILE "psyco.dump" # define CODE_DUMP_AT_END_ONLY - # define SPEC_DICT_SIGNATURE 0x98247b9d /* arbitrary */ #endif /* !DISABLE_DEBUG */ --- 32,39 ---- /* define to write produced blocks of code into a file See 'xam.py' */ ! # ifndef NO_CODE_DUMP ! # define CODE_DUMP_FILE "psyco.dump" ! # endif # define CODE_DUMP_AT_END_ONLY #endif /* !DISABLE_DEBUG */ *************** *** 119,125 **** #endif ! #ifdef HEAVY_MEM_CHECK # include "linuxmemchk.h" ! # ifdef HEAVY_HEAVY_MEM_CHECK # define PSYCO_NO_LINKED_LISTS # endif --- 123,132 ---- #endif ! #ifndef HEAVY_MEM_CHECK ! # define HEAVY_MEM_CHECK 0 ! #endif ! #if HEAVY_MEM_CHECK # include "linuxmemchk.h" ! # if HEAVY_MEM_CHECK > 1 # define PSYCO_NO_LINKED_LISTS # endif *************** *** 131,138 **** #endif #ifndef false ! static const bool false = 0; #endif #ifndef true ! static const bool true = 1; #endif --- 138,145 ---- #endif #ifndef false ! # define false 0 #endif #ifndef true ! # define true 1 #endif Index: linuxmemchk.h =================================================================== RCS file: /cvsroot/psyco/psyco/c/linuxmemchk.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** linuxmemchk.h 2002/01/03 11:22:46 1.2 --- linuxmemchk.h 2002/01/11 16:16:10 1.3 *************** *** 1,3 **** ! #ifdef HEAVY_MEM_CHECK #include <Python.h> --- 1,4 ---- ! #include "psyco.h" ! #if HEAVY_MEM_CHECK #include <Python.h> Index: linuxmemchk.c =================================================================== RCS file: /cvsroot/psyco/psyco/c/linuxmemchk.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** linuxmemchk.c 2002/01/02 09:46:22 1.3 --- linuxmemchk.c 2002/01/11 16:16:10 1.4 *************** *** 1,5 **** /* custom checking allocators a la Electric Fence */ ! #include "psyco.h" ! #ifdef HEAVY_MEM_CHECK #include <stdlib.h> #include <stdio.h> --- 1,5 ---- /* custom checking allocators a la Electric Fence */ ! #include "linuxmemchk.h" ! #if HEAVY_MEM_CHECK #include <stdlib.h> #include <stdio.h> |