projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73a1c01
)
Re: UNIVERSAL::class busted
author
Graham Barr
<bodg@tiuk.ti.com>
Thu, 29 Aug 1996 06:05:10 +0000
(06:05 +0000)
committer
Andy Dougherty
<doughera@lafcol.lafayette.edu>
Thu, 29 Aug 1996 06:05:10 +0000
(06:05 +0000)
yes, but I also noticed that this does not check that the reference
is an object, so the patch should be
universal.c
patch
|
blob
|
history
diff --git
a/universal.c
b/universal.c
index
61a536b
..
72087e6
100644
(file)
--- a/
universal.c
+++ b/
universal.c
@@
-154,9
+154,9
@@
static
XS(XS_UNIVERSAL_class)
{
dXSARGS;
- if(SvROK(ST(0))) {
+ if(SvROK(ST(0))
&& SvOBJECT(SvRV(ST(0)))
) {
SV *sv = sv_newmortal();
- sv_setpv(sv, HvNAME(SvSTASH(S
T(0
))));
+ sv_setpv(sv, HvNAME(SvSTASH(S
vRV(ST(0)
))));
ST(0) = sv;
}
XSRETURN(1);