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
(from parent 1:
4fa715f
)
For ptr masking use PTRSIZE-1, not nested conditional statement.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Wed, 30 Apr 2014 11:49:07 +0000
(07:49 -0400)
committer
Steffen Mueller
<smueller@cpan.org>
Wed, 28 May 2014 10:34:05 +0000
(12:34 +0200)
perl.c
patch
|
blob
|
blame
|
history
diff --git
a/perl.c
b/perl.c
index
27d0d9e
..
1b9b429
100644
(file)
--- a/
perl.c
+++ b/
perl.c
@@
-1496,8
+1496,7
@@
perl_parse(pTHXx_ XSINIT_t xsinit, int argc, char **argv, char **env)
* --jhi */
const char *s = NULL;
int i;
- const UV mask =
- ~(UV)(PTRSIZE == 4 ? 3 : PTRSIZE == 8 ? 7 : PTRSIZE == 16 ? 15 : 0);
+ const UV mask = ~(UV)(PTRSIZE-1);
/* Do the mask check only if the args seem like aligned. */
const UV aligned =
(mask < ~(UV)0) && ((PTR2UV(argv[0]) & mask) == PTR2UV(argv[0]));