feat(libSceIcu): implement uloc_openAvailableByType #24020
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24020"
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 akaydesu on 2026-11-20T01:05:34Z.
What
Implements
libSceIcu'suloc_openAvailableByType(core/libs/prx/libSceIcu/AvailableLocales.cpp), replacing theNotImplemented_nid_no_patchstub inLegacyExports.cppand updating its public declaration ininclude/LegacyExports.hpp:typeagainst[0, ULOC_AVAILABLE_COUNT)before forwarding to ICU 78.1'suloc_openAvailableByTypethroughIcu::OpenHostEnumeration, settingU_ILLEGAL_ARGUMENT_ERRORfor out-of-range enum values and preserving ICU'sU_MISSING_RESOURCE_ERRORwhenres_index.resis absent.UEnumeration*in a guest-heap-allocatedUEnumerationrecord withAPS5_VABIcallbacks forclose,count,uNext,next, andreset, with checked guest status/length copies anderrnopreservation.core/libs/prx/libSceIcu/tests/AvailableLocales.cpp(guest_icu_available_locales_errorsandguest_icu_available_locales_data) covering reduced-data parity, invalidULocAvailableTypevalues, prefailed/warning/null/unreadable/read-only status pointers, and fullULOC_AVAILABLE_DEFAULT/ULOC_AVAILABLE_ONLY_LEGACY_ALIASES/ULOC_AVAILABLE_WITH_LEGACY_ALIASESenumeration against a syntheticres_index.respackage loaded viaudata_setCommonData.docs/dev/debt/changes/feat-icu-open-available-by-type.md.Tested
Windows 11 x86-64 (WinLibs MinGW-w64 GCC 15.2.0, Ninja, Release,
-DBUILD_TESTING=ON). BuiltlibSceIcuand the enumeration/availability test executables:ctest --test-dir build -R "guest_icu_(available_locales|availability|enumeration|converter_available_names)" --output-on-failure: 5/5 passed (guest_icu_available_locales_errors,guest_icu_available_locales_data,guest_icu_availability,guest_icu_enumeration,guest_icu_converter_available_names).python core/libs/tests/test_public_headers.py --audit-only,python tools/debt_fold.py --check, andpython tools/check_conventions.py --base origin/mainpassed.python tools/pr_overlap.py --names uloc_openAvailableByTypereportedopen: none, andpython tools/pr_overlap.py --branch feat/icu-open-available-by-typereported no conflicting lines, exports, or new files against any comparable PR (manual diff inspection of the 28 stale PRs that conflict withmainonCMakeLists.txt/LegacyExports.*confirmed none touchuloc_openAvailableByTypeorAvailableLocales). No console or title run.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 repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-20T01:53:30Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
633bd44ec2:tools/check_conventions.pypassed.guest_icu_available_locales_testsbuilt cleanly.guest_icu_available_locales_errors,guest_icu_available_locales_data):core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/AvailableLocales.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T06:29:49Z.
Review: APPROVED
Reviewed — looks good
The implementation and all six changed files were reviewed at head
633bd44ec2104d09bceacf33b13b83e2fa1139ff; no concrete defect was found in the code inspected. The author reports five related Windows tests and three checks passed; I did not run them.What I ran
No commands or tests were run. I read the prepared diff and manifest, all six changed files, and the
HostEnumeration.hppandEnumeration.hppcontext used by the implementation.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The review bundle listed all six changed files as included, and I read all six:
AvailableLocales.cpp,CMakeLists.txt,LegacyExports.cpp,include/LegacyExports.hpp,tests/AvailableLocales.cpp, and the debt note. I also readHostEnumeration.hppandEnumeration.hpp. I did not independently run the reported tests or verify PS5 ABI behavior, reduced-data behavior on console, or any other platform/toolchain.To get this to a good state
Nothing is required.