From 96938180b50851adc5cd2872a5bceba2f4324f3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 29 Apr 2021 18:49:53 +0200 Subject: [PATCH] :art: Use handle --- include/object.h | 2 -- plug | 2 +- src/lib/object.c | 6 ------ tests/plug/callback.c | 2 +- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/include/object.h b/include/object.h index 04c975ee..b7891efb 100644 --- a/include/object.h +++ b/include/object.h @@ -20,7 +20,6 @@ ANEW M_Object new_string2(const struct Gwion_*, const VM_Shred, const m_str); ANEW M_Object new_shred(const VM_Shred); ANN void fork_launch(const M_Object, const m_uint); ANN void __release(const M_Object, const VM_Shred); -ANN void exception(const VM_Shred, const m_str); ANN void broadcast(const M_Object); #define STRING(o) (*(m_str*) ((M_Object)o)->data) @@ -29,7 +28,6 @@ ANN void broadcast(const M_Object); #define UGEN(o) (*(UGen*) ((M_Object)o)->data) #define ARRAY(o) (*(M_Vector*) ((M_Object)o)->data) #define IO_FILE(o) (*(FILE**) (((M_Object)o)->data + SZ_INT)) -#define Except(s, c) { exception(s, c); return; } static inline void _release(const restrict M_Object obj, const restrict VM_Shred shred) { if(!--obj->ref)__release(obj, shred); diff --git a/plug b/plug index 7680ae9a..522535c7 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit 7680ae9aa87eb19cf084c5aa1b83b47b08a85732 +Subproject commit 522535c79521ca4d0f3419f8c283453881b43a79 diff --git a/src/lib/object.c b/src/lib/object.c index ed256719..69dd9f41 100644 --- a/src/lib/object.c +++ b/src/lib/object.c @@ -19,12 +19,6 @@ #include "gack.h" #undef insert_symbol -ANN void exception(const VM_Shred shred, const m_str c) { -//handle(shred); - gw_err("{+}%s{0}: shred[{-}id=%" UINT_F "{0}:%s], PC=[{-}%" UINT_F "{0}]\n", - c, shred->tick->xid, shred->info->name, shred->pc - 1); - vm_shred_exit(shred); -} M_Object new_object(MemPool p, const VM_Shred shred, const Type t) { const M_Object a = mp_calloc(p, M_Object); diff --git a/tests/plug/callback.c b/tests/plug/callback.c index af45e0cd..5c5e19f4 100644 --- a/tests/plug/callback.c +++ b/tests/plug/callback.c @@ -39,7 +39,7 @@ static SFUN(cb_func) { m_uint i; Func f = *(Func*)MEM(0); if(!f){ - Except(shred, "NullCallbackException"); + handle(shred, "NullCallbackException"); } m_uint offset = shred->mem - ((m_bit*)shred + sizeof(struct VM_Shred_) + SIZEOF_REG); PUSH_MEM(shred, offset); -- 2.43.0