libsysprof-capture: Use stdbool instead of gboolean

Another step towards dropping GLib as a dependency of
libsysprof-capture.

Unlike the previous commit which replaced GLib integer types with the
bitwise equivalent C standard types, `stdbool` is potentially a different
width from `gboolean`, so this is an ABI break.

It therefore involves some changes to callback functions in the tests
and tools, and in libsysprof.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
This commit is contained in:
Philip Withnall
2020-07-01 15:35:51 +01:00
parent 2c2cbf6343
commit 5636bbf4f0
20 changed files with 235 additions and 220 deletions

View File

@ -66,6 +66,7 @@
#ifdef __linux__
# include <sched.h>
#endif
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
@ -82,7 +83,7 @@
typedef struct
{
MappedRingBuffer *buffer;
gboolean is_shared;
bool is_shared;
int tid;
int pid;
} SysprofCollector;
@ -99,7 +100,7 @@ static GPrivate single_trace_key = G_PRIVATE_INIT (NULL);
static SysprofCollector *shared_collector;
static SysprofCollector invalid;
static inline gboolean
static inline bool
use_single_trace (void)
{
return GPOINTER_TO_INT (g_private_get (&single_trace_key));