This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix clang "incompatible operand types" error in ternary expressions.
authorGeorge Greer <perl@greerga.m-l.org>
Thu, 27 May 2010 01:12:37 +0000 (21:12 -0400)
committerRafael Garcia-Suarez <rgs@consttype.org>
Thu, 27 May 2010 05:19:04 +0000 (07:19 +0200)
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)