Repository: valkey-io/valkey
File: src/valkeymodule.h (C/C++)

Code before:
#define VALKEYMODULE_SUBEVENT_FORK_CHILD_DIED 1
#define _VALKEYMODULE_SUBEVENT_FORK_CHILD_NEXT 2

#define VALKEYMODULE_SUBEVENT_EVENTLOOP_BEFORE_SLEEP 0
#define VALKEYMODULE_SUBEVENT_EVENTLOOP_AFTER_SLEEP 1
#define _VALKEYMODULE_SUBEVENT_EVENTLOOP_NEXT 2

#define VALKEYMODULE_SUBEVENT_KEY_DELETED 0
#define VALKEYMODULE_SUBEVENT_KEY_EXPIRED 1
#define VALKEYMODULE_SUBEVENT_KEY_EVICTED 2
#define VALKEYMODULE_SUBEVENT_KEY_OVERWRITTEN 3
#define _VALKEYMODULE_SUBEVENT_KEY_NEXT 4

#define _VALKEYMODULE_SUBEVENT_SHUTDOWN_NEXT 0
#define _VALKEYMODULE_SUBEVENT_CRON_LOOP_NEXT 0
#define _VALKEYMODULE_SUBEVENT_SWAPDB_NEXT 0

#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_IMPORT_STARTED 0
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_EXPORT_STARTED 1
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_IMPORT_ABORTED 2
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_EXPORT_ABORTED 3
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_IMPORT_COMPLETED 4
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_EXPORT_COMPLETED 5
#define _VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_NEXT 6

/* ValkeyModuleClientInfo flags. 
 * Note: flags VALKEYMODULE_CLIENTINFO_FLAG_PRIMARY and below were added in Valkey 9.1 */
#define VALKEYMODULE_CLIENTINFO_FLAG_SSL (1 << 0)
#define VALKEYMODULE_CLIENTINFO_FLAG_PUBSUB (1 << 1)
#define VALKEYMODULE_CLIENTINFO_FLAG_BLOCKED (1 << 2)
#define VALKEYMODULE_CLIENTINFO_FLAG_TRACKING (1 << 3)
#define VALKEYMODULE_CLIENTINFO_FLAG_UNIXSOCKET (1 << 4)
#define VALKEYMODULE_CLIENTINFO_FLAG_MULTI (1 << 5)
#define VALKEYMODULE_CLIENTINFO_FLAG_READONLY (1 << 6)
#define VALKEYMODULE_CLIENTINFO_FLAG_PRIMARY (1 << 7)
#define VALKEYMODULE_CLIENTINFO_FLAG_REPLICA (1 << 8)
#define VALKEYMODULE_CLIENTINFO_FLAG_MONITOR (1 << 9)
#define VALKEYMODULE_CLIENTINFO_FLAG_MODULE (1 << 10)
#define VALKEYMODULE_CLIENTINFO_FLAG_AUTHENTICATED (1 << 11)
#define VALKEYMODULE_CLIENTINFO_FLAG_EVER_AUTHENTICATED (1 << 12)
#define VALKEYMODULE_CLIENTINFO_FLAG_FAKE (1 << 13)

/* Here we take all the structures that the module pass to the core
 * and the other way around. Notably the list here contains the structures
 * used by the hooks API ValkeyModule_RegisterToServerEvent().
 *
 * The structures always start with a 'version' field. This is useful
 * when we want to pass a reference to the structure to the core APIs,
 * for the APIs to fill the structure. In that case, the structure 'version'
 * field is initialized before passing it to the core, so that the core is
 * able to cast the pointer to the appropriate structure version. In this

Review comment (bug):
Remove trailing space (clang-format check failed)

```suggestion
/* ValkeyModuleClientInfo flags.
```

Code after:
#define VALKEYMODULE_SUBEVENT_FORK_CHILD_DIED 1
#define _VALKEYMODULE_SUBEVENT_FORK_CHILD_NEXT 2

#define VALKEYMODULE_SUBEVENT_EVENTLOOP_BEFORE_SLEEP 0
#define VALKEYMODULE_SUBEVENT_EVENTLOOP_AFTER_SLEEP 1
#define _VALKEYMODULE_SUBEVENT_EVENTLOOP_NEXT 2

#define VALKEYMODULE_SUBEVENT_KEY_DELETED 0
#define VALKEYMODULE_SUBEVENT_KEY_EXPIRED 1
#define VALKEYMODULE_SUBEVENT_KEY_EVICTED 2
#define VALKEYMODULE_SUBEVENT_KEY_OVERWRITTEN 3
#define _VALKEYMODULE_SUBEVENT_KEY_NEXT 4

#define _VALKEYMODULE_SUBEVENT_SHUTDOWN_NEXT 0
#define _VALKEYMODULE_SUBEVENT_CRON_LOOP_NEXT 0
#define _VALKEYMODULE_SUBEVENT_SWAPDB_NEXT 0

#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_IMPORT_STARTED 0
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_EXPORT_STARTED 1
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_IMPORT_ABORTED 2
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_EXPORT_ABORTED 3
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_IMPORT_COMPLETED 4
#define VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_EXPORT_COMPLETED 5
#define _VALKEYMODULE_SUBEVENT_ATOMIC_SLOT_MIGRATION_NEXT 6

/* ValkeyModuleClientInfo flags.
 * Note: flags VALKEYMODULE_CLIENTINFO_FLAG_PRIMARY and below were added in Valkey 9.1 */
#define VALKEYMODULE_CLIENTINFO_FLAG_SSL (1 << 0)
#define VALKEYMODULE_CLIENTINFO_FLAG_PUBSUB (1 << 1)
#define VALKEYMODULE_CLIENTINFO_FLAG_BLOCKED (1 << 2)
#define VALKEYMODULE_CLIENTINFO_FLAG_TRACKING (1 << 3)
#define VALKEYMODULE_CLIENTINFO_FLAG_UNIXSOCKET (1 << 4)
#define VALKEYMODULE_CLIENTINFO_FLAG_MULTI (1 << 5)
#define VALKEYMODULE_CLIENTINFO_FLAG_READONLY (1 << 6)
#define VALKEYMODULE_CLIENTINFO_FLAG_PRIMARY (1 << 7)
#define VALKEYMODULE_CLIENTINFO_FLAG_REPLICA (1 << 8)
#define VALKEYMODULE_CLIENTINFO_FLAG_MONITOR (1 << 9)
#define VALKEYMODULE_CLIENTINFO_FLAG_MODULE (1 << 10)
#define VALKEYMODULE_CLIENTINFO_FLAG_AUTHENTICATED (1 << 11)
#define VALKEYMODULE_CLIENTINFO_FLAG_EVER_AUTHENTICATED (1 << 12)
#define VALKEYMODULE_CLIENTINFO_FLAG_FAKE (1 << 13)

/* Here we take all the structures that the module pass to the core
 * and the other way around. Notably the list here contains the structures
 * used by the hooks API ValkeyModule_RegisterToServerEvent().
 *
 * The structures always start with a 'version' field. This is useful
 * when we want to pass a reference to the structure to the core APIs,
 * for the APIs to fill the structure. In that case, the structure 'version'
 * field is initialized before passing it to the core, so that the core is
 * able to cast the pointer to the appropriate structure version. In this