From a41bcf758f159556f1d6aa7d82ea3a275673a701 Mon Sep 17 00:00:00 2001 From: Jerry Sievert Date: Wed, 24 Jan 2024 19:27:55 -0800 Subject: [PATCH] tests passing --- src/text.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/text.cpp b/src/text.cpp index a2b90b3..d24900c 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -2,6 +2,8 @@ extern "C" { #include "postgres.h" #include "fmgr.h" +#include "mb/pg_wchar.h" + #if PG_VERSION_NUM >= 160000 #include "varatt.h" #endif @@ -73,7 +75,8 @@ Datum pg_strstr(PG_FUNCTION_ARGS) { } /* Get the results from the simd functions. */ - size_t ret = fast_strstr(VARDATA(left), len_left, VARDATA(right), len_right); + size_t ret = + fast_strstr(VARDATA_ANY(left), len_left, VARDATA_ANY(right), len_right); PG_RETURN_INT32(ret); } @@ -98,7 +101,8 @@ Datum pg_equals(PG_FUNCTION_ARGS) { } /* Get the results from the simd functions. */ - size_t ret = fast_strstr(VARDATA(left), len_left, VARDATA(right), len_right); + size_t ret = + fast_strstr(VARDATA_ANY(left), len_left, VARDATA_ANY(right), len_right); /* If the result is 0, strings are equal. */ PG_RETURN_BOOL(ret == 0);