mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: Use C11 types instead of GLib types
This is an almost entirely mechanical* conversion from (for example) `gint` → `int`, `guint8` → `uint8_t`, etc. It is not entirely complete, as many GLib functions are still used in libsysprof-capture, which necessitate some use of GLib types. It also avoids renaming `gboolean` → `bool` as that’s a slightly more controversial change which will happen in the following commit. *Code was manually realigned afterwards. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #40
This commit is contained in:
@ -56,13 +56,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "sysprof-version-macros.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef guint64 SysprofAddress;
|
||||
typedef uint64_t SysprofAddress;
|
||||
|
||||
G_STATIC_ASSERT (sizeof (SysprofAddress) >= sizeof (gpointer));
|
||||
G_STATIC_ASSERT (sizeof (SysprofAddress) >= sizeof (void *));
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -79,9 +81,9 @@ SYSPROF_AVAILABLE_IN_ALL
|
||||
gboolean sysprof_address_is_context_switch (SysprofAddress address,
|
||||
SysprofAddressContext *context);
|
||||
SYSPROF_AVAILABLE_IN_ALL
|
||||
const gchar *sysprof_address_context_to_string (SysprofAddressContext context);
|
||||
const char *sysprof_address_context_to_string (SysprofAddressContext context);
|
||||
|
||||
static inline gint
|
||||
static inline int
|
||||
sysprof_address_compare (SysprofAddress a,
|
||||
SysprofAddress b)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user