]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hashmap: Make sure Iterator struct is named
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 14 May 2025 15:14:35 +0000 (17:14 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 14 May 2025 15:21:37 +0000 (17:21 +0200)
Otherwise we can't forward declare it.

Split out of #37344

src/basic/hashmap.h

index f7e02c814e7b2445e3452259e9974ac0cc30abca..4aa8fbb0038e270e765c6deb4a49842026ac28b0 100644 (file)
@@ -38,7 +38,7 @@ typedef struct IteratedCache IteratedCache;   /* Caches the iterated order of on
 /* Ideally the Iterator would be an opaque struct, but it is instantiated
  * by hashmap users, so the definition has to be here. Do not use its fields
  * directly. */
-typedef struct {
+typedef struct Iterator {
         const void *next_key; /* expected value of that entry's key pointer */
         unsigned idx;         /* index of an entry to be iterated next */
 #if ENABLE_DEBUG_HASHMAP