Commit 16aab829bbf55bfb8363d6339d8bd8a0aad1f93b

Ran Benita 2014-02-09T23:21:19

ast: remove unneeded 'ctx' param to XkbFileCreate Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/xkbcomp/ast-build.c b/src/xkbcomp/ast-build.c
index 5be9473..1982b32 100644
--- a/src/xkbcomp/ast-build.c
+++ b/src/xkbcomp/ast-build.c
@@ -496,8 +496,8 @@ err:
 }
 
 XkbFile *
-XkbFileCreate(struct xkb_context *ctx, enum xkb_file_type type, char *name,
-              ParseCommon *defs, enum xkb_map_flags flags)
+XkbFileCreate(enum xkb_file_type type, char *name, ParseCommon *defs,
+              enum xkb_map_flags flags)
 {
     XkbFile *file;
 
@@ -533,7 +533,7 @@ XkbFileFromComponents(struct xkb_context *ctx,
         if (!include)
             goto err;
 
-        file = XkbFileCreate(ctx, type, NULL, &include->common, 0);
+        file = XkbFileCreate(type, NULL, &include->common, 0);
         if (!file) {
             FreeInclude(include);
             goto err;
@@ -542,7 +542,7 @@ XkbFileFromComponents(struct xkb_context *ctx,
         defs = AppendStmt(defs, &file->common);
     }
 
-    file = XkbFileCreate(ctx, FILE_TYPE_KEYMAP, NULL, defs, 0);
+    file = XkbFileCreate(FILE_TYPE_KEYMAP, NULL, defs, 0);
     if (!file)
         goto err;
 
diff --git a/src/xkbcomp/ast-build.h b/src/xkbcomp/ast-build.h
index f305c4c..b57e4cd 100644
--- a/src/xkbcomp/ast-build.h
+++ b/src/xkbcomp/ast-build.h
@@ -113,8 +113,8 @@ IncludeStmt *
 IncludeCreate(struct xkb_context *ctx, char *str, enum merge_mode merge);
 
 XkbFile *
-XkbFileCreate(struct xkb_context *ctx, enum xkb_file_type type, char *name,
-              ParseCommon *defs, enum xkb_map_flags flags);
+XkbFileCreate(enum xkb_file_type type, char *name, ParseCommon *defs,
+              enum xkb_map_flags flags);
 
 void
 FreeStmt(ParseCommon *stmt);
diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y
index 5652ddf..f640ada 100644
--- a/src/xkbcomp/parser.y
+++ b/src/xkbcomp/parser.y
@@ -246,7 +246,7 @@ XkbFile         :       XkbCompositeMap
 XkbCompositeMap :       OptFlags XkbCompositeType OptMapName OBRACE
                             XkbMapConfigList
                         CBRACE SEMI
-                        { $$ = XkbFileCreate(param->ctx, $2, $3, &$5->common, $1); }
+                        { $$ = XkbFileCreate($2, $3, &$5->common, $1); }
                 ;
 
 XkbCompositeType:       XKB_KEYMAP      { $$ = FILE_TYPE_KEYMAP; }
@@ -275,7 +275,7 @@ XkbMapConfig    :       OptFlags FileType OptMapName OBRACE
                                 $$ = NULL;
                             }
                             else {
-                                $$ = XkbFileCreate(param->ctx, $2, $3, $5, $1);
+                                $$ = XkbFileCreate($2, $3, $5, $1);
                             }
                         }
                 ;