static mrb_value mrb_uv_key_destroy(mrb_state *mrb, mrb_value self) { uv_key_t *key = (uv_key_t*)mrb_uv_get_ptr(mrb, self, &mrb_uv_key_type); mrb_ary_clear(mrb, mrb_iv_get(mrb, self, mrb_intern_lit(mrb, "values"))); uv_key_delete(key); return self; }
static mrb_value mrb_queue_clear(mrb_state* mrb, mrb_value self) { mrb_queue_context* context = DATA_PTR(self); mrb_queue_lock(mrb, self); mrb_ary_clear(mrb, context->queue); mrb_queue_unlock(mrb, self); return mrb_nil_value(); }
static mrb_value mrb_ary_clear_m(mrb_state *mrb, mrb_value self) { mrb_get_args(mrb, ""); return mrb_ary_clear(mrb, self); }