Windows has no memrchr() function.
This change is only a workaround, the optimization must be reenabled on other
platforms.
ADJUST_INDICES(start, end, len);
if (end - start < sub_len)
res = -1;
- else if (sub_len == 1) {
+ /* Issue #23573: FIXME, windows has no memrchr() */
+ else if (sub_len == 1 && dir > 0) {
unsigned char needle = *sub;
int mode = (dir > 0) ? FAST_SEARCH : FAST_RSEARCH;
res = stringlib_fastsearch_memchr_1char(
ADJUST_INDICES(start, end, len);
if (end - start < sub_len)
res = -1;
- else if (sub_len == 1) {
+ /* Issue #23573: FIXME, windows has no memrchr() */
+ else if (sub_len == 1 && dir > 0) {
unsigned char needle = *sub;
int mode = (dir > 0) ? FAST_SEARCH : FAST_RSEARCH;
res = stringlib_fastsearch_memchr_1char(