feat(libSceJson2): implement sce::Json::String methods and npos #5439
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5439"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by mariusyo07 on 2026-10-13T19:45:01Z.
What
Implements
sce::Json::Stringmember functions (find,rfind,substr,append,clear,reserve) and static membernposin libSceJson2.METAL GEAR SOLID: Peace Walker - Master Collection Version (PPSA18216) stops on
mainwhen relinkingmgspw.elf(#5268):pCF8Ohwre44is_ZN3sce4Json6String4nposE. The binary also links the corresponding string manipulation methods:find/rfind: searches for character starting from given position, returningnposon failure.substr: returns substring copy, throwingstd::out_of_rangeif the starting position exceeds string length.append: appends a string or C string, throwingstd::invalid_argumenton null pointer.clear/reserve: clears string and reserves buffer capacity.Tested
core/libs/prx/libSceJson2/Export.cppandcore/libs/tests/GuestJson.cppcompile cleanly.guest_json_testsinGuestJson.cppexercisesStringMethods(npos,find,rfind,substrwith bounds checks,reserve, bothappendoverloads, andclear). The test fails to link onmainwithout the exports.python3 tools/check_conventions.py --base upstream/main: all checks passed.git diff --check: passes with no whitespace or style warnings.python3 tools/pr_overlap.py --branch feat/json-string-methods: no overlap with open pull requests.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-13T19:45:08Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T19:45:55Z.
Progress report (
2f1597b→495b4f5)📈 System libraries: 88.71% (+0.02%, +7 implemented functions)
✅ 7 implemented
_ZN3sce4Json6String5clearEv_ZN3sce4Json6String6appendEPKc_ZN3sce4Json6String6appendERKS1__ZN3sce4Json6String7reserveEm_ZNK3sce4Json6String4findEcm_ZNK3sce4Json6String5rfindEcm_ZNK3sce4Json6String6substrEmmImported from boykopovar/AnyPS5. Originally posted by simonbronk on 2026-10-14T08:12:32Z.
Tested on Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, full build, this PR (
f2b135327) merged ontomain1209d3707(AI-assisted: Claude Code).main'sExport.cppand the new test kept:guest_json_testsfails to link.guest_jsonpasses 20/20 (--repeat until-fail:20), with theStringMethodschecks.ctest: 637/638; the one failure isguest_memory, which fails intermittently onmainhere too.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T22:15:55Z.
Rebased onto main (test list conflict);
guest_jsonpasses.