Skip to content

Commit 879c350

Browse files
committed
UCD.pm: Add check for parameter type
This needs to be a scalar reference; I got burned with it not doing the right thing when it wasn't.
1 parent a7c61e7 commit 879c350

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

charclass_invlists.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456662,7 +456662,7 @@ static const U8 WB_dfa_table[] = {
456662456662
#endif /* defined(PERL_IN_REGEXEC_C) */
456663456663

456664456664
/* Generated from:
456665-
* b7f46fc1010fd83f5a678b268a23fef0142a18d0ab2a142edd0bb03328e667c3 lib/Unicode/UCD.pm
456665+
* cf66b466d4a521a5ee5891e1014fa33d51b0f2d9559e1ed5143917203e433ebf lib/Unicode/UCD.pm
456666456666
* 764f420cedfc8b43d9fec251c957a5d55fc45d40f6573f162990ed1dce7e36e0 lib/unicore/ArabicShaping.txt
456667456667
* b8f32554c6f658821fb0ee742d21c5b1f2086b9bf13071fed04894b022f93d67 lib/unicore/BidiBrackets.txt
456668456668
* d7afdadd1bbd66f5a663ac0e8f7958f18fd9491fc0bc59ec5877cb82db71db7d lib/unicore/BidiMirroring.txt

lib/Unicode/UCD.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use warnings;
55
no warnings 'surrogate'; # surrogates can be inputs to this
66
use charnames ();
77

8-
our $VERSION = '0.81';
8+
our $VERSION = '0.82';
99

1010
sub DEBUG () { 0 }
1111
$|=1 if DEBUG;
@@ -2532,6 +2532,8 @@ change these into digits, and then call C<num> on the result.
25322532

25332533
sub num ($;$) {
25342534
my ($string, $retlen_ref) = @_;
2535+
croak __PACKAGE__, "::num: second parameter must be a scalar reference"
2536+
if defined $retlen_ref && ref $retlen_ref ne "SCALAR";
25352537

25362538
use feature 'unicode_strings';
25372539

lib/unicore/uni_keywords.pl

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

regcharclass.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

regexp_constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#define MAX_FOLD_FROMS 3
3030

3131
/* Generated from:
32-
* b7f46fc1010fd83f5a678b268a23fef0142a18d0ab2a142edd0bb03328e667c3 lib/Unicode/UCD.pm
32+
* cf66b466d4a521a5ee5891e1014fa33d51b0f2d9559e1ed5143917203e433ebf lib/Unicode/UCD.pm
3333
* 764f420cedfc8b43d9fec251c957a5d55fc45d40f6573f162990ed1dce7e36e0 lib/unicore/ArabicShaping.txt
3434
* b8f32554c6f658821fb0ee742d21c5b1f2086b9bf13071fed04894b022f93d67 lib/unicore/BidiBrackets.txt
3535
* d7afdadd1bbd66f5a663ac0e8f7958f18fd9491fc0bc59ec5877cb82db71db7d lib/unicore/BidiMirroring.txt

uni_keywords.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)