[njs] Exposing chb API.

Dmitry Volyntsev xeioex at nginx.com
Mon Jan 11 19:54:00 UTC 2021


details:   https://hg.nginx.org/njs/rev/6d285a23fcbb
branches:  
changeset: 1589:6d285a23fcbb
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Mon Jan 11 19:53:08 2021 +0000
description:
Exposing chb API.

diffstat:

 src/njs.h    |  5 +++++
 src/njs_vm.c |  7 +++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diffs (39 lines):

diff -r 59ab52c9700b -r 6d285a23fcbb src/njs.h
--- a/src/njs.h	Mon Jan 11 19:53:08 2021 +0000
+++ b/src/njs.h	Mon Jan 11 19:53:08 2021 +0000
@@ -18,6 +18,10 @@
 #include <njs_types.h>
 #include <njs_clang.h>
 #include <njs_str.h>
+#include <njs_unicode.h>
+#include <njs_utf8.h>
+#include <njs_mp.h>
+#include <njs_chb.h>
 #include <njs_lvlhsh.h>
 #include <njs_sprintf.h>
 
@@ -317,6 +321,7 @@ NJS_EXPORT njs_function_t *njs_vm_functi
 
 NJS_EXPORT njs_value_t *njs_vm_retval(njs_vm_t *vm);
 NJS_EXPORT void njs_vm_retval_set(njs_vm_t *vm, const njs_value_t *value);
+NJS_EXPORT njs_mp_t *njs_vm_memory_pool(njs_vm_t *vm);
 
 /*  Gets string value, no copy. */
 NJS_EXPORT void njs_value_string_get(njs_value_t *value, njs_str_t *dst);
diff -r 59ab52c9700b -r 6d285a23fcbb src/njs_vm.c
--- a/src/njs_vm.c	Mon Jan 11 19:53:08 2021 +0000
+++ b/src/njs_vm.c	Mon Jan 11 19:53:08 2021 +0000
@@ -612,6 +612,13 @@ njs_vm_retval(njs_vm_t *vm)
 }
 
 
+njs_mp_t *
+njs_vm_memory_pool(njs_vm_t *vm)
+{
+    return vm->mem_pool;
+}
+
+
 uintptr_t
 njs_vm_meta(njs_vm_t *vm, njs_uint_t index)
 {


More information about the nginx-devel mailing list