This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70ec626
)
Small code tidy up in gv_fullname4
author
Nicholas Clark
<nick@ccl4.org>
Fri, 3 Dec 2004 18:56:31 +0000
(18:56 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Fri, 3 Dec 2004 18:56:31 +0000
(18:56 +0000)
p4raw-id: //depot/perl@23605
gv.c
patch
|
blob
|
blame
|
history
diff --git
a/gv.c
b/gv.c
index
5ea5141
..
64acb37
100644
(file)
--- a/
gv.c
+++ b/
gv.c
@@
-1092,13
+1092,12
@@
Perl_gv_fullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
}
sv_setpv(sv, prefix ? prefix : "");
- if (!HvNAME(hv))
+ name = HvNAME(hv);
+ if (!name)
name = "__ANON__";
- else
- name = HvNAME(hv);
+
if (keepmain || strNE(name, "main")) {
- sv_catpv(sv,name);
- sv_catpvn(sv,"::", 2);
+ Perl_sv_catpvf(aTHX_ sv,"%s::", name);
}
sv_catpvn(sv,GvNAME(gv),GvNAMELEN(gv));
}