Skip to content

Commit 449da90

Browse files
committed
添加 xy_developer_mistake()
1 parent f7f5269 commit 449da90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/xy.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ char *xy_os_devnull = NULL;
9696
#define xy_unimplemented() assert(!"Unimplemented temporarily")
9797
#define xy_unreached() assert(!"This code shouldn't be reached")
9898
#define xy_noop() (void)0
99-
#define xy_cant_be_null(p) if(!p) assert(!"This pointer can't be null")
99+
#define xy_cant_be_null(p) if(!p) assert(!"This pointer can't be null")
100+
#define xy_developer_mistake(reason) assert(!reason)
101+
100102

101103
static void _xy_print_int (int n) {printf ("%d", n);}
102104
static void _xy_print_long (long n) {printf ("%ld", n);}

0 commit comments

Comments
 (0)