mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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:
@ -61,10 +61,11 @@
|
||||
#else
|
||||
# include "sysprof-address-fallback.h"
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "sysprof-address.h"
|
||||
|
||||
gboolean
|
||||
bool
|
||||
sysprof_address_is_context_switch (SysprofAddress address,
|
||||
SysprofAddressContext *context)
|
||||
{
|
||||
@ -77,31 +78,31 @@ sysprof_address_is_context_switch (SysprofAddress address,
|
||||
{
|
||||
case PERF_CONTEXT_HV:
|
||||
*context = SYSPROF_ADDRESS_CONTEXT_HYPERVISOR;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case PERF_CONTEXT_KERNEL:
|
||||
*context = SYSPROF_ADDRESS_CONTEXT_KERNEL;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case PERF_CONTEXT_USER:
|
||||
*context = SYSPROF_ADDRESS_CONTEXT_USER;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case PERF_CONTEXT_GUEST:
|
||||
*context = SYSPROF_ADDRESS_CONTEXT_GUEST;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case PERF_CONTEXT_GUEST_KERNEL:
|
||||
*context = SYSPROF_ADDRESS_CONTEXT_GUEST_KERNEL;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
case PERF_CONTEXT_GUEST_USER:
|
||||
*context = SYSPROF_ADDRESS_CONTEXT_GUEST_USER;
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
default:
|
||||
*context = SYSPROF_ADDRESS_CONTEXT_NONE;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user