lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David Haley wrote:
> Hi all,
> 
> Is there a 'good' way of removing assertions from code at run/compile
> time? I want to keep them around in the source so that I can use them
> for debugging, but I'd also like to turn them off to make things as fast
> as possible (I am testing something for performance). I poked around in
> the mailing list archives and on Google but didn't see anything.

The manpage for assert() here says that defining NDEBUG before
#including assert.h will make assert()s vanish.  I believe this to be
pretty standard.

B.