]> git.kaiwu.me - njs.git/commitdiff
Fixed building with --debug=YES after b28e50b1.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 1 May 2025 01:23:20 +0000 (18:23 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 1 May 2025 02:11:20 +0000 (19:11 -0700)
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
src/njs_flathsh.h

index f2387c95b76278ea5f6ca7c89e91afa1b82ee547..a9ef6e699a50a1df8801029deb81a98833754e0a 100644 (file)
 #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,
index 651afcff0145226e13fe98f3078f61212f6e62d3..985bdab1a9d96e288aeca608dbad0236bf04728c 100644 (file)
@@ -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);