diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-24 06:34:56 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-24 06:34:56 +0000 |
commit | 13e080377416312a935982b1a5c15673e6ce0d66 (patch) | |
tree | 88ee414c786b7ffe8d2fd33a31d828a4301b72aa /pp_hot.c | |
parent | 615b993bf8c0434938e2210dee0592d689927961 (diff) | |
download | perl-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.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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); |