Skip to content

Extract Rubydex native adapter helpers#886

Open
st0012 wants to merge 2 commits into
mainfrom
codex/native-extension-adapter-helpers
Open

Extract Rubydex native adapter helpers#886
st0012 wants to merge 2 commits into
mainfrom
codex/native-extension-adapter-helpers

Conversation

@st0012

@st0012 st0012 commented Jun 25, 2026

Copy link
Copy Markdown
Member

Problems

  • Several native extension adapters repeated the same handle-to-graph unpacking sequence.
  • Rust-owned C string conversion repeated the same NULL handling, Ruby string creation, and free_c_string ownership pattern.

Solutions

  • Add rdxi_graph_from_handle to centralize handle and graph typed-data unpacking while preserving the existing Ruby graph object ownership.
  • Add rdxi_owned_c_string_to_ruby for Rust-owned strings and use it only at existing free_c_string callsites.

@st0012 st0012 added the chore Something that should not be included in release notes label Jun 25, 2026
@st0012 st0012 marked this pull request as ready for review June 25, 2026 21:56
@st0012 st0012 requested a review from a team as a code owner June 25, 2026 21:56
@st0012 st0012 force-pushed the codex/native-extension-adapter-helpers branch from 2d9bb4b to 84a78f9 Compare June 26, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Something that should not be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant