[glib] Change order of GFormatSizeFlags
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Change order of GFormatSizeFlags
- Date: Wed, 20 Jul 2011 19:52:03 +0000 (UTC)
commit 8cadef1a88abf77569da2e65894a855b0f1376d4
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Jul 20 21:49:16 2011 +0200
Change order of GFormatSizeFlags
David requested that I change the order of the flags.
Also, assign numerical values to the flags in the usual way. This
wasn't a bug yet, but only by chance.
glib/gfileutils.c | 6 +++---
glib/gfileutils.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index 81966b8..fc101bd 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -1826,15 +1826,15 @@ g_format_size (guint64 size)
/**
* GFormatSizeFlags:
* @G_FORMAT_SIZE_DEFAULT: behave the same as g_format_size()
+ * @G_FORMAT_SIZE_LONG_FORMAT: include the exact number of bytes as part
+ * of the returned string. For example,
+ * "45.6 kB (45,612 bytes)".
* @G_FORMAT_SIZE_IEC_UNITS: use IEC (base 1024) units with "KiB"-style
* suffixes. IEC units should only be used
* for reporting things with a strong "power
* of 2" basis, like RAM sizes or RAID stripe
* sizes. Network and storage sizes should
* be reported in the normal SI units.
- * @G_FORMAT_SIZE_LONG_FORMAT: include the exact number of bytes as part
- * of the returned string. For example,
- * "45.6 kB (45,612 bytes)".
*
* Flags to modify the format of the string returned by
* g_format_size_full().
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
index 0e382af..1d7f4dc 100644
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -112,9 +112,9 @@ gint g_file_open_tmp (const gchar *tmpl,
typedef enum
{
- G_FORMAT_SIZE_DEFAULT,
- G_FORMAT_SIZE_IEC_UNITS,
- G_FORMAT_SIZE_LONG_FORMAT
+ G_FORMAT_SIZE_DEFAULT = 0,
+ G_FORMAT_SIZE_LONG_FORMAT = 1 << 0,
+ G_FORMAT_SIZE_IEC_UNITS = 1 << 1
} GFormatSizeFlags;
gchar * g_format_size_full (guint64 size,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]