use unsafeAddr

This commit is contained in:
narimiran
2022-05-03 09:41:45 +02:00
parent 4f392727c8
commit 608457defc

View File

@@ -237,7 +237,7 @@ func endsWith(s, suffix: cstring): bool {.inline.} =
suffixLen = suffix.len
if suffixLen <= sLen:
result = memcmp(cstring(addr s[sLen - suffixLen]), suffix, csize_t(suffixLen)) == 0
result = memcmp(cstring(unsafeAddr s[sLen - suffixLen]), suffix, csize_t(suffixLen)) == 0
proc isObj(obj: PNimTypeV2, subclass: cstring): bool {.compilerRtl, inl.} =
result = endsWith(obj.name, subclass)