Skip to content

Commit

Permalink
tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
JerrySievert committed Jan 25, 2024
1 parent fe8c54c commit a41bcf7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down

0 comments on commit a41bcf7

Please sign in to comment.