diff options
author | David Golden <dagolden@cpan.org> | 2010-01-21 12:18:11 -0500 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2010-01-21 12:18:11 -0500 |
commit | be5574c0ea0db2b49042f8ad61e8d863b126a906 (patch) | |
tree | 93d158ea9793e2a775bab451d9df244bb07fcb52 /universal.c | |
parent | 5a8d89359b90ed02d82f9529493d2b739f4244e7 (diff) | |
download | perl-be5574c0ea0db2b49042f8ad61e8d863b126a906.tar.gz |
initialize undefined version objects with zero, not 'undef'
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 4 |
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); |