From 12ebc336a0db6d8d48ae9f395249bcca2a3c060b Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Sat, 13 Apr 2019 01:02:30 +0000 Subject: [PATCH] added typecasting to some moo_xxxx() macros --- moo/lib/moo.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/moo/lib/moo.h b/moo/lib/moo.h index 39f2507..1f08c1b 100644 --- a/moo/lib/moo.h +++ b/moo/lib/moo.h @@ -1850,13 +1850,13 @@ MOO_EXPORT void moo_fini ( static MOO_INLINE moo_errnum_t moo_geterrnum (moo_t* moo) { return moo->errnum; } #else -# define moo_getmmgr(moo) ((moo)->mmgr) -# define moo_getxtn(moo) ((void*)((moo) + 1)) +# define moo_getmmgr(moo) (((moo_t*)(moo))->mmgr) +# define moo_getxtn(moo) ((void*)((moo_t*)(moo) + 1)) -# define moo_getcmgr(moo) ((moo)->cmgr) -# define moo_setcmgr(moo,mgr) ((moo)->cmgr = (mgr)) +# define moo_getcmgr(moo) (((moo_t*)(moo))->cmgr) +# define moo_setcmgr(moo,mgr) (((moo_t*)(moo))->cmgr = (mgr)) -# define moo_geterrnum(moo) ((moo)->errnum) +# define moo_geterrnum(moo) (((moo_t*)(moo))->errnum) #endif MOO_EXPORT void moo_seterrnum (