Welcome! Log In Create A New Profile

Advanced

[njs] Exposing chb API.

Dmitry Volyntsev
January 11, 2021 02:56PM
details: https://hg.nginx.org/njs/rev/6d285a23fcbb
branches:
changeset: 1589:6d285a23fcbb
user: Dmitry Volyntsev <xeioex@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)
{
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Exposing chb API.

Dmitry Volyntsev 215 January 11, 2021 02:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 263
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready