summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-04-05 21:30:21 +0000
committerNicholas Clark <nick@ccl4.org>2005-04-05 21:30:21 +0000
commit07409e015252427f5ec1d8889bbfb78cf39d061d (patch)
tree0bf440cf49a586dd6e874ecb4fd0aa851fe03d83 /gv.c
parent5b279f8b9f38ac6332e7ddbcac2b8bf949abe47c (diff)
downloadperl-07409e015252427f5ec1d8889bbfb78cf39d061d.tar.gz
Add casting to allow g++ (3.3.5) to compile the core code.
A C++ compiler produces lots of warnings that are probably valid concerns to investigate. p4raw-id: //depot/perl@24170
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index f85b5fd101..16cdd48c86 100644
--- a/gv.c
+++ b/gv.c
@@ -122,7 +122,9 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi)
GvGP(gv) = gp_ref(gp);
GvSV(gv) = NEWSV(72,0);
GvLINE(gv) = CopLINE(PL_curcop);
- GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : "";
+ /* XXX Ideally this cast would be replaced with a change to const char*
+ in the struct. */
+ GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : (char *) "";
GvCVGEN(gv) = 0;
GvEGV(gv) = gv;
sv_magic((SV*)gv, (SV*)gv, PERL_MAGIC_glob, Nullch, 0);