[njs] Added njs_core.h
Dmitry Volyntsev
xeioex at nginx.com
Thu May 3 15:29:59 UTC 2018
details: http://hg.nginx.org/njs/rev/2b64817dd8f6
branches:
changeset: 514:2b64817dd8f6
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Fri Apr 27 14:21:39 2018 +0300
description:
Added njs_core.h
diffstat:
Makefile | 25 ++++++++++++++++++++++
nginx/ngx_http_js_module.c | 7 ------
nginx/ngx_stream_js_module.c | 7 ------
njs/njs.c | 21 ++----------------
njs/njs_array.c | 21 +------------------
njs/njs_boolean.c | 16 +-------------
njs/njs_builtin.c | 27 ++---------------------
njs/njs_core.h | 45 +++++++++++++++++++++++++++++++++++++++++
njs/njs_crypto.c | 18 +---------------
njs/njs_date.c | 22 +-------------------
njs/njs_disassembler.c | 15 +------------
njs/njs_error.c | 18 +---------------
njs/njs_event.c | 21 +------------------
njs/njs_extern.c | 18 +---------------
njs/njs_fs.c | 19 +----------------
njs/njs_function.c | 18 +---------------
njs/njs_generator.c | 19 +----------------
njs/njs_json.c | 21 +------------------
njs/njs_lexer.c | 16 +-------------
njs/njs_lexer_keyword.c | 17 +--------------
njs/njs_math.c | 15 +------------
njs/njs_module.c | 18 +---------------
njs/njs_number.c | 19 +---------------
njs/njs_object.c | 21 +------------------
njs/njs_parser.c | 22 +-------------------
njs/njs_parser_expression.c | 20 +-----------------
njs/njs_regexp.c | 26 +---------------------
njs/njs_regexp_pattern.h | 3 +-
njs/njs_string.c | 27 +-----------------------
njs/njs_time.c | 20 +-----------------
njs/njs_variable.c | 18 +---------------
njs/njs_vm.c | 25 +---------------------
njs/njs_vm.h | 2 +
njs/njscript.c | 24 +--------------------
njs/njscript.h | 10 +++++++++
njs/test/njs_benchmark.c | 8 +------
njs/test/njs_interactive_test.c | 7 ------
njs/test/njs_unit_test.c | 13 +----------
38 files changed, 122 insertions(+), 567 deletions(-)
diffs (truncated from 1248 to 1000 lines):
diff -r 809a919a2f5a -r 2b64817dd8f6 Makefile
--- a/Makefile Fri Apr 27 14:19:45 2018 +0300
+++ b/Makefile Fri Apr 27 14:21:39 2018 +0300
@@ -125,6 +125,8 @@ dist:
$(NXT_BUILDDIR)/njscript.o: \
$(NXT_BUILDDIR)/libnxt.a \
+ njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_string.h \
njs/njs_object.h \
@@ -140,6 +142,7 @@ dist:
$(NXT_BUILDDIR)/njs_vm.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_number.h \
njs/njs_string.h \
@@ -173,6 +176,7 @@ dist:
$(NXT_BUILDDIR)/njs_number.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_number.h \
njs/njs_string.h \
@@ -188,6 +192,7 @@ dist:
$(NXT_BUILDDIR)/njs_string.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_number.h \
njs/njs_string.h \
@@ -206,6 +211,7 @@ dist:
$(NXT_BUILDDIR)/njs_object.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_object.h \
njs/njs_object_hash.h \
@@ -219,6 +225,7 @@ dist:
$(NXT_BUILDDIR)/njs_array.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_number.h \
njs/njs_string.h \
@@ -235,6 +242,7 @@ dist:
$(NXT_BUILDDIR)/njs_json.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_object.h \
njs/njs_json.c \
@@ -247,6 +255,7 @@ dist:
$(NXT_BUILDDIR)/njs_function.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_object.h \
njs/njs_array.h \
@@ -260,6 +269,7 @@ dist:
$(NXT_BUILDDIR)/njs_regexp.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_string.h \
njs/njs_object.h \
@@ -276,6 +286,7 @@ dist:
$(NXT_BUILDDIR)/njs_date.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_string.h \
njs/njs_object.h \
@@ -290,6 +301,7 @@ dist:
$(NXT_BUILDDIR)/njs_error.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_string.h \
njs/njs_object.h \
@@ -304,6 +316,7 @@ dist:
$(NXT_BUILDDIR)/njs_math.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_object.h \
njs/njs_math.h \
@@ -316,6 +329,7 @@ dist:
$(NXT_BUILDDIR)/njs_time.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_object.h \
njs/njs_time.h \
@@ -328,6 +342,7 @@ dist:
$(NXT_BUILDDIR)/njs_module.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_module.h \
njs/njs_module.c \
@@ -339,6 +354,7 @@ dist:
$(NXT_BUILDDIR)/njs_event.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_event.h \
njs/njs_event.c \
@@ -361,6 +377,7 @@ dist:
$(NXT_BUILDDIR)/njs_crypto.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_crypto.h \
njs/njs_crypto.c \
@@ -372,6 +389,7 @@ dist:
$(NXT_BUILDDIR)/njs_extern.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_parser.h \
njs/njs_extern.h \
@@ -384,6 +402,7 @@ dist:
$(NXT_BUILDDIR)/njs_variable.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_parser.h \
njs/njs_variable.h \
@@ -396,6 +415,7 @@ dist:
$(NXT_BUILDDIR)/njs_builtin.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_boolean.h \
njs/njs_number.h \
@@ -415,6 +435,7 @@ dist:
$(NXT_BUILDDIR)/njs_lexer.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_parser.h \
njs/njs_lexer.c \
@@ -439,6 +460,7 @@ dist:
$(NXT_BUILDDIR)/njs_parser.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_string.h \
njs/njs_object.h \
@@ -454,6 +476,7 @@ dist:
$(NXT_BUILDDIR)/njs_parser_expression.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_number.h \
njs/njs_object.h \
@@ -469,6 +492,7 @@ dist:
$(NXT_BUILDDIR)/njs_generator.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_number.h \
njs/njs_string.h \
@@ -485,6 +509,7 @@ dist:
$(NXT_BUILDDIR)/njs_disassembler.o: \
$(NXT_BUILDDIR)/libnxt.a \
njs/njscript.h \
+ njs/njs_core.h \
njs/njs_vm.h \
njs/njs_object.h \
njs/njs_parser.h \
diff -r 809a919a2f5a -r 2b64817dd8f6 nginx/ngx_http_js_module.c
--- a/nginx/ngx_http_js_module.c Fri Apr 27 14:19:45 2018 +0300
+++ b/nginx/ngx_http_js_module.c Fri Apr 27 14:21:39 2018 +0300
@@ -9,13 +9,6 @@
#include <ngx_core.h>
#include <ngx_http.h>
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-
#include <njscript.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 nginx/ngx_stream_js_module.c
--- a/nginx/ngx_stream_js_module.c Fri Apr 27 14:19:45 2018 +0300
+++ b/nginx/ngx_stream_js_module.c Fri Apr 27 14:21:39 2018 +0300
@@ -9,13 +9,6 @@
#include <ngx_core.h>
#include <ngx_stream.h>
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-
#include <njscript.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs.c
--- a/njs/njs.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,6 +4,9 @@
* Copyright (C) NGINX, Inc.
*/
+
+#include <njs_core.h>
+#include <njs_builtin.h>
#include <time.h>
#include <errno.h>
#include <string.h>
@@ -13,24 +16,6 @@
#include <sys/stat.h>
#include <locale.h>
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_malloc.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_djb_hash.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_object.h>
-#include <njs_builtin.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
-
#include <readline.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_array.c
--- a/njs/njs_array.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_array.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,26 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_array.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_boolean.c
--- a/njs/njs_boolean.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_boolean.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,21 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_boolean.h>
-#include <njs_object.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
njs_ret_t
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_builtin.c
--- a/njs/njs_builtin.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_builtin.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,33 +4,12 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_djb_hash.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_boolean.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_array.h>
-#include <njs_json.h>
-#include <njs_function.h>
-#include <njs_variable.h>
-#include <njs_extern.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <njs_regexp.h>
#include <njs_date.h>
-#include <njs_error.h>
+#include <njs_time.h>
#include <njs_math.h>
-#include <njs_time.h>
+#include <njs_json.h>
#include <njs_module.h>
#include <njs_fs.h>
#include <njs_crypto.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_core.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/njs/njs_core.h Fri Apr 27 14:21:39 2018 +0300
@@ -0,0 +1,45 @@
+
+/*
+ * Copyright (C) Dmitry Volyntsev
+ * Copyright (C) NGINX, Inc.
+ */
+
+#ifndef _NJS_CORE_H_INCLUDED_
+#define _NJS_CORE_H_INCLUDED_
+
+#include <nxt_auto_config.h>
+
+#include <nxt_types.h>
+#include <nxt_clang.h>
+#include <nxt_alignment.h>
+#include <nxt_string.h>
+#include <nxt_stub.h>
+#include <nxt_utf8.h>
+#include <nxt_djb_hash.h>
+#include <nxt_trace.h>
+#include <nxt_array.h>
+#include <nxt_queue.h>
+#include <nxt_lvlhsh.h>
+#include <nxt_random.h>
+#include <nxt_time.h>
+#include <nxt_malloc.h>
+#include <nxt_mem_cache_pool.h>
+
+#include <njscript.h>
+#include <njs_vm.h>
+#include <njs_variable.h>
+#include <njs_parser.h>
+#include <njs_function.h>
+#include <njs_boolean.h>
+#include <njs_number.h>
+#include <njs_string.h>
+#include <njs_object.h>
+#include <njs_object_hash.h>
+#include <njs_array.h>
+#include <njs_error.h>
+
+#include <njs_event.h>
+
+#include <njs_extern.h>
+
+#endif /* _NJS_CORE_H_INCLUDED_ */
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_crypto.c
--- a/njs/njs_crypto.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_crypto.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,27 +4,11 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
+#include <njs_core.h>
#include <nxt_md5.h>
#include <nxt_sha1.h>
#include <nxt_sha2.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
#include <njs_crypto.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_string.h>
-#include <njs_function.h>
-#include <njs_error.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_date.c
--- a/njs/njs_date.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_date.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,28 +4,8 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_time.h>
-#include <nxt_malloc.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_function.h>
+#include <njs_core.h>
#include <njs_date.h>
-#include <njs_error.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_disassembler.c
--- a/njs/njs_disassembler.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_disassembler.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,20 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_object.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <stdio.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_error.c
--- a/njs/njs_error.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_error.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,23 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_error.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_string.h>
-#include <njs_function.h>
+#include <njs_core.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_event.c
--- a/njs/njs_event.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_event.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,26 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_djb_hash.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_array.h>
-#include <njs_function.h>
-#include <njs_error.h>
-#include <njs_event.h>
-#include <njs_time.h>
+#include <njs_core.h>
#include <string.h>
#include <stdio.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_extern.c
--- a/njs/njs_extern.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_extern.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,23 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_utf8.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_extern.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <string.h>
#include <stdio.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_fs.c
--- a/njs/njs_fs.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_fs.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,24 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_alignment.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
#include <njs_fs.h>
#include <string.h>
#include <fcntl.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_function.c
--- a/njs/njs_function.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_function.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,23 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_array.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_generator.c
--- a/njs/njs_generator.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_generator.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,24 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_function.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
-#include <njs_error.h>
+#include <njs_core.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_json.c
--- a/njs/njs_json.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_json.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,26 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_string.h>
-#include <njs_number.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_array.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
#include <stdio.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_lexer.c
--- a/njs/njs_lexer.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_lexer.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,21 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_lexer_keyword.c
--- a/njs/njs_lexer_keyword.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_lexer_keyword.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,22 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_object.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_math.c
--- a/njs/njs_math.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_math.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,20 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_mem_cache_pool.h>
-#include <nxt_random.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_object.h>
-#include <njs_function.h>
+#include <njs_core.h>
#include <math.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_module.c
--- a/njs/njs_module.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_module.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,23 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
#include <njs_module.h>
#include <string.h>
#include <stdio.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_number.c
--- a/njs/njs_number.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_number.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,23 +4,8 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_array.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
+#include <math.h>
#include <string.h>
#include <stdio.h>
#include <float.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_object.c
--- a/njs/njs_object.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_object.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,26 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_number.h>
-#include <njs_array.h>
-#include <njs_extern.h>
-#include <njs_function.h>
-#include <njs_error.h>
+#include <njs_core.h>
#include <stdio.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_parser.c
--- a/njs/njs_parser.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_parser.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,27 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_utf8.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <nxt_djb_hash.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_extern.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_function.h>
-#include <njs_error.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <njs_regexp.h>
#include <string.h>
#include <stdio.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_parser_expression.c
--- a/njs/njs_parser_expression.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_parser_expression.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,25 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_utf8.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_number.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_function.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <string.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_regexp.c
--- a/njs/njs_regexp.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_regexp.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,32 +4,10 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
-#include <nxt_utf8.h>
-#include <nxt_djb_hash.h>
-#include <nxt_array.h>
-#include <nxt_lvlhsh.h>
-#include <nxt_random.h>
-#include <nxt_pcre.h>
-#include <nxt_malloc.h>
-#include <nxt_mem_cache_pool.h>
-#include <njscript.h>
-#include <njs_vm.h>
-#include <njs_string.h>
-#include <njs_object.h>
-#include <njs_object_hash.h>
-#include <njs_array.h>
-#include <njs_function.h>
-#include <njs_error.h>
-#include <njs_variable.h>
-#include <njs_parser.h>
+#include <njs_core.h>
#include <njs_regexp.h>
#include <njs_regexp_pattern.h>
+
#include <string.h>
#include <stdio.h>
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_regexp_pattern.h
--- a/njs/njs_regexp_pattern.h Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_regexp_pattern.h Fri Apr 27 14:21:39 2018 +0300
@@ -7,7 +7,8 @@
#ifndef _NJS_REGEXP_PATTERN_H_INCLUDED_
#define _NJS_REGEXP_PATTERN_H_INCLUDED_
-#include <pcre.h>
+#include <nxt_pcre.h>
+#include <nxt_regex.h>
typedef enum {
diff -r 809a919a2f5a -r 2b64817dd8f6 njs/njs_string.c
--- a/njs/njs_string.c Fri Apr 27 14:19:45 2018 +0300
+++ b/njs/njs_string.c Fri Apr 27 14:21:39 2018 +0300
@@ -4,32 +4,7 @@
* Copyright (C) NGINX, Inc.
*/
-#include <nxt_auto_config.h>
-#include <nxt_types.h>
-#include <nxt_clang.h>
-#include <nxt_alignment.h>
-#include <nxt_string.h>
-#include <nxt_stub.h>
More information about the nginx-devel
mailing list