a11y: Avoid __ prefixes for variable names

Seems that msvc does not like that.
This commit is contained in:
Matthias Clasen 2021-01-06 08:12:38 -05:00
parent d5ef906cff
commit 8243b5493b
2 changed files with 17 additions and 17 deletions

View File

@ -62,11 +62,11 @@ G_STMT_START { \
G_STMT_START { \
GtkAccessible *__a = GTK_ACCESSIBLE (accessible); \
GtkAccessibleProperty __p = (property); \
char *__value = gtk_test_accessible_check_property (__a, __p, __VA_ARGS__); \
if (__value == NULL) ; else { \
char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-property(" #property ") == " # __VA_ARGS__ "): value = '%s'", __value); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \
g_free (__msg); \
char *value__ = gtk_test_accessible_check_property (__a, __p, __VA_ARGS__); \
if (value__ == NULL) ; else { \
char *msg__ = g_strdup_printf ("assertion failed: (" #accessible ".accessible-property(" #property ") == " # __VA_ARGS__ "): value = '%s'", value__); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg__); \
g_free (msg__); \
} \
} G_STMT_END
@ -84,11 +84,11 @@ G_STMT_START { \
G_STMT_START { \
GtkAccessible *__a = GTK_ACCESSIBLE (accessible); \
GtkAccessibleRelation __r = (relation); \
char *__value = gtk_test_accessible_check_relation (__a, __r, __VA_ARGS__); \
if (__value == NULL); else { \
char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-relation(" #relation ") == " # __VA_ARGS__ "): value = '%s'", __value); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \
g_free (__msg); \
char *value__ = gtk_test_accessible_check_relation (__a, __r, __VA_ARGS__); \
if (value__ == NULL); else { \
char *msg__ = g_strdup_printf ("assertion failed: (" #accessible ".accessible-relation(" #relation ") == " # __VA_ARGS__ "): value = '%s'", value__); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg__); \
g_free (msg__); \
} \
} G_STMT_END
@ -106,11 +106,11 @@ G_STMT_START { \
G_STMT_START { \
GtkAccessible *__a = GTK_ACCESSIBLE (accessible); \
GtkAccessibleState __s = (state); \
char *__value = gtk_test_accessible_check_state (__a, __s, __VA_ARGS__); \
if (__value == NULL); else { \
char *__msg = g_strdup_printf ("assertion failed: (" #accessible ".accessible-state(" #state ") == " # __VA_ARGS__ "): value = '%s'", __value); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, __msg); \
g_free (__msg); \
char *value__ = gtk_test_accessible_check_state (__a, __s, __VA_ARGS__); \
if (value__ == NULL); else { \
char *msg__ = g_strdup_printf ("assertion failed: (" #accessible ".accessible-state(" #state ") == " # __VA_ARGS__ "): value = '%s'", value__); \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg__); \
g_free (msg__); \
} \
} G_STMT_END

View File

@ -25,9 +25,9 @@
* dvalue=-1: generate random value within value range
* dvalue=+2: initialize value from default_value
*/
#define ASSIGN_VALUE(__g_value_set_func, __value, PSPECTYPE, __pspec, __default_value, __minimum, __maximum, __dvalue) do { \
#define ASSIGN_VALUE(__g_value_set_func, value__, PSPECTYPE, __pspec, __default_value, __minimum, __maximum, __dvalue) do { \
PSPECTYPE __p = (PSPECTYPE) __pspec; \
__g_value_set_func (__value, SELECT_VALUE (__dvalue, __p->__default_value, __p->__minimum, __p->__maximum)); \
__g_value_set_func (value__, SELECT_VALUE (__dvalue, __p->__default_value, __p->__minimum, __p->__maximum)); \
} while (0)
#define SELECT_VALUE(__dvalue, __default_value, __minimum, __maximum) ( \
__dvalue >= 0 && __dvalue <= 1 ? __minimum * (1 - __dvalue) + __dvalue * __maximum : \