Skip to content

Use cast for converting source start pointer to c_char#2914

Merged
soutaro merged 1 commit intoruby:masterfrom
Shopify:vs_use_cast_for_source_start_pointer
Apr 2, 2026
Merged

Use cast for converting source start pointer to c_char#2914
soutaro merged 1 commit intoruby:masterfrom
Shopify:vs_use_cast_for_source_start_pointer

Conversation

@vinistock
Copy link
Copy Markdown
Contributor

More context in Shopify/rubydex#714

We're getting a discrepancy between the cast type for the start_ptr vs the expected types created by cbindgen on aarch64 linux. Based on what I could gather, using cast instead of as guarantees that the type will match (since rbs_string_new accepts a *c_char).

@soutaro soutaro added the no-milestone This PR doesn't associate with a milestone. label Apr 2, 2026
Copy link
Copy Markdown
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@soutaro soutaro merged commit d878821 into ruby:master Apr 2, 2026
27 of 28 checks passed
Edouard-chin added a commit to Shopify/rubydex that referenced this pull request Apr 3, 2026
- cibuildgem supports building binary by any runners supported on
  GitHub. I originally didn't include this platform as I wasnt sure
  whether users would want a precompiled binary for linux aarch64.

  A user asked for it so let's add it to the matrix #714

  I tested and it compiles correctly https://github.com/Shopify/rubydex/actions/runs/23947658226/job/69847719701
  Though it compiles correctly since the latest release of ruby-rbs 0.3.0 thanks
  to thix fix ruby/rbs#2914
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-milestone This PR doesn't associate with a milestone.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants