let the user decide about asserts

master
Marc Alexander Lehmann 2010-03-16 00:26:41 +00:00
parent a23208bdf8
commit cfbcb7d57b
3 changed files with 4 additions and 11 deletions

5
ev.h
View File

@ -126,11 +126,6 @@ extern "C" {
/*****************************************************************************/
#if !EV_FEATURE_CODE && !defined (NDEBUG)
# define NDEBUG 1
# include <assert.h>
#endif
typedef double ev_tstamp;
#ifndef EV_ATOMIC_T

8
ev.pod
View File

@ -3920,11 +3920,9 @@ Use larger code to speed up some operations.
Currently this is used to override some inlining decisions (enlarging the roughly
30% code size on amd64.
Also disables C<assert>'s in the code, unless you define C<NDEBUG>
explicitly to C<0>.
Use of compiler flags such as C<-Os> with gcc that optimise for size are
recommended when disabling this feature.
When optimising for size, use of compiler flags such as C<-Os> with
gcc recommended, as well as C<-DNDEBUG>, as libev contains a number of
assertions.
=item C<2> - faster/larger data structures

View File

@ -173,7 +173,7 @@ VARx(ev_io, sigfd_w)
VARx(sigset_t, sigfd_set)
#endif
#if EV_MINIMAL < 2 || EV_GENWRAP
#if EV_FEATURE_API || EV_GENWRAP
VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */
VARx(unsigned int, loop_depth) /* #ev_loop enters - #ev_loop leaves */