From a415d909a24d71ba515d6d8c2106bd1e1490dc8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Sat, 12 Jun 2004 22:39:14 +0000 Subject: [PATCH] Changed get_sysinfo prototype so that it returns a const pointer. Added * include/glibtop/sysinfo.h: Changed get_sysinfo prototype so that it returns a const pointer. Added missing macro. --- ChangeLog | 5 +++++ include/glibtop/sysinfo.h | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78108088..d3ada087 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-13 Benoît Dejean + + * include/glibtop/sysinfo.h: Changed get_sysinfo prototype so that it + returns a const pointer. Added missing macro. + 2004-06-12 Benoît Dejean * include/glibtop/fsusage.h: block_size is now defined as a guint32 diff --git a/include/glibtop/sysinfo.h b/include/glibtop/sysinfo.h index 3db74033..87517ddd 100644 --- a/include/glibtop/sysinfo.h +++ b/include/glibtop/sysinfo.h @@ -32,9 +32,10 @@ G_BEGIN_DECLS -#define GLIBTOP_SYSINFO_CPUINFO 0 +#define GLIBTOP_SYSINFO_NCPU 0 +#define GLIBTOP_SYSINFO_CPUINFO 1 -#define GLIBTOP_MAX_SYSINFO 1 +#define GLIBTOP_MAX_SYSINFO 2 typedef struct _glibtop_sysinfo glibtop_sysinfo; @@ -42,22 +43,22 @@ typedef struct _glibtop_entry glibtop_entry; struct _glibtop_entry { - GPtrArray *labels; - GHashTable *values; - GHashTable *descriptions; + GPtrArray *labels; /* unused */ + GHashTable *values; /* key -> description */ + GHashTable *descriptions; /* unused */ }; struct _glibtop_sysinfo { guint64 flags, ncpu; - glibtop_entry cpuinfo [GLIBTOP_NCPU]; + glibtop_entry cpuinfo [GLIBTOP_NCPU]; }; #define glibtop_get_sysinfo() glibtop_get_sysinfo_s(glibtop_global_server) #define glibtop_get_sysinfo_r glibtop_get_sysinfo_s -glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server); +const glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server); G_END_DECLS