* 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_threads_destroy (VALUE self)
{
- notmuch_threads_t *threads;
-
- Data_Get_Struct (self, notmuch_threads_t, threads);
-
- notmuch_threads_destroy (threads);
- DATA_PTR (self) = NULL;
+ notmuch_rb_object_destroy (self, ¬much_rb_threads_type);
return Qnil;
}
for (; notmuch_threads_valid (threads); notmuch_threads_move_to_next (threads)) {
thread = notmuch_threads_get (threads);
- rb_yield (Data_Wrap_Struct (notmuch_rb_cThread, NULL, NULL, thread));
+ rb_yield (Data_Wrap_Notmuch_Object (notmuch_rb_cThread, ¬much_rb_thread_type, thread));
}
return self;