Skip to content

Commit

Permalink
Switch extension to TypedData API
Browse files Browse the repository at this point in the history
The Data API has been deprecated for a while (see [Ruby's #19998][rb])
and as of Ruby 3.4.0, its usage emits deprecation warnings at build
time.

Switch the extension to use the TypedData API.

The following sources were used as reference:

- Ruby's `extension.rdoc`: https://github.com/ruby/ruby/blob/96db72ce38b27799dd8e80ca00696e41234db6ba/doc/extension.rdoc#encapsulate-c-data-into-a-ruby-object
- Peter Zhu's "A Rubyist's Walk Along the C-side": https://blog.peterzhu.ca/ruby-c-ext-part-7/
- The Definitive Guide to Ruby's C API: http://silverhammermba.github.io/emberb/c/#data

Fixes #1341.

[rb]: https://bugs.ruby-lang.org/issues/19998
  • Loading branch information
unflxw committed Dec 23, 2024
1 parent e23c26f commit 20139cf
Showing 1 changed file with 88 additions and 71 deletions.
Loading

0 comments on commit 20139cf

Please sign in to comment.