current = array[i];
if (current >= end) { /* Finished if beyond the end of what we
are populating */
- return;
+ if (LIKELY(end < UV_MAX)) {
+ return;
+ }
+
+ /* We get here when the upper bound is the maximum
+ * representable on the machine, and we are looking for just
+ * that code point. Have to special case it */
+ i = len;
+ goto join_end_of_list;
}
}
assert(current >= start);
swatch[offset >> 3] |= 1 << (offset & 7);
}
+ join_end_of_list:
+
/* Quit if at the end of the list */
if (i >= len) {
"chr(0xFFFF_FFFE) can match a Unicode property");
ok(chr(0xFFFF_FFFF) =~ /\p{Is_32_Bit_Super}/,
"chr(0xFFFF_FFFF) can match a Unicode property");
+ my $p = qr/^[\x{FFFF_FFFF}]$/;
+ ok(chr(0xFFFF_FFFF) =~ $p,
+ "chr(0xFFFF_FFFF) can match itself in a [class]");
}
else {
no warnings 'overflow';
ok(chr(0xFFFF_FFFF_FFFF_FFFF) =~ qr/^\p{Is_Portable_Super}$/,
"chr(0xFFFF_FFFF_FFFF_FFFF) can match a Unicode property");
+ my $p = qr/^[\x{FFFF_FFFF_FFFF_FFFF}]$/;
+ ok(chr(0xFFFF_FFFF_FFFF_FFFF) =~ $p,
+ "chr(0xFFFF_FFFF_FFFF_FFFF) can match itself in a [class]");
+
# This test is because something was declared as 32 bits, but
# should have been cast to 64; only a problem where
# sizeof(STRLEN) != sizeof(UV)