[njs] Fixed building with --debug=YES after b28e50b1.
noreply at nginx.com
noreply at nginx.com
Thu May 1 02:12:02 UTC 2025
details: https://github.com/nginx/njs/commit/551ae185972779ee24b67f645212145ddd5522dc
branches: master
commit: 551ae185972779ee24b67f645212145ddd5522dc
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Wed, 30 Apr 2025 18:23:20 -0700
description:
Fixed building with --debug=YES after b28e50b1.
In file included from src/njs_main.h:37,
from src/njs_diyfp.c:12:
src/njs_atom.h: In function ‘njs_atom_to_value’:
src/njs_atom.h:54:31: error: invalid use of incomplete typedef
‘njs_flathsh_descr_t’ {aka ‘struct njs_flathsh_descr_s’}
54 | njs_assert(atom_id < h->elts_count);
| ^~
src/njs_assert.h:14:15: note: in definition of macro ‘njs_assert’
---
src/njs_flathsh.c | 8 --------
src/njs_flathsh.h | 9 ++++++++-
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/njs_flathsh.c b/src/njs_flathsh.c
index f2387c95..a9ef6e69 100644
--- a/src/njs_flathsh.c
+++ b/src/njs_flathsh.c
@@ -76,14 +76,6 @@
#define NJS_FLATHSH_ELTS_MINIMUM_TO_SHRINK 8
-struct njs_flathsh_descr_s {
- uint32_t hash_mask;
- uint32_t elts_size; /* allocated properties */
- uint32_t elts_count; /* include deleted properties */
- uint32_t elts_deleted_count;
-};
-
-
static njs_flathsh_descr_t *njs_flathsh_alloc(njs_flathsh_query_t *fhq,
size_t hash_size, size_t elts_size);
static njs_flathsh_descr_t *njs_expand_elts(njs_flathsh_query_t *fhq,
diff --git a/src/njs_flathsh.h b/src/njs_flathsh.h
index 651afcff..985bdab1 100644
--- a/src/njs_flathsh.h
+++ b/src/njs_flathsh.h
@@ -19,7 +19,14 @@ typedef struct {
} njs_flathsh_elt_t;
-typedef struct njs_flathsh_descr_s njs_flathsh_descr_t;
+typedef struct {
+ uint32_t hash_mask;
+ uint32_t elts_size; /* allocated properties */
+ uint32_t elts_count; /* include deleted properties */
+ uint32_t elts_deleted_count;
+} njs_flathsh_descr_t;
+
+
typedef struct njs_flathsh_query_s njs_flathsh_query_t;
typedef njs_int_t (*njs_flathsh_test_t)(njs_flathsh_query_t *fhq, void *data);
More information about the nginx-devel
mailing list