Skip to content

Commit a41bcf7

Browse files
committed
tests passing
1 parent fe8c54c commit a41bcf7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/text.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ extern "C" {
22
#include "postgres.h"
33

44
#include "fmgr.h"
5+
#include "mb/pg_wchar.h"
6+
57
#if PG_VERSION_NUM >= 160000
68
#include "varatt.h"
79
#endif
@@ -73,7 +75,8 @@ Datum pg_strstr(PG_FUNCTION_ARGS) {
7375
}
7476

7577
/* Get the results from the simd functions. */
76-
size_t ret = fast_strstr(VARDATA(left), len_left, VARDATA(right), len_right);
78+
size_t ret =
79+
fast_strstr(VARDATA_ANY(left), len_left, VARDATA_ANY(right), len_right);
7780

7881
PG_RETURN_INT32(ret);
7982
}
@@ -98,7 +101,8 @@ Datum pg_equals(PG_FUNCTION_ARGS) {
98101
}
99102

100103
/* Get the results from the simd functions. */
101-
size_t ret = fast_strstr(VARDATA(left), len_left, VARDATA(right), len_right);
104+
size_t ret =
105+
fast_strstr(VARDATA_ANY(left), len_left, VARDATA_ANY(right), len_right);
102106

103107
/* If the result is 0, strings are equal. */
104108
PG_RETURN_BOOL(ret == 0);

0 commit comments

Comments
 (0)