aboutsummaryrefslogtreecommitdiff
path: root/parse-time-string
diff options
context:
space:
mode:
authorJohannes Larsen <mail@johslarsen.net>2024-09-01 02:02:10 +0200
committerDavid Bremner <david@tethera.net>2025-03-08 10:39:22 -0400
commite8261872dc65ea0259971ff44721a2f7d3f34e67 (patch)
treecf75d2ef7ab4b95601b73710a680e102e1aa223a /parse-time-string
parent53cbb6d0cba6c4763b18f76467e73be21081daae (diff)
ruby: fix "undefining the allocator of T_DATA" warnings
Ruby 3.2 introduced a warning when C-extensions use structs without redefining the allocation default allocation routine meant for objects. See https://bugs.ruby-lang.org/issues/18007 for details. In the Ruby bindings this happens at `Data_Wrap_Notmuch_Object` call sites, so the object types used there needed to update their allocation. This ruby code (given a database at the hardcoded path with messages matching `tag:tmp`) exercise all the ruby objects: require 'notmuch' Notmuch::Database.open File.expand_path("~/mail") do |db| db.get_directory("/tmp") db.query("tag:tmp").search_threads.each do |t| t.messages.each do |m| puts m.header("Subject") end end end Before these changes with ruby 3.2.5 and notmuch 0.38.3 it outputs: notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Query notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Threads notmuch.rb:5: warning: undefining the allocator of T_DATA class Notmuch::Thread notmuch.rb:6: warning: undefining the allocator of T_DATA class Notmuch::Messages notmuch.rb:6: warning: undefining the allocator of T_DATA class Notmuch::Message notmuch release 0.38.3 now available (the last line is the message I tagged with tmp), and after the changes: notmuch release 0.38.3 now available
Diffstat (limited to 'parse-time-string')
0 files changed, 0 insertions, 0 deletions