summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_tstr.h
diff options
context:
space:
mode:
authorZhidao HONG <z.hong@f5.com>2024-10-28 15:11:52 +0800
committerZhidao HONG <z.hong@f5.com>2024-11-14 09:43:48 +0800
commit2d4624f05dd613701fb1c764c189a2ded7b1cbe5 (patch)
tree1cee504e05b6daecee89bd4a5ef7b46fdd7d9798 /src/nxt_tstr.h
parente1fd14f7749c35a48a480cbfc1ca2da74f84a0a1 (diff)
downloadunit-2d4624f05dd613701fb1c764c189a2ded7b1cbe5.tar.gz
unit-2d4624f05dd613701fb1c764c189a2ded7b1cbe5.tar.bz2
Make nxt_tstr_is_js() macro public in header
This is a preparatory refactoring for upcoming JSON format support in access log. No functional changes.
Diffstat (limited to 'src/nxt_tstr.h')
-rw-r--r--src/nxt_tstr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_tstr.h b/src/nxt_tstr.h
index 8e3cdb93..7fb02631 100644
--- a/src/nxt_tstr.h
+++ b/src/nxt_tstr.h
@@ -64,6 +64,10 @@ nxt_int_t nxt_tstr_query(nxt_task_t *task, nxt_tstr_query_t *query,
void nxt_tstr_query_release(nxt_tstr_query_t *query);
+#define nxt_tstr_is_js(str) \
+ nxt_strchr_start(str, '`')
+
+
nxt_inline nxt_bool_t
nxt_is_tstr(nxt_str_t *str)
{