This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Generalize macro and move to handy.h
authorKarl Williamson <khw@cpan.org>
Wed, 20 Mar 2019 21:31:03 +0000 (15:31 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 21 Mar 2019 17:17:45 +0000 (11:17 -0600)
commit305fe86ebe53ebaec4b94533f37a83774647e346
tree9bd0bf050f8999826ebaae0bebe76a90ff46adb3
parentef65a74af186beb93566cf827c5f543f4aa14645
Generalize macro and move to handy.h

The macro verified that its input was in the range '1' to '9' by using a
subtraction and a single conditional.  This commit generalizes this
non-obvious method of avoiding a conditional, and moves it to handy.h so
it can be used in other places.
handy.h
sv.c