mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Add PY_ASSERT_TRUE_MSG
This commit is contained in:
parent
269345303b
commit
78abfb87e6
@ -17,6 +17,14 @@
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define PY_ASSERT_TRUE_MSG(cond, msg) \
|
||||
do { \
|
||||
if ((cond) ==0){ \
|
||||
nlr_jump(mp_obj_new_exception_msg( \
|
||||
&mp_type_OSError, msg)); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define PY_ASSERT_TYPE(obj, type) \
|
||||
do { \
|
||||
__typeof__ (obj) _a = (obj); \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user