summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-03-24 06:34:56 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-03-24 06:34:56 +0000
commit13e080377416312a935982b1a5c15673e6ce0d66 (patch)
tree88ee414c786b7ffe8d2fd33a31d828a4301b72aa /pp_hot.c
parent615b993bf8c0434938e2210dee0592d689927961 (diff)
downloadperl-13e080377416312a935982b1a5c15673e6ce0d66.tar.gz
fix failure of C<&locked_sub;> under -Dusethreads
p4raw-id: //depot/perl@3140
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4c699ca888..0785f5ff71 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2155,8 +2155,13 @@ PP(pp_entersub)
if (SP > PL_stack_base + TOPMARK)
sv = *(PL_stack_base + TOPMARK + 1);
else {
- MUTEX_UNLOCK(CvMUTEXP(cv));
- croak("no argument for locked method call");
+ AV *av = (AV*)PL_curpad[0];
+ if (hasargs || !av || AvFILLp(av) < 0
+ || !(sv = AvARRAY(av)[0]))
+ {
+ MUTEX_UNLOCK(CvMUTEXP(cv));
+ croak("no argument for locked method call");
+ }
}
if (SvROK(sv))
sv = SvRV(sv);