mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Merge branch 'ebassi/c99-boolean-constants' into 'main'
Alias TRUE and FALSE to C99's true and false Closes #3326 See merge request GNOME/glib!4001
This commit is contained in:
commit
4d2e0df9ee
@ -39,6 +39,9 @@
|
||||
*/
|
||||
#include <stddef.h>
|
||||
|
||||
/* We include stdbool.h to get the system's definition of true and false */
|
||||
#include <stdbool.h>
|
||||
|
||||
/*
|
||||
* Note: Clang (but not clang-cl) defines __GNUC__ and __GNUC_MINOR__.
|
||||
* Both Clang 11.1 on current Arch Linux and Apple's Clang 12.0 define
|
||||
@ -922,11 +925,11 @@
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE (0)
|
||||
#define FALSE false
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE (!FALSE)
|
||||
#define TRUE true
|
||||
#endif
|
||||
|
||||
#undef MAX
|
||||
|
@ -56,7 +56,7 @@ typedef struct
|
||||
gpointer arg_data;
|
||||
union
|
||||
{
|
||||
gboolean bool;
|
||||
gboolean boolean;
|
||||
gint integer;
|
||||
gchar *str;
|
||||
gchar **array;
|
||||
@ -1585,7 +1585,7 @@ free_changes_list (GOptionContext *context,
|
||||
switch (change->arg_type)
|
||||
{
|
||||
case G_OPTION_ARG_NONE:
|
||||
*(gboolean *)change->arg_data = change->prev.bool;
|
||||
*(gboolean *)change->arg_data = change->prev.boolean;
|
||||
break;
|
||||
case G_OPTION_ARG_INT:
|
||||
*(gint *)change->arg_data = change->prev.integer;
|
||||
|
Loading…
Reference in New Issue
Block a user