forked from enlightenment/enlightenment
throw CRI on e_object type errors
This commit is contained in:
parent
0028c7aea3
commit
a81707a507
|
@ -26,15 +26,15 @@
|
|||
#ifdef OBJECT_PARANOIA_CHECK
|
||||
# define E_OBJECT_CHECK(x) do {if (e_object_error(E_OBJECT(x))) return;} while (0)
|
||||
# define E_OBJECT_CHECK_RETURN(x, ret) do {if (e_object_error(E_OBJECT(x))) return ret;} while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK_RETURN(x, tp, ret) do {if ((E_OBJECT(x)->type) != tp) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return ret;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (tp)) { CRI("Object type check failed in %s", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK_RETURN(x, tp, ret) do {if ((E_OBJECT(x)->type) != tp) { CRI("Object type check failed in %s", __FUNCTION__); return ret;} } while (0)
|
||||
# define E_OBJECT_IF_NOT_TYPE(x, tp) if (E_OBJECT(x)->type != (tp))
|
||||
#else
|
||||
# ifdef OBJECT_CHECK
|
||||
# define E_OBJECT_CHECK(x) do {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != (int)E_OBJECT_MAGIC)) return;} while (0)
|
||||
# define E_OBJECT_CHECK_RETURN(x, ret) do {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != (int)E_OBJECT_MAGIC)) return ret;} while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (int)(tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK_RETURN(x, tp, ret) do {if ((E_OBJECT(x)->type) != (int)(tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return ret;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (int)(tp)) { CRI("Object type check failed in %s", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK_RETURN(x, tp, ret) do {if ((E_OBJECT(x)->type) != (int)(tp)) { CRI("Object type check failed in %s", __FUNCTION__); return ret;} } while (0)
|
||||
# define E_OBJECT_IF_NOT_TYPE(x, tp) if (E_OBJECT(x)->type != (int)(tp))
|
||||
# else
|
||||
# define E_OBJECT_CHECK(x)
|
||||
|
|
Loading…
Reference in New Issue