find armv8 string dtor

This commit is contained in:
altalk23 2023-12-25 07:11:17 +03:00
parent f8cc461635
commit 00e2bfee28

View file

@ -7,14 +7,14 @@
static constexpr ptrdiff_t MENULAYER_SCENE = 0x309068 - 0x10000;
static constexpr ptrdiff_t STRING_EMPTY = 0xaa1c3c - 0x10000;
static constexpr ptrdiff_t OPERATOR_DELETE = 0x7514c8 - 0x10000 + 1;
static constexpr ptrdiff_t STRING_DTOR = 0x7514c8 - 0x10000 + 1;
static constexpr ptrdiff_t STRING_COPY = 0x753a44 - 0x10000 + 1;
#elif defined(GEODE_IS_ANDROID64)
static constexpr ptrdiff_t MENULAYER_SCENE = 0x6a62ec - 0x100000;
static constexpr ptrdiff_t STRING_EMPTY = 0x12d8568 - 0x100000;
static constexpr ptrdiff_t OPERATOR_DELETE = 0xd6cb80 - 0x100000;
static constexpr ptrdiff_t STRING_DTOR = 0xdb9778 - 0x100000; // it's inlined but it exists !!!!
static constexpr ptrdiff_t STRING_COPY = 0xdb5fdc - 0x100000;
#endif
@ -44,11 +44,7 @@ namespace geode::stl {
void StringImpl::free() {
if (data.m_data == nullptr || data.m_data == emptyInternalString()) return;
// TODO: reimplement this
#ifdef GEODE_IS_ANDROID32
reinterpret_cast<void (*)(StringData*)>(geode::base::get() + OPERATOR_DELETE)(&data);
#else
reinterpret_cast<void (*)(void*)>(geode::base::get() + OPERATOR_DELETE)(&data.m_data[-1]);
#endif
reinterpret_cast<void (*)(StringData*)>(geode::base::get() + STRING_DTOR)(&data);
}
char* StringImpl::getStorage() {