Final batch of conversions to option and verb macros (#42127)

This commit is contained in:
Yu Watanabe
2026-05-17 03:50:48 +09:00
committed by GitHub
70 changed files with 208 additions and 895 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ bool argv_looks_like_help(int argc, char **argv) {
char **l;
/* Scans the command line for indications the user asks for help. This is supposed to be called by
* tools that do not implement getopt() style command line parsing because they are not primarily
* tools that do not implement getopt()-style command line parsing because they are not primarily
* user-facing. Detects four ways of asking for help:
*
* 1. Passing zero arguments
+1 -2
View File
@@ -1,13 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "memory-util.h"
#include "static-destruct.h"
void static_destruct_impl(const StaticDestructor *start, const StaticDestructor *end) {
if (!start)
return;
for (const StaticDestructor *d = ALIGN_PTR(start); d < end; d = ALIGN_PTR(d + 1))
for (const StaticDestructor *d = start; d < end; d++)
switch (d->type) {
case STATIC_DESTRUCTOR_SIMPLE:
d->simple.destroy(d->simple.data);
+2
View File
@@ -44,6 +44,8 @@ typedef struct StaticDestructor {
};
} StaticDestructor;
assert_cc(sizeof(StaticDestructor) % sizeof(void*) == 0);
#define STATIC_DESTRUCTOR_REGISTER(variable, func) \
_STATIC_DESTRUCTOR_REGISTER(UNIQ, variable, func)