summaryrefslogtreecommitdiffstats
path: root/ganv/wrap.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ganv/wrap.hpp')
-rw-r--r--ganv/wrap.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/ganv/wrap.hpp b/ganv/wrap.hpp
index f907dea..c444e00 100644
--- a/ganv/wrap.hpp
+++ b/ganv/wrap.hpp
@@ -115,12 +115,17 @@ private: \
wrap(Ganv##Name* gobj) \
{ \
if (gobj) { \
- GQuark key = g_quark_from_string("ganvmm"); \
- return (Ganv::Name*)g_object_get_qdata(G_OBJECT(gobj), key); \
+ return (Ganv::Name*)ganv_item_get_wrapper(GANV_ITEM(gobj)); \
} else { \
return NULL; \
} \
} \
+ /** Return a Ganv::CPPType wrapper for a CType. */ \
+ static inline const Ganv::Name* \
+ wrap(const Ganv##Name* gobj) \
+ { \
+ return wrap((Ganv##Name*)gobj); \
+ } \
}
#endif // GANV_WRAP_HPP