summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorDavid Golden <dagolden@cpan.org>2010-01-21 12:18:11 -0500
committerDavid Golden <dagolden@cpan.org>2010-01-21 12:18:11 -0500
commitbe5574c0ea0db2b49042f8ad61e8d863b126a906 (patch)
tree93d158ea9793e2a775bab451d9df244bb07fcb52 /universal.c
parent5a8d89359b90ed02d82f9529493d2b739f4244e7 (diff)
downloadperl-be5574c0ea0db2b49042f8ad61e8d863b126a906.tar.gz
initialize undefined version objects with zero, not 'undef'
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/universal.c b/universal.c
index 5a2cddb3b8..ce56d0becd 100644
--- 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);