• Explorer09's avatar
    Add assert and __attribute__((nonnull)) on xStrdup · 3297616e
    Explorer09 authored
    __attribute__((nonnull)) will help catching "calling with NULL" mistake on
    compile time.
    
    I also convert xStrdup into a macro, that will do assert() inline when the
    code is *not* built with -DNDEBUG . For release builds (with -DNDEBUG),
    preprocessor trick will ensure that generated code remains the same.
    3297616e
XAlloc.h 620 Bytes