summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@src.gnome.org>2004-06-12 22:39:14 +0000
committerBenoît Dejean <bdejean@src.gnome.org>2004-06-12 22:39:14 +0000
commita415d909a24d71ba515d6d8c2106bd1e1490dc8f (patch)
treeae3a361003392d957fc20a9f6578d2ecbd94362a
parent09febbf67d3e7395f160b1d682647e2a3007bedc (diff)
downloadlibgtop-a415d909a24d71ba515d6d8c2106bd1e1490dc8f.tar.gz
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.
-rw-r--r--ChangeLog5
-rw-r--r--include/glibtop/sysinfo.h15
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 <tazforever@dlfp.org>
+
+ * include/glibtop/sysinfo.h: Changed get_sysinfo prototype so that it
+ returns a const pointer. Added missing macro.
+
2004-06-12 Benoît Dejean <tazforever@dlfp.org>
* 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