Commit 62444a117c7a6e4fb2ce120d58fd42c1a4f3db7b

Daniel Stone 2012-03-14T17:06:09

Convert interp action from xkb_any_action to xkb_action Signed-off-by: Daniel Stone <daniel@fooishbar.org>

diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index d023b14..2092680 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -231,9 +231,9 @@ struct xkb_sym_interpret {
     xkb_keysym_t    sym;
     unsigned char   flags;
     unsigned char   match;
-    uint8_t         mods; /* XXX real or virt? */
+    uint8_t         mods;
     uint32_t        virtual_mod;
-    struct xkb_any_action   act;
+    union xkb_action act;
 };
 
 struct xkb_compat_map {
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index fa59897..5483cd7 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -117,10 +117,8 @@ InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
     info->dflt.interp.flags = 0;
     info->dflt.interp.virtual_mod = XkbNoModifier;
     info->dflt.interp.act.type = XkbSA_NoAction;
-    for (i = 0; i < sizeof info->dflt.interp.act.data; i++)
-    {
-        info->dflt.interp.act.data[i] = 0;
-    }
+    for (i = 0; i < sizeof(info->dflt.interp.act.any.data); i++)
+        info->dflt.interp.act.any.data[i] = 0;
     ClearIndicatorMapInfo(&info->ledDflt);
     info->ledDflt.defs.fileID = info->fileID;
     info->ledDflt.defs.defined = 0;
@@ -144,10 +142,8 @@ ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
     info->dflt.interp.flags = 0;
     info->dflt.interp.virtual_mod = XkbNoModifier;
     info->dflt.interp.act.type = XkbSA_NoAction;
-    for (i = 0; i < sizeof info->dflt.interp.act.data; i++)
-    {
-        info->dflt.interp.act.data[i] = 0;
-    }
+    for (i = 0; i < sizeof(info->dflt.interp.act.any.data); i++)
+        info->dflt.interp.act.any.data[i] = 0;
     ClearIndicatorMapInfo(&info->ledDflt);
     info->nInterps = 0;
     info->interps = (SymInterpInfo *) ClearCommonInfo(&info->interps->defs);
@@ -509,7 +505,7 @@ SetInterpField(SymInterpInfo * si,
     {
         if (arrayNdx != NULL)
             return ReportSINotArray(si, field, info);
-        ok = HandleActionDef(value, xkb, &si->interp.act, si->defs.merge,
+        ok = HandleActionDef(value, xkb, &si->interp.act.any, si->defs.merge,
                              info->act);
         if (ok)
             si->defs.defined |= _SI_Action;