From: Dmitry Volyntsev Date: Thu, 1 May 2025 01:23:20 +0000 (-0700) Subject: Fixed building with --debug=YES after b28e50b1. X-Git-Tag: 0.9.0~6 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=551ae185972779ee24b67f645212145ddd5522dc;p=njs.git 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’ --- 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);