diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-30 08:19:38 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-11-30 08:19:38 +0900 |
| commit | 86ef9a28062bf3cf5a9c65581067f06eb4608858 (patch) | |
| tree | 5b0db13c51f8cec1a973a5f9c87d470cf9aabe7d /src | |
| parent | 2b9f762ba13cbad50ec33f06a5700f96f0ecbe83 (diff) | |
| download | mruby-86ef9a28062bf3cf5a9c65581067f06eb4608858.tar.gz mruby-86ef9a28062bf3cf5a9c65581067f06eb4608858.zip | |
Avoid calling `mrb_env_unshare()` when `env` is `NULL`.
Small performance improvement by reducing function invocations.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
