summaryrefslogtreecommitdiff
path: root/shared/nm-glib-aux/nm-macros-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared/nm-glib-aux/nm-macros-internal.h')
-rw-r--r--shared/nm-glib-aux/nm-macros-internal.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/shared/nm-glib-aux/nm-macros-internal.h b/shared/nm-glib-aux/nm-macros-internal.h
index bce080579c..52591040e2 100644
--- a/shared/nm-glib-aux/nm-macros-internal.h
+++ b/shared/nm-glib-aux/nm-macros-internal.h
@@ -1362,8 +1362,8 @@ nm_g_variant_take_ref (GVariant *v)
#define NM_UTILS_LOOKUP_ITEM_IGNORE(v) (void) 0; case v: break; (void) 0
#define NM_UTILS_LOOKUP_ITEM_IGNORE_OTHER() (void) 0; default: break; (void) 0
-#define _NM_UTILS_LOOKUP_DEFINE(scope, fcn_name, lookup_type, result_type, unknown_val, ...) \
-scope result_type \
+#define NM_UTILS_LOOKUP_DEFINE(fcn_name, lookup_type, result_type, unknown_val, ...) \
+result_type \
fcn_name (lookup_type val) \
{ \
switch (val) { \
@@ -1375,9 +1375,7 @@ fcn_name (lookup_type val) \
}
#define NM_UTILS_LOOKUP_STR_DEFINE(fcn_name, lookup_type, unknown_val, ...) \
- _NM_UTILS_LOOKUP_DEFINE (, fcn_name, lookup_type, const char *, unknown_val, __VA_ARGS__)
-#define NM_UTILS_LOOKUP_STR_DEFINE_STATIC(fcn_name, lookup_type, unknown_val, ...) \
- _NM_UTILS_LOOKUP_DEFINE (static, fcn_name, lookup_type, const char *, unknown_val, __VA_ARGS__)
+ NM_UTILS_LOOKUP_DEFINE (fcn_name, lookup_type, const char *, unknown_val, __VA_ARGS__)
/* Call the string-lookup-table function @fcn_name. If the function returns
* %NULL, the numeric index is converted to string using a alloca() buffer.