* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/ .
+ * along with this program. If not, see https://www.gnu.org/licenses/ .
*
* Author: Ali Polatel <alip@exherbo.org>
*/
VALUE
notmuch_rb_messages_destroy (VALUE self)
{
- notmuch_messages_t *messages;
-
- Data_Get_Notmuch_Messages (self, messages);
-
- notmuch_messages_destroy (messages);
- DATA_PTR (self) = NULL;
+ notmuch_rb_object_destroy (self, ¬much_rb_messages_type);
return Qnil;
}
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));
+ rb_yield (Data_Wrap_Notmuch_Object (notmuch_rb_cMessage, ¬much_rb_message_type, message));
}
return self;
if (!tags)
rb_raise (notmuch_rb_eMemoryError, "Out of memory");
- return Data_Wrap_Struct (notmuch_rb_cTags, NULL, NULL, tags);
+ return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags);
}