ast: remove unneeded 'ctx' param to XkbFileCreate Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
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);
}
}
;