添加 xy_developer_mistake()

This commit is contained in:
Aoran Zeng 2025-08-21 16:04:09 +08:00
parent f7f52691a7
commit 449da90daa
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -96,7 +96,9 @@ char *xy_os_devnull = NULL;
#define xy_unimplemented() assert(!"Unimplemented temporarily")
#define xy_unreached() assert(!"This code shouldn't be reached")
#define xy_noop() (void)0
#define xy_cant_be_null(p) if(!p) assert(!"This pointer can't be null")
#define xy_cant_be_null(p) if(!p) assert(!"This pointer can't be null")
#define xy_developer_mistake(reason) assert(!reason)
static void _xy_print_int (int n) {printf ("%d", n);}
static void _xy_print_long (long n) {printf ("%ld", n);}