Skip to content

Commit

Permalink
Fixed: PreP: nm: assert: panicif used to call panic_calls if the asse…
Browse files Browse the repository at this point in the history
…rtion was false, [double negetives].
  • Loading branch information
zakarouf committed May 16, 2021
1 parent 2f6834a commit af76eb3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/prep/prep/nm/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
#define zpp__assert_exp(exp)\
((void) ((exp) ? 1 : 0)

#define zpp__assert_exp_construct(exp, exception_method_fn, ...)\
((void) ((exp) ? ((void)0) : exception_method_fn (__VA_ARGS__)))
#define zpp__assert_construct(exp, exception_method_fn, ...)\
( (void)( (exp) ? ((void)0) : exception_method_fn(__VA_ARGS__) ))

#define zpp__assert_not_exp_construct(exp, exception_method_fn, ...)\
((void) ((exp) ? exception_method_fn (__VA_ARGS__)) : ((void)0) )
#define zpp__assert_not_construct(exp, exception_method_fn, ...)\
( (void)( (exp) ? exception_method_fn(__VA_ARGS__) : ((void)0) ))

#define zpp__assert_eq_ptr(x, y) ( x==y?true:false )
#define zpp__assert_ptr_checkNULL(x) (x==NULL?true:false)

// Panic

#define zpp__panicif_construct(condition, panic_call, ...) zpp__assert_exp_construct(condition, panic_call, __VA_ARGS__)
#define zpp__panicif_construct(condition, panic_call, ...) zpp__assert_not_construct(condition, panic_call, __VA_ARGS__)


#endif

0 comments on commit af76eb3

Please sign in to comment.