Commit cfb07724b7a5572e653a394f7c986ad6b5ee5fc8

Daniel Stone 2012-03-22T14:30:58

Fix documentation bugs with mod/group state API Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index 0c9202e..98e8049 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -586,7 +586,7 @@ _X_EXPORT const char *
 xkb_map_mod_get_name(struct xkb_desc *xkb, xkb_mod_index_t idx);
 
 /**
- * Returns the index of the modifier specified by 'name', or NULL if invalid.
+ * Returns the index of the modifier specified by 'name', or XKB_MOD_INVALID.
  */
 _X_EXPORT xkb_mod_index_t
 xkb_map_mod_get_index(struct xkb_desc *xkb, const char *name);
@@ -604,7 +604,7 @@ _X_EXPORT const char *
 xkb_map_group_get_name(struct xkb_desc *xkb, xkb_group_index_t idx);
 
 /**
- * Returns the index of the group specified by 'name', or NULL if invalid.
+ * Returns the index of the group specified by 'name', or XKB_GROUP_INVALID.
  */
 _X_EXPORT xkb_group_index_t
 xkb_map_group_get_index(struct xkb_desc *xkb, const char *name);
diff --git a/src/map.c b/src/map.c
index c0020ae..6af6d28 100644
--- a/src/map.c
+++ b/src/map.c
@@ -185,7 +185,7 @@ xkb_map_group_get_index(struct xkb_desc *xkb, const char *name)
             return i;
     }
 
-    return XKB_MOD_INVALID;
+    return XKB_GROUP_INVALID;
 }
 
 /**