This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b17a067
)
op.c:cv_ckproto_len_flags: do null checks first
author
Father Chrysostomos
<sprout@cpan.org>
Fri, 28 Jun 2013 07:09:02 +0000
(
00:09
-0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Fri, 28 Jun 2013 07:09:02 +0000
(
00:09
-0700)
Checking local variables for nullness is faster than calling ckWARN_d,
which involves a function call.
op.c
patch
|
blob
|
blame
|
history
diff --git
a/op.c
b/op.c
index
7b11d1e
..
f966018
100644
(file)
--- a/
op.c
+++ b/
op.c
@@
-6816,10
+6816,10
@@
Perl_cv_ckproto_len_flags(pTHX_ const CV *cv, const GV *gv, const char *p,
PERL_ARGS_ASSERT_CV_CKPROTO_LEN_FLAGS;
- if (
!ckWARN_d(WARN_PROTOTYPE)
)
+ if (
p == NULL && cvp == NULL
)
return;
- if (
p == NULL && cvp == NULL
)
+ if (
!ckWARN_d(WARN_PROTOTYPE)
)
return;
if (p && cvp) {