- for (; notmuch_messages_valid(messages->nm_messages);
- notmuch_messages_move_to_next(messages->nm_messages))
- {
- messagev = Data_Make_Struct(notmuch_rb_cMessage, notmuch_rb_message_t,
- notmuch_rb_message_mark, notmuch_rb_message_free, message);
- message->nm_message = notmuch_messages_get(messages->nm_messages);
- message->parent = self;
- rb_yield(messagev);
+ for (; notmuch_messages_valid(messages); notmuch_messages_move_to_next(messages)) {
+ message = notmuch_messages_get(messages);
+ rb_yield(Data_Wrap_Struct(notmuch_rb_cMessage, NULL, NULL, message));