mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
add static_assert
fallback
This commit is contained in:
parent
601c1029ce
commit
a4745a8bd9
@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define PK_REGION(name) 1
|
#define PK_REGION(name) 1
|
||||||
|
|
||||||
@ -48,3 +47,10 @@ typedef struct RefCounted {
|
|||||||
PK_FREE(obj); \
|
PK_FREE(obj); \
|
||||||
} \
|
} \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
// static assert
|
||||||
|
#ifndef __cplusplus
|
||||||
|
#ifndef static_assert
|
||||||
|
#define static_assert(x, msg) if(!(x)) c11__abort(msg)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user