summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_js.h
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
commit69235c513277c64b513447d9b92c3c03d616f577 (patch)
tree0780c92ba28d92b547c85ea0bee5e3040e14dee2 /src/nxt_js.h
parentb9bc222021e77bbdfb12576b3e315b962cf6b399 (diff)
parentfaf97dc06058de1c929af33a68adb34d3932b374 (diff)
downloadunit-1.30.0-1.tar.gz
unit-1.30.0-1.tar.bz2
Merged with the default branch.1.30.0-1
Diffstat (limited to '')
-rw-r--r--src/nxt_js.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nxt_js.h b/src/nxt_js.h
index 74d041ca..48f036b8 100644
--- a/src/nxt_js.h
+++ b/src/nxt_js.h
@@ -21,15 +21,20 @@ typedef struct {
} nxt_js_cache_t;
-nxt_js_conf_t *nxt_js_conf_new(nxt_mp_t *mp);
+njs_mod_t *nxt_js_module_loader(njs_vm_t *vm, njs_external_ptr_t external,
+ njs_str_t *name);
+nxt_js_conf_t *nxt_js_conf_new(nxt_mp_t *mp, nxt_bool_t test);
void nxt_js_conf_release(nxt_js_conf_t *jcf);
void nxt_js_set_proto(nxt_js_conf_t *jcf, njs_external_t *proto, nxt_uint_t n);
+nxt_int_t nxt_js_add_module(nxt_js_conf_t *jcf, nxt_str_t *name,
+ nxt_str_t *text);
nxt_js_t *nxt_js_add_tpl(nxt_js_conf_t *jcf, nxt_str_t *str, nxt_bool_t strz);
nxt_int_t nxt_js_compile(nxt_js_conf_t *jcf);
nxt_int_t nxt_js_test(nxt_js_conf_t *jcf, nxt_str_t *str, u_char *error);
-nxt_int_t nxt_js_call(nxt_task_t *task, nxt_js_cache_t *cache, nxt_js_t *js,
- nxt_str_t *str, void *ctx);
+nxt_int_t nxt_js_call(nxt_task_t *task, nxt_js_conf_t *jcf,
+ nxt_js_cache_t *cache, nxt_js_t *js, nxt_str_t *str, void *ctx);
void nxt_js_release(nxt_js_cache_t *cache);
+nxt_int_t nxt_js_error(njs_vm_t *vm, u_char *error);
extern njs_int_t nxt_js_proto_id;