Repository navigation
feat(libSceIcu): implement locale_getKeywordsStart - #14050
danielhorngt wants to merge 1 commit into
Conversation
Return the first '@' of a locale ID, or null when it has none, as ICU 68.2 does. The firmware 3.20 module is built from ICU 68: the inventory NID BufsAiaX0+s is the hash of the icu_68 BreakIterator symbol. ICU 77 moved this function to std::string_view, so the const char* signature is the one that applies. Record that later firmware is unverified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
BunnyFl
left a comment
There was a problem hiding this comment.
Windows 11, WinLibs GCC 15.2.0 r7, Release. Head c0bf834 merged into upstream/main 93dbd0f:
- All 9
guest_icu_*tests pass, including the newguest_icu_locale. - Mutation check: with
std::strchrchanged tostd::strrchr,guest_icu_localefails (locale "en@a=b@c=d": expected offset 2, got 6). tools/check_conventions.py --base upstream/main --head c0bf834527: passes.
I recomputed the version argument independently. _ZN6icu_6813BreakIterator23createCharacterInstanceERKNS_6LocaleER10UErrorCode hashes to BufsAiaX0+s, which main already exports from libSceIcu, while the icu_65 spelling gives EfNWIZF8McY. And locale_getKeywordsStart hashes to wlK146pHnQ4. So ICU 68's const char* signature and its uprv_strchr(localeID, '@') body are the right reference.
What
Implements
locale_getKeywordsStart(NIDwlK146pHnQ4, in the PS5 3.20 inventory), which was a throwing stub. It returns a pointer to the first@of a locale ID, or null when there is none. A null locale, which ICU dereferences, throws.The signature needed evidence, because ICU changed it. ICU 65.1, 68.2 and 76.1 take
const char*; ICU 77.1 and the 78.1 commit pinned in the debt notes takestd::string_view. Firmware 3.20's module is ICU 68:tools-style NID hashing of_ZN6icu_6813BreakIterator23createCharacterInstanceERKNS_6LocaleER10UErrorCodegivesBufsAiaX0+s, a 3.20 inventory NID, and theicu_65spelling does not match. So this usesconst char*and follows ICU 68.2uloc.cpp. The EBCDIC branch there does not apply. The debt entry records that the ICU version of later firmware is unverified.The stub counts in
docs/dev/debt/libSceIcu.mdgo from 93 to 92 and from 73 to 72.Tested
Windows 11 Pro, i9-12900K, WinLibs GCC 15.2.0 r7, full build tree. No title or console was used.
ctest -R '^guest_icu_': all 9 passed, including the newguest_icu_locale.ctest -R '^(public_headers|conventions_wrapped_declarations)$': passed.guest_icu_localechecks the exact returned pointer: first@of several,@first and last, bytes above 0x7f, no@, an empty string, a@after the terminator, 64 KiB strings, and a null locale throwingstd::invalid_argument.strchrwithstrrchrmadeguest_icu_localefail. That edit was reverted.python tools/check_conventions.py --base upstream/mainpassed.python tools/pr_overlap.py --branch feat/icu-locale-keywords-startexited 2. It lists feat(libSceIcu): implement u_getVersion and u_errorName #11115, feat(libSceIcu): implement the constrained field position exports #11118, feat(libSceIcu): implement the code point set exports #11122, feat(libSceIcu): implement the enumeration dispatch exports #11132, feat(libSceIcu): implement the string and UTF-8 character iterators #11136, feat(libSceIcu): implement UTF-32, Java UTF-8, comparison and configuration exports #12320, feat(icu): implement converter name and signature helpers #12738 and feat(libSceIcu): implement property and case exports from ICU tables #13578, which shareCMakeLists.txtand the debt file, and for feat(libSceIcu): implement UTF-32, Java UTF-8, comparison and configuration exports #12320 and feat(libSceIcu): implement property and case exports from ICU tables #13578Export.cpp. None of their diffs nameslocale_getKeywordsStart, so any conflict is at the ends of those shared files, not the same function.Not run: the full test suite, the
libstarget, Linux, macOS, or the relinker on a module that imports this function.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)🤖 Generated with Claude Code