Edit function call to support 32-bit and 64-bit str

This commit is contained in:
ram 2024-12-12 10:10:39 +00:00
parent 780d33c8a7
commit 543a648af8

View File

@ -4,7 +4,7 @@
namespace { namespace {
template<typename SizeT> template<typename SizeT>
int32_t __nac3_str_eq_impl(const char* str1, SizeT len1, const char* str2, SizeT len2) { SizeT __nac3_str_eq_impl(const char* str1, SizeT len1, const char* str2, SizeT len2) {
if (len1 != len2){ if (len1 != len2){
return 0; return 0;
} }
@ -13,7 +13,7 @@ int32_t __nac3_str_eq_impl(const char* str1, SizeT len1, const char* str2, SizeT
} // namespace } // namespace
extern "C" { extern "C" {
int32_t nac3_str_eq(const char* str1, uint64_t len1, const char* str2, uint64_t len2) { int64_t nac3_str_eq(const char* str1, uint64_t len1, const char* str2, uint64_t len2) {
return __nac3_str_eq_impl<uint64_t>(str1, len1, str2, len2); return __nac3_str_eq_impl<uint64_t>(str1, len1, str2, len2);
} }