Skip to content

feat(libSceJson2): implement sce::Json::Value::clear - #1204

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
CyanBook:feat/json2-value-clear
Oct 8, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
CyanBook:feat/json2-value-clear

Conversation

@CyanBook

@CyanBook CyanBook commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What

sce::Json::Value::clear() (_ZN3sce4Json5Value5clearEv) in libSceJson2 was stubbed with NotImplemented_nid_no_patch.

Value::clear now releases any heap resources owned by the value (strings, arrays, objects) via Clear(NodeOf(*self)) and resets its type back to TypeNull, matching the existing behaviour of Object::clear().

GuestJson.cpp gains ValueClear(), verifying that calling clear() on null, integer, string, and object values resets them to TypeNull and allows subsequent reuse.

Tested

  • Windows 11:
    • python tools/check_conventions.py --base origin/main passes with zero errors.
    • python tools/progress.py out confirms libSceJson2 moves from 89/92 (96.7%) to 90/92 (97.8%) and total libraries increase to 2517/2925 (86.05%).
    • Full build left to CI runner.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked: build + full ctest green locally (guest_json passes); the new ValueClear test fails with the Export.cpp change reverted. clear() goes through the same Clear(NodeOf(*self)) path as Value::set(Array/Object), so strings/arrays/objects are released and the value returns to TypeNull. Merging once CI is green (your runs were waiting for approval; I approved them).

@adriadam10
adriadam10 merged commit 3e32797 into boykopovar:main Oct 8, 2026
4 checks passed
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Progress report (cea1ef1 → cbc5b4c)

📈 System libraries: 86.05% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceJson2 _ZN3sce4Json5Value5clearEv

CyanBook added a commit to CyanBook/AnyPS5 that referenced this pull request Oct 8, 2026
klosixgaming-arch added a commit to klosixgaming-arch/AnyPS5 that referenced this pull request Oct 8, 2026
Remove items that have been completed in recent PRs:
- sce::Json::Value::clear (implemented in boykopovar#1204)
- libSceNpPartner001 functions (implemented in boykopovar#1517)
- swprintf formatting (fixed in boykopovar#1512/boykopovar#1511)
- wcsrtombs implementation (completed in boykopovar#1507)
- sceNetResolverAbort (implemented in boykopovar#1502)

Update remaining entries to reflect current state.
klosixgaming-arch added a commit to klosixgaming-arch/AnyPS5 that referenced this pull request Oct 8, 2026
This PR updates TechnicalDebt.md to remove items that have been completed in recent PRs:

**Removed (completed):**
- `sce::Json::Value::clear` - implemented in boykopovar#1204
- libSceNpPartner001 functions (`sceNpEAAccessInitialize`, `sceNpEAAccessTerminate`) - implemented in boykopovar#1517
- swprintf formatting issues - fixed in boykopovar#1512/boykopovar#1511 (now routes through 16-bit guest formatter)
- wcsrtombs implementation - completed in boykopovar#1507 (uses guest's single-byte C locale through wcrtomb)
- sceNetResolverAbort - implemented in boykopovar#1502

**Updated:**
- libSceNpPartner001 entry now reflects the actual implementation status
- Wide-character conversions entry updated to reflect wcsrtombs completion
- PPSA23566 unknown signatures list updated to remove completed items

This keeps the technical debt documentation accurate and up-to-date with recent development.
klosixgaming-arch added a commit to klosixgaming-arch/AnyPS5 that referenced this pull request Oct 8, 2026
This PR updates TechnicalDebt.md to remove items that have been completed in recent PRs:

**Removed (completed):**
- `sce::Json::Value::clear` - implemented in boykopovar#1204
- libSceNpPartner001 functions (`sceNpEAAccessInitialize`, `sceNpEAAccessTerminate`) - implemented in boykopovar#1517
- swprintf formatting issues - fixed in boykopovar#1512/boykopovar#1511 (now routes through 16-bit guest formatter)
- wcsrtombs implementation - completed in boykopovar#1507 (uses guest's single-byte C locale through wcrtomb)
- sceNetResolverAbort - implemented in boykopovar#1502

**Updated:**
- libSceNpPartner001 entry now reflects the actual implementation status
- Wide-character conversions entry updated to reflect wcsrtombs completion
- PPSA23566 unknown signatures list updated to remove completed items

This keeps the technical debt documentation accurate and up-to-date with recent development.
klosixgaming-arch added a commit to klosixgaming-arch/AnyPS5 that referenced this pull request Oct 8, 2026
Remove entries for functions that have been implemented:
- libSceNpPartner001 unknown functions (implemented in boykopovar#1517)
- sce::Json::Value::clear (implemented in boykopovar#1204)
- sceNetResolverAbort (implemented in boykopovar#1502)
- Wide-character conversions: swprintf (fixed in boykopovar#1512/boykopovar#1511), wcsrtombs (completed in boykopovar#1507)

Addresses feedback from @Dextroid17 on PR boykopovar#1833 to remove only completed
entries rather than replacing the entire file.

Written with AI assistance.
klosixgaming-arch added a commit to klosixgaming-arch/AnyPS5 that referenced this pull request Oct 8, 2026
Remove only the debt entries that have since been implemented, leaving
every other entry in TechnicalDebt.md unchanged:

- libSceNpPartner001 EA access functions (implemented in boykopovar#1517)
- sce::Json::Value::clear (implemented in boykopovar#1204)
- sceNetResolverAbort (implemented in boykopovar#1502)
- Wide-character conversions: swprintf (fixed in boykopovar#1511/boykopovar#1512) and
  wcsrtombs (completed in boykopovar#1507)

This is the targeted, reviewable change requested by @Dextroid17 on boykopovar#1539
and boykopovar#1833, instead of replacing the whole file.

Written with AI assistance.
klosixgaming-arch added a commit to klosixgaming-arch/AnyPS5 that referenced this pull request Oct 8, 2026
Remove only the debt entries that have since been implemented, leaving every
other entry in TechnicalDebt.md byte-for-byte unchanged:

- libSceNpPartner001 EA access entry (7CxI50-xlCk, pMxXhNozUX8) - boykopovar#1517
- sce::Json::Value::clear - boykopovar#1204
- sceNetResolverAbort - boykopovar#1502
- Wide-character conversions (swprintf / wcsrtombs) - boykopovar#1511/boykopovar#1512 and boykopovar#1507

Content is aligned to this branch's merge base so the PR diff shows only these
three removals, per the review request on boykopovar#1539.

Written with AI assistance.
klosixgaming-arch added a commit to klosixgaming-arch/AnyPS5 that referenced this pull request Oct 8, 2026
…te-exact)

Remove only the debt entries that have since been implemented, leaving every
other entry byte-for-byte identical to this branch's merge base:

- libSceNpPartner001 EA access entry (7CxI50-xlCk, pMxXhNozUX8) - boykopovar#1517
- sce::Json::Value::clear - boykopovar#1204
- sceNetResolverAbort - boykopovar#1502
- Wide-character conversions (swprintf / wcsrtombs) - boykopovar#1511/boykopovar#1512 and boykopovar#1507

Content is aligned to the merge base so the PR diff shows only these three
removals, per the review request on boykopovar#1539.

Written with AI assistance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants