summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorJohn Peacock <jpeacock@rowman.com>2006-06-08 17:14:04 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-06-09 16:03:03 +0000
commit92dcf8ce268fff64097044a269995ffa27692a3d (patch)
tree7366c02363dc12211bd8168cf4f6a60680d4b1a1 /universal.c
parent7e265ef3a760ea72c6406128afc4b4771e71c25e (diff)
downloadperl-92dcf8ce268fff64097044a269995ffa27692a3d.tar.gz
[patch] Fwd: CPAN Upload: J/JP/JPEACOCK/version-0.64.tar.gz
Message-ID: <4488CB5C.4070702@rowman.com> p4raw-id: //depot/perl@28375
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/universal.c b/universal.c
index 705573e9f9..a1e91b7937 100644
--- a/universal.c
+++ b/universal.c
@@ -413,14 +413,10 @@ XS(XS_version_new)
? HvNAME(SvSTASH(SvRV(ST(0))))
: (char *)SvPV_nolen(ST(0));
- if ( items == 1 ) {
- /* no parameter provided */
- if ( sv_isobject(ST(0)) )
- {
- /* create empty object */
- vs = sv_newmortal();
- sv_setpvn(vs,"",0);
- }
+ if ( items == 1 || vs == &PL_sv_undef ) { /* no param or explicit undef */
+ /* create empty object */
+ vs = sv_newmortal();
+ sv_setpvn(vs,"",0);
}
else if ( items == 3 ) {
vs = sv_newmortal();