IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 260


Ignore:
Timestamp:
Mar 19, 2004, 9:08:32 AM (22 years ago)
Author:
rhl
Message:

Disable calloc too; this comment is correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psMemory.h

    r257 r260  
    117117#define psFree(size) p_psFree(size, __FILE__, __LINE__)
    118118
    119 /// prevent the use of 'malloc'. malloc is re-defined to throw an error in the C preprocessor
    120 #define malloc(S) for
    121 
    122 /// prevent the use of 'realloc'. realloc is re-defined to throw an error in the C preprocessor
    123 #define realloc(P,S) for
    124 
    125 /// prevent the use of 'free'. free is re-defined to throw an error in the C preprocessor
    126 #define free(P) for
     119/*
     120 * Ensure that any program using malloc/realloc/free will fail to compile
     121 */
     122#if !defined(PS_ALLOW_MALLOC)
     123#  define malloc(S) for
     124#  define realloc(P,S) for
     125#  define calloc(S) for
     126#  define free(P) for
     127#endif
    127128
    128129#endif
Note: See TracChangeset for help on using the changeset viewer.