Skip to content

libobs: extract and characterize obs_set_locale before its Rust port #5041

Closed

Description

@zackees

Unit

C-only prerequisite: obs_set_locale in libobs/obs.c.h:1360-1375, before a separate Rust port to obs-core.

Phase and position

Phase 6 libobs core, worker-pool scout gap G5 (rank 6). Follow the testing policy's characterization and function-extraction prerequisite; this issue contains no Rust swap.

Dependencies and existing tests

Existing core-info/global-getter tests cover ordinary locale storage but do not pin allocation ownership or ordered module notifications. No existing issue or PR references obs_set_locale; the open-PR file inventory at launch has no PR touching libobs/obs.c.h or libobs/build/libobs.core+.h.c.

Scope and acceptance

  • Add a focused cmocka characterization test for locale replacement: the old allocation is freed, the new string is copied and owned independently of the caller.
  • Pin linked-list notification order, original locale argument forwarding, storage replacement before notifications, and skipping modules without set_locale.
  • Move the function verbatim into libobs/obs-set-locale.c.h, with the existing core PCH and an alphabetical include in libobs/build/libobs.core+.h.c.
  • Run the characterization against the unchanged C implementation and after extraction; keep all existing C tests and public headers unchanged. Run ./lint and publish through ./push.
  • File a separate Rust-swap follow-up. No behavior, signature, protocol or plugin changes.

Separate Rust-swap follow-up: #5042 (waits for this prerequisite to land).

Activity

  1. added
    portPort a C unit to Rust (four-tier policy)
    readyMeets the definition of Ready; claimable
    P2Normal priority
    on Nov 18, 2026
  2. zackees commented on Nov 18, 2026

    @zackees
    MemberAuthor

    Claiming: C-only characterization and verbatim extraction of obs_set_locale, branch test/5041-set-locale-extraction, pool slot obs-studio3 (g5-locale).

    1. Add focused cmocka ownership and ordered module-callback characterization against the existing C implementation.
    2. Extract the function verbatim into its own core unity member, then rerun the characterization and lint.
    3. Open the prerequisite PR this session and file the separate Rust-swap follow-up; arm only when backpressure allows.
  3. moved this from In progress to Ready in obs-rust Multiviewon Nov 19, 2026
  4. rdoupe commented on Nov 19, 2026

    @rdoupe
    Collaborator

    Done in #5045 (merged 2026-11-18), the characterization and extraction. The Rust swap is #5042 (PR #5061).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priorityportPort a C unit to Rust (four-tier policy)readyMeets the definition of Ready; claimablesize:SHours

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions