feat(libSceIcu): implement the ulist string list exports #20230
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20230"
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 beardsciences on 2026-11-14T21:18:49Z.
What
Fourteen libSceIcu exports are stubs that throw
NotImplemented_nid_no_patch:ulist_createEmptyList,ulist_addItemEndList,ulist_addItemBeginList,ulist_containsString,ulist_removeString,ulist_getNext,ulist_getListSize,ulist_resetList,ulist_deleteList,ulist_close_keyword_values_iterator,ulist_count_keyword_values,ulist_next_keyword_value,ulist_reset_keyword_values_iteratorandulist_getListFromEnum. They are ICU's internal string list, the whole ofcommon/ulist.cpp, under the ICU 68 names their NIDs already carry inLegacyExports.cpp.This PR implements all fourteen in a new
core/libs/prx/libSceIcu/List.cpp, with the signatures of ICU 68.2'sulist.hand the behaviour of itsulist.cpp:github.com/unicode-org/icu@84e1f26ea7/icu4c/source/common/ulist.cppgithub.com/unicode-org/icu@84e1f26ea7/icu4c/source/common/ulist.hThe bundled 78.1 copy differs from 68.2 only in
NULL/nullptrspelling.forceDelete) items with one iteration position, over ICU's 32-byteUListandUListNode.*_keyword_value*exports are the callbacks of aUEnumerationwhose context is a list; they work with theuenum_*dispatch already onmain, and the test drives them through it.uprv_malloc. ICU releases them withuprv_free, which the module does not export, soConfiguration.cppgains an internalIcuReleaseMemory_nid_no_patchwithuprv_free's behaviour: the functionu_setMemoryFunctionsinstalled, else the guestfree, and never the zero-byte sentineluprv_malloc(0)returns.UErrorCode, a null enumeration, a null string that a comparison reaches) the export throws. A null string that no comparison reaches is not read, as in ICU.docs/dev/debt/changes/feat-icu-ulist.mdadds a libSceIcu entry recording that nothing here is verified on a console, including the two layouts, and addsulist_*to the implemented list of the Older callable exports entry.List.cppkeeps ICU's copyright notice verbatim and the pinned source link at its top, as AGENTS.md now allows (#20002).Tested
Windows 11 26200, WinLibs GCC 15.2.0, Release, Ryzen 5 5600X. Built and run at the head
69440437f4onmain6a86d4d1a9.ctest -R '^public_headers|^guest_icu': 110 of 110 pass, including the newguest_icu_list(3 of 3 runs).guest_icu_listinstalls a tracking allocator throughu_setMemoryFunctionsand checks: order from both ends, the position before and after reset,containsStringlength and byte comparison,removeStringat the head, the tail, the current position and for the first of two equal items, owned data released on removal, on delete and on every refused add, allocation failure (U_MEMORY_ALLOCATION_ERROR), the zero-byte sentinel never reaching the release function, the keyword-value enumeration throughuenum_count,uenum_nextanduenum_close, and that every block is released exactly once.List.cppand of the new release helper (unlinking, size, each release, each status check, each comparison), run at the head. Each one makesguest_icu_listfail; the restored build passes.python tools/check_conventions.py --base origin/mainwith this title and description: passed.python tools/debt_fold.py --check: passed.Not run: Linux, macOS, a console, any title. No title is known to import these exports.
Overlap
needs rebase. No other open PR names or adds aulist_*export (searched open PRs by name and checked the diff of every open PR that touches libSceIcu).LegacyExports.cppand their declarations frominclude/LegacyExports.hpp, appends toCMakeLists.txtand changes the debt file only through its fragment; other open libSceIcu PRs touch the same three source files at other lines.Checklist
main; no other open PR implements the same functions (see Overlap for the stacked series)NotImplemented_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-14T21:27:03Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
69440437f4:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_list_testsbuilt cleanly.guest_icu_list):core/libs/prx/libSceIcu/Configuration.cpp,core/libs/prx/libSceIcu/Configuration.hpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T21:46:56Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
69440437f4:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_list_testsbuilt cleanly.guest_icu_list):core/libs/prx/libSceIcu/Configuration.cpp,core/libs/prx/libSceIcu/Configuration.hpp,core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hpp,core/libs/prx/libSceIcu/libSceIcu.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me