From: Dmitry Volyntsev Date: Mon, 12 Feb 2018 11:54:23 +0000 (+0300) Subject: Fixed building by SunC. X-Git-Tag: 0.2.0~42 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=25939cdf17c0f95e4021b549cee793430f029500;p=njs.git Fixed building by SunC. --- diff --git a/njs/njs_object.c b/njs/njs_object.c index 6976195e..29e392a9 100644 --- a/njs/njs_object.c +++ b/njs/njs_object.c @@ -823,11 +823,13 @@ njs_object_seal(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, { nxt_lvlhsh_t *hash; njs_object_t *object; + const njs_value_t *retval; njs_object_prop_t *prop; nxt_lvlhsh_each_t lhe; if (nargs < 2 || !njs_is_object(&args[1])) { - vm->retval = (nargs < 2) ? njs_value_void : args[1]; + retval = (nargs < 2) ? &njs_value_void : &args[1]; + vm->retval = *retval; return NXT_OK; } @@ -906,8 +908,11 @@ static njs_ret_t njs_object_prevent_extensions(njs_vm_t *vm, njs_value_t *args, nxt_uint_t nargs, njs_index_t unused) { + const njs_value_t *retval; + if (nargs < 2 || !njs_is_object(&args[1])) { - vm->retval = (nargs < 2) ? njs_value_void : args[1]; + retval = (nargs < 2) ? &njs_value_void : &args[1]; + vm->retval = *retval; return NXT_OK; }