expr: don't expose LookupModIndex
The Lookup* functions should remain a private implementation detail of the expr.c file. Signed-off-by: Ran Benita <ran234@gmail.com>master
parent
aed3140e8d
commit
6974e1f9ac
|
@ -81,7 +81,7 @@ SimpleLookup(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
static bool
|
||||||
LookupModIndex(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
|
LookupModIndex(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
|
||||||
enum expr_value_type type, xkb_mod_index_t *val_rtrn)
|
enum expr_value_type type, xkb_mod_index_t *val_rtrn)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,10 +32,6 @@ ExprResolveLhs(struct xkb_context *ctx, const ExprDef *expr,
|
||||||
const char **elem_rtrn, const char **field_rtrn,
|
const char **elem_rtrn, const char **field_rtrn,
|
||||||
ExprDef **index_rtrn);
|
ExprDef **index_rtrn);
|
||||||
|
|
||||||
bool
|
|
||||||
LookupModIndex(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
|
|
||||||
enum expr_value_type type, xkb_mod_index_t *val_rtrn);
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ExprResolveModMask(struct xkb_context *ctx, const ExprDef *expr,
|
ExprResolveModMask(struct xkb_context *ctx, const ExprDef *expr,
|
||||||
xkb_mod_mask_t *mask_rtrn);
|
xkb_mod_mask_t *mask_rtrn);
|
||||||
|
|
|
@ -1209,7 +1209,8 @@ HandleModMapDef(SymbolsInfo *info, ModMapDef *def)
|
||||||
bool ok;
|
bool ok;
|
||||||
struct xkb_context *ctx = info->keymap->ctx;
|
struct xkb_context *ctx = info->keymap->ctx;
|
||||||
|
|
||||||
if (!LookupModIndex(ctx, NULL, def->modifier, EXPR_TYPE_INT, &ndx)) {
|
ndx = ModNameToIndex(xkb_atom_text(ctx, def->modifier));
|
||||||
|
if (ndx == XKB_MOD_INVALID) {
|
||||||
log_err(info->keymap->ctx,
|
log_err(info->keymap->ctx,
|
||||||
"Illegal modifier map definition; "
|
"Illegal modifier map definition; "
|
||||||
"Ignoring map for non-modifier \"%s\"\n",
|
"Ignoring map for non-modifier \"%s\"\n",
|
||||||
|
|
Loading…
Reference in New Issue