From: David Golden Date: Thu, 21 Jan 2010 17:18:11 +0000 (-0500) Subject: initialize undefined version objects with zero, not 'undef' X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be5574c0ea0db2b49042f8ad61e8d863b126a906;p=p5sagit%2Fp5-mst-13.2.git initialize undefined version objects with zero, not 'undef' --- diff --git a/universal.c b/universal.c index 5a2cddb..ce56d0b 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);