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:
5a8d893
)
initialize undefined version objects with zero, not 'undef'
author
David Golden
<dagolden@cpan.org>
Thu, 21 Jan 2010 17:18:11 +0000
(12:18 -0500)
committer
David Golden
<dagolden@cpan.org>
Thu, 21 Jan 2010 17:18:11 +0000
(12:18 -0500)
universal.c
patch
|
blob
|
blame
|
history
diff --git
a/universal.c
b/universal.c
index
5a2cddb
..
ce56d0b
100644
(file)
--- a/
universal.c
+++ b/
universal.c
@@
-549,7
+549,7
@@
XS(XS_version_new)
if ( items == 1 || ! SvOK(vs) ) { /* no param or explicit undef */
/* create empty object */
vs = sv_newmortal();
- sv_setpvs(vs, "
undef
");
+ sv_setpvs(vs, "
0
");
}
else if ( items == 3 ) {
vs = sv_newmortal();
@@
-659,7
+659,7
@@
XS(XS_version_vcmp)
if ( ! sv_derived_from(robj, "version") )
{
- robj = new_version(SvOK(robj) ? robj : newSVpvs("
undef
"));
+ robj = new_version(SvOK(robj) ? robj : newSVpvs("
0
"));
}
rvs = SvRV(robj);