feat(libSceIcu): implement uprv_isASCIILetter from ICU 68.2 #19951
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19951"
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 MarcZX10 on 2026-11-14T09:20:09Z.
What
One libSceIcu export is still a stub that throws
NotImplemented_nid_no_patch:uprv_isASCIILetter. This PR implements it incore/libs/prx/libSceIcu/AsciiStrings.cpp, following ICU 68.2'scommon/cstring.cpp, and keeps its debt fragment.The other four helpers (
uprv_toupper,uprv_stricmp,uprv_strnicmp,uprv_asciitolower) are already implemented onmaininInvariantChars.cpp, so this PR no longer defines them again.Tested
54edec3b4f.ctest -R '^guest_icu': 44 of 44 tests pass, including the newguest_icu_ascii_strings.<cctype>), and checks the string helpers against a C-locale reference fornfrom 0 to 4 and for the full strings, comparing signs. It also pins exact values by hand:"Z"vs"["gives 31,"\xC3"vs"\xE3"gives -32,strnicmp("abcdef","ABCxyz",4)gives -20.NotImplemented_nid_no_patch, so the new tests are expected to abort on base; that expectation has not been checked.tools/check_conventions.py --base upstream/main: passed.tools/pr_precheck.py(no-build): see the comment on this PR.Not run: the console, Windows, macOS, and the ICU data-driven helpers. The ASCII charset family is assumed, not measured on the console; the debt doc says so.
Overlap
tools/pr_overlap.py --branchfails closed: it could not compare the shared filesCMakeLists.txt,LegacyExports.cpp,include/LegacyExports.hppanddocs/dev/debt/libSceIcu.mdwith the open PRs that touch them (14340, 14443, 16250, 17297, 17852, 17916, 18203, 18208, 18210, 18344, 18557, 19435, among others).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-14T09:31:12Z.
Review: CHANGES_REQUESTED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
54edec3b4f:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_ascii_strings_testsbuilt cleanly.guest_icu_ascii_strings):core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.if (dst == src || n == 0) return 0;precedes null checks). Calling uprv_strnicmp_nid_postfix(nullptr, "abc", 0) returns -1 instead of 0, and calling uprv_strnicmp_nid_postfix("abc", nullptr, 0) returns 1 instead of 0.#endifand namespace ends.'Requesting changes for the points above.
Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T11:28:51Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
1f577cc77e:tools/check_conventions.pypassed;git diff --checkclean.guest_icu_ascii_strings_testsbuilt cleanly.guest_icu_ascii_strings):core/libs/prx/libSceIcu/LegacyExports.cpp,core/libs/prx/libSceIcu/include/LegacyExports.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me