Fix clang "incompatible operand types" error in ternary expressions.
George Greer [Thu, 27 May 2010 01:12:37 +0000 (21:12 -0400)]
gv.h

diff --git a/gv.h b/gv.h
index be4290d..7e412e5 100644 (file)
--- a/gv.h
+++ b/gv.h
@@ -49,7 +49,7 @@ struct gp {
           assert(!SvVALID(_gvname_hek));                               \
           &(GvXPVGV(_gvname_hek)->xiv_u.xivu_namehek);                 \
         }))
-#  define GvNAME_get(gv)       ({ assert(GvNAME_HEK(gv)); HEK_KEY(GvNAME_HEK(gv)); })
+#  define GvNAME_get(gv)       ({ assert(GvNAME_HEK(gv)); (char *)HEK_KEY(GvNAME_HEK(gv)); })
 #  define GvNAMELEN_get(gv)    ({ assert(GvNAME_HEK(gv)); HEK_LEN(GvNAME_HEK(gv)); })
 #else
 #  define GvGP(gv)     ((gv)->sv_u.svu_gp)