diff options
author | Igor Sysoev <igor@sysoev.ru> | 2016-07-15 15:50:13 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2016-07-15 15:50:13 +0300 |
commit | cfb9e86cc37b19fa29752ce138d463c954795f7d (patch) | |
tree | 95c24bdeb89648d1ecc8e7f754f596fdf7e89f04 /nginx/ngx_http_js_module.c | |
parent | b32b9b065bb6b37b42125c31a738ab197ddfefbf (diff) | |
download | njs-cfb9e86cc37b19fa29752ce138d463c954795f7d.tar.gz njs-cfb9e86cc37b19fa29752ce138d463c954795f7d.zip |
njs_vm_function() and njs_vm_external() functions name and
behavior unification. The function can be used with both
original compiled VM and its clones.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index 94fd858d..f8a88d47 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -1152,8 +1152,8 @@ ngx_http_js_compile(ngx_conf_t *cf, ngx_http_js_ctx_t *js, ngx_str_t *script) nxt_lvlhsh_init(&externals); - if (njs_add_external(&externals, mcp, 0, ngx_http_js_externals, - nxt_nitems(ngx_http_js_externals)) + if (njs_vm_external_add(&externals, mcp, 0, ngx_http_js_externals, + nxt_nitems(ngx_http_js_externals)) != NJS_OK) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "could not add js externals"); @@ -1191,7 +1191,7 @@ ngx_http_js_compile(ngx_conf_t *cf, ngx_http_js_ctx_t *js, ngx_str_t *script) if (function) { ngx_str_set(&name, "$r"); - rc = njs_external_get(vm, NULL, &name, &js->args[0]); + rc = njs_vm_external(vm, NULL, &name, &js->args[0]); if (rc != NXT_OK) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "could not get $r external"); @@ -1200,7 +1200,7 @@ ngx_http_js_compile(ngx_conf_t *cf, ngx_http_js_ctx_t *js, ngx_str_t *script) ngx_str_set(&name, "response"); - rc = njs_external_get(vm, &js->args[0], &name, &js->args[1]); + rc = njs_vm_external(vm, &js->args[0], &name, &js->args[1]); if (rc != NXT_OK) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "could not get $r.response external"); |