Skip to content

Commit

Permalink
fix compile error caused by Quote
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzhg committed Sep 25, 2024
1 parent b4e6c9d commit 086907b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 7 additions & 5 deletions include/sonic/internal/arch/x86_ifuncs/quote.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ __attribute__((target("default"))) inline size_t parseStringInplace(
}

__attribute__((target("default"))) inline char *Quote(const char *, size_t,
char *) {
char *, bool) {
// TODO static_assert(!!!"Not Implemented!");
return 0;
}
Expand All @@ -42,8 +42,9 @@ __attribute__((target(SONIC_WESTMERE))) inline size_t parseStringInplace(

__attribute__((target(SONIC_WESTMERE))) inline char *Quote(const char *src,
size_t nb,
char *dst) {
return sse::Quote(src, nb, dst);
char *dst,
bool escape_emoji) {
return sse::Quote(src, nb, dst, escape_emoji);
}

__attribute__((target(SONIC_HASWELL))) inline size_t parseStringInplace(
Expand All @@ -53,8 +54,9 @@ __attribute__((target(SONIC_HASWELL))) inline size_t parseStringInplace(

__attribute__((target(SONIC_HASWELL))) inline char *Quote(const char *src,
size_t nb,
char *dst) {
return avx2::Quote(src, nb, dst);
char *dst,
bool escape_emoji) {
return avx2::Quote(src, nb, dst, escape_emoji);
}

} // namespace internal
Expand Down
3 changes: 1 addition & 2 deletions tests/jsonpath_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ TEST(JsonPath, RootIdentifier) {
// container
TestOk(" [] ", "$", "[]");
TestOk(" [\"😊\"] ", "$", "[\"\\uD83D\\uDE0A\"]");
TestOk(" {\"a\": \"😊💎\"} ", "$",
"{\"a\":\"\\uD83D\\uDE0A\\uD83D\\uDC8E\"}");
TestOk(" {\"a\": \"😊💎\"} ", "$", "{\"a\":\"\\uD83D\\uDE0A\\uD83D\\uDC8E\"}");
TestOk(" {} ", "$", "{}");
TestOk(R"( {"a":null} )", "$", R"({"a":null})");
TestOk(R"( [[], {}, []] )", "$", R"([[],{},[]])");
Expand Down

0 comments on commit 086907b

Please sign in to comment.