]> Nishi Git Mirror - gwion.git/commitdiff
:art: Fex fixes
authorfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 7 Mar 2019 08:58:12 +0000 (09:58 +0100)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Thu, 7 Mar 2019 08:58:12 +0000 (09:58 +0100)
src/emit/emit.c
src/lib/modules.c
src/oo/env_utils.c

index 3ce744d69a44fbd5a5922479c6bbb24e7f44990f..9720d486304208817e6cd3e44c5c5e580c420ad6 100644 (file)
@@ -196,7 +196,7 @@ ANN void emit_ext_ctor(const Emitter emit, const VM_Code code) { GWDEBUG_EXE
 ANN m_bool emit_array_extend(const Emitter emit, const Type t, const Exp e) { GWDEBUG_EXE
   CHECK_OB(emit_array_extend_inner(emit, t, e))
   emit_add_instr(emit, PopArrayClass);
-  return 1;
+  return GW_OK;
 }
 
 ANN2(1,2) m_bool emit_instantiate_object(const Emitter emit, const Type type,
index 2ce1aaa5459b1f96d8efb966eb4abd6393d459c2..22b55d3c2fbf89b97e179da0f1b530a18d834f5b 100644 (file)
@@ -44,8 +44,7 @@ static GWION_IMPORT(gain) {
   gwi_func_ini(gwi, "float", "gain", gain_set_gain);
   gwi_func_arg(gwi, "float", "arg0");
   CHECK_BB(gwi_func_end(gwi, 0))
-  CHECK_BB(gwi_class_end(gwi))
-  return 1;
+  return gwi_class_end(gwi);
 }
 
 static TICK(impulse_tick) {
@@ -75,8 +74,7 @@ static GWION_IMPORT(impulse) {
   gwi_func_ini(gwi, "float", "next", impulse_set_next);
   gwi_func_arg(gwi, "float", "arg0");
   CHECK_BB(gwi_func_end(gwi, 0))
-  CHECK_BB(gwi_class_end(gwi))
-  return 1;
+  return gwi_class_end(gwi);
 }
 
 static TICK(fullrect_tick) {
@@ -92,8 +90,7 @@ static CTOR(fullrect_ctor) {
 static GWION_IMPORT(fullrect) {
   const Type t_fullrect = gwi_mk_type(gwi, "FullRect", SZ_INT, t_ugen);
   CHECK_BB(gwi_class_ini(gwi,  t_fullrect, fullrect_ctor, basic_dtor))
-  CHECK_BB(gwi_class_end(gwi))
-  return 1;
+  return gwi_class_end(gwi);
 }
 
 static TICK(halfrect_tick) {
@@ -112,8 +109,7 @@ static CTOR(halfrect_ctor) {
 static GWION_IMPORT(halfrect) {
   const Type t_halfrect = gwi_mk_type(gwi, "HalfRect", SZ_INT, t_ugen);
   CHECK_BB(gwi_class_ini(gwi,  t_halfrect, halfrect_ctor, basic_dtor))
-  CHECK_BB(gwi_class_end(gwi))
-  return 1;
+  return gwi_class_end(gwi);
 }
 
 static TICK(step_tick) {
@@ -142,8 +138,7 @@ static GWION_IMPORT(step) {
   gwi_func_ini(gwi, "float", "next", step_set_next);
   gwi_func_arg(gwi, "float", "arg0");
   CHECK_BB(gwi_func_end(gwi, 0))
-  CHECK_BB(gwi_class_end(gwi))
-  return 1;
+  return gwi_class_end(gwi);
 }
 
 static TICK(zerox_tick) {
@@ -162,8 +157,7 @@ static CTOR(zerox_ctor) {
 static GWION_IMPORT(zerox) {
   const Type t_zerox = gwi_mk_type(gwi, "ZeroX", SZ_INT, t_ugen);
   CHECK_BB(gwi_class_ini(gwi, t_zerox, zerox_ctor, basic_dtor))
-  CHECK_BB(gwi_class_end(gwi))
-  return 1;
+  return gwi_class_end(gwi);
 }
 
 GWION_IMPORT(modules) {
@@ -172,6 +166,5 @@ GWION_IMPORT(modules) {
   CHECK_BB(import_fullrect(gwi))
   CHECK_BB(import_halfrect(gwi))
   CHECK_BB(import_step(gwi))
-  CHECK_BB(import_zerox(gwi))
-  return 1;
+  return import_zerox(gwi);
 }
index d496e35defdb174af335822cab50079ad9f1c658..13885479efee738cb20a0bad6d0c248ca3a0f70b 100644 (file)
@@ -74,6 +74,6 @@ ANN Type find_type(const Env env, ID_List path) {
 ANN m_bool already_defined(const Env env, const Symbol s, const uint pos) {
   const Value v = nspc_lookup_value0(env->curr, s);
   return v ? err_msg(pos,
-    "'%s' already declared as variable of type '%s'.", s_name(s), v->type->name) : 1;
+    "'%s' already declared as variable of type '%s'.", s_name(s), v->type->name) : GW_OK;
 }