Skip to content

Conversation

@byroot
Copy link
Member

@byroot byroot commented Nov 3, 2024

This is somewhat dead code as unless you are using JSON::Parser.new direcltly we never allocate JSON::Ext::Parser anymore.

But still, we should mark all its reference in case some code out there uses that.

Followup: #675

This is somewhat dead code as unless you are using `JSON::Parser.new`
direcltly we never allocate `JSON::Ext::Parser` anymore.

But still, we should mark all its reference in case some code out there
uses that.

Followup: ruby#675
# frozen_string_literal: true
require 'mkmf'

have_func("rb_enc_raise", "ruby.h")
Copy link
Member Author

Choose a reason for hiding this comment

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

All rubies have this now, I haven't check exactly when it was added, but I suspect this was for pre-1.9 rubies.

@byroot byroot merged commit 810c0e7 into ruby:master Nov 3, 2024
36 checks passed
@byroot byroot deleted the mark-name-cache branch November 3, 2024 09:11
rb_gc_mark(json->decimal_class);
rb_gc_mark(json->match_string);
const VALUE *name_cache_entries = &json->name_cache.entries[0];
rb_gc_mark_locations(name_cache_entries, name_cache_entries + json->name_cache.length);
Copy link
Member Author

Choose a reason for hiding this comment

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

dyld[4099]: missing symbol called

cc @eregon looks like rb_gc_mark_locations is also missing on Truffle?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant