Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Undefine allocation function for C extension class
* Undefine allocation function for C extension class Since Ruby 3.2 a new warning is printed when a Ruby class created in a C extension does not specify an allocate function or undefine it. ``` /gem/lib/appsignal/transaction.rb:98: warning: undefining the allocator of T_DATA class Appsignal::Extension::Transaction /gem/lib/appsignal/utils/data.rb:19: warning: undefining the allocator of T_DATA class Appsignal::Extension::Data ``` From my understanding, we only need to define an allocate function if the class uses a C struct and stores any values on it. Our classes don't do that in C, that's done in our Rust extension. Closes #909 ## Resources https://bugs.ruby-lang.org/issues/18007 https://github.com/ruby/ruby/blob/6963f8f743b42f9004a0879cd66c550f18987352/doc/extension.rdoc#label-Write+the+C+Code https://ruby-doc.org/core-3.1.1/doc/extension_rdoc.html#label-C+struct+to+Ruby+object rails-sqlserver/tiny_tds#515 https://groups.google.com/g/sequel-talk/c/K0J80s4wGJU/m/BT-6FFhrAgAJ ## Other MR doing similar change vmg/redcarpet#721 appsignal/appsignal-ruby#917
- Loading branch information