mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
json2: export Value::clear (#584)
Export the existing clear implementation while preserving tree ownership and root handler metadata.
This commit is contained in:
@@ -1006,6 +1006,21 @@ static int32_t KYTY_SYSV_ABI JsonValueCount(const JsonValue* self) {
|
||||
}
|
||||
}
|
||||
|
||||
static void KYTY_SYSV_ABI JsonValueClearMethod(void* self) {
|
||||
PRINT_NAME();
|
||||
|
||||
LOGF("\t self = 0x%016" PRIx64 "\n", reinterpret_cast<uint64_t>(self));
|
||||
|
||||
auto* value = reinterpret_cast<JsonValue*>(self);
|
||||
if (value != nullptr) {
|
||||
auto* parent = value->parent;
|
||||
auto* rootparam = value->rootparam;
|
||||
JsonValueClear(value);
|
||||
value->parent = parent;
|
||||
value->rootparam = rootparam;
|
||||
}
|
||||
}
|
||||
|
||||
LIB_DEFINE(InitNet_1_Json2) {
|
||||
LIB_FUNC("-hJRce8wn1U", LibJson2::JsonMemAllocatorCtor);
|
||||
LIB_FUNC("WSOuge5IsCg", LibJson2::JsonInitParameter2Ctor);
|
||||
@@ -1076,6 +1091,7 @@ LIB_DEFINE(InitNet_1_Json2) {
|
||||
LIB_FUNC("RBw+4NukeGQ", LibJson2::JsonValueCount);
|
||||
LIB_FUNC("+drDFyAS6u4", LibJson2::JsonInitializerSetGlobalNullAccessCallback);
|
||||
LIB_FUNC("00oCq0RwSAY", LibJson2::JsonInitializerSetGlobalNullAccessCallback);
|
||||
LIB_FUNC("FIjXN2TkuTs", LibJson2::JsonValueClearMethod);
|
||||
}
|
||||
|
||||
} // namespace LibJson2
|
||||
|
||||
Reference in New Issue
Block a user