Skip to content

Update ObjRuby::Pointer to use TypedData_Wrap_Struct #16

@keegnotrub

Description

@keegnotrub

We use Data_Wrap_Struct and Data_Get_Struct across all of ObjRuby right now but it's been deprecated for a very long time in favor of TypedData_Wrap_Struct and TypedData_Get_Struct respectively. There was a bug in Ruby that didn't warn about this deprecation until Ruby 3.5 so we missed it.

Ideally we'd update it all, but maybe as an initial learning task it would be easier to start with ObjRuby::Pointer as its a "normal" struct rather than a wrapper on id like our other calls. I think ObjRuby::Pointer also missed calling Data_Get_Struct and instead calls DATA_PTR directly which isn't documented and avoids any type checking which isn't great, so it would be nice to try to get away from that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions