[glib] gutils: Clarify return values of g_bit_nth_[lsf|msf]()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gutils: Clarify return values of g_bit_nth_[lsf|msf]()
- Date: Tue, 25 Aug 2015 09:49:41 +0000 (UTC)
commit 91a6ec8d07eb521fc3f9be3bf7b7ae36a6108c88
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Aug 25 10:49:06 2015 +0100
gutils: Clarify return values of g_bit_nth_[lsf|msf]()
Clarify in the documentation that both functions return -1 if no high
bits could be found.
glib/gutils.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/glib/gutils.c b/glib/gutils.c
index e229d0d..360a4d5 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -493,7 +493,8 @@ g_find_program_in_path (const gchar *program)
* from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63,
* usually). To start searching from the 0th bit, set @nth_bit to -1.
*
- * Returns: the index of the first bit set which is higher than @nth_bit
+ * Returns: the index of the first bit set which is higher than @nth_bit, or -1
+ * if no higher bits are set
*/
/**
@@ -507,7 +508,8 @@ g_find_program_in_path (const gchar *program)
* usually). To start searching from the last bit, set @nth_bit to
* -1 or GLIB_SIZEOF_LONG * 8.
*
- * Returns: the index of the first bit set which is lower than @nth_bit
+ * Returns: the index of the first bit set which is lower than @nth_bit, or -1
+ * if no lower bits are set
*/
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]