Avoid calling mrb_env_unshare() when env is NULL.

Small performance improvement by reducing function invocations.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-11-30 08:19:38 +09:00
parent 2b9f762ba1
commit 86ef9a2806
+1 -1
View File
@@ -300,7 +300,7 @@ cipop(mrb_state *mrb)
struct REnv *env = c->ci->env;
c->ci--;
mrb_env_unshare(mrb, env);
if (env) mrb_env_unshare(mrb, env);
}
void mrb_exc_set(mrb_state *mrb, mrb_value exc);