mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-04-20 14:20:47 +02:00
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 |
||
---|---|---|
.. | ||
.gitignore | ||
database.c | ||
defs.h | ||
directory.c | ||
extconf.rb | ||
filenames.c | ||
init.c | ||
message.c | ||
messages.c | ||
query.c | ||
rdoc.sh | ||
README | ||
status.c | ||
tags.c | ||
thread.c | ||
threads.c |
To build the the notmuch ruby extension, run the following commands from the *top level* notmuch source directory: % ./configure % make ruby-bindings The generic documentation about building notmuch also applies.