Inline x11_atom_interner_adopt_atoms() into callers
Signed-off-by: Uli Schlachter <psychon@znc.in>master
parent
c033970163
commit
21c864ccbf
|
@ -893,8 +893,10 @@ get_type_names(struct xkb_keymap *keymap, struct x11_atom_interner *interner,
|
||||||
ALLOC_OR_FAIL(type->level_names, type->num_levels);
|
ALLOC_OR_FAIL(type->level_names, type->num_levels);
|
||||||
|
|
||||||
x11_atom_interner_adopt_atom(interner, wire_type_name, &type->name);
|
x11_atom_interner_adopt_atom(interner, wire_type_name, &type->name);
|
||||||
x11_atom_interner_adopt_atoms(interner, kt_level_names_iter,
|
for (size_t j = 0; j < wire_num_levels; j++) {
|
||||||
type->level_names, wire_num_levels);
|
x11_atom_interner_adopt_atom(interner, kt_level_names_iter[j],
|
||||||
|
&type->level_names[j]);
|
||||||
|
}
|
||||||
|
|
||||||
type->num_level_names = type->num_levels;
|
type->num_level_names = type->num_levels;
|
||||||
kt_level_names_iter += wire_num_levels;
|
kt_level_names_iter += wire_num_levels;
|
||||||
|
@ -975,7 +977,10 @@ get_group_names(struct xkb_keymap *keymap, struct x11_atom_interner *interner,
|
||||||
keymap->num_group_names = msb_pos(reply->groupNames);
|
keymap->num_group_names = msb_pos(reply->groupNames);
|
||||||
ALLOC_OR_FAIL(keymap->group_names, keymap->num_group_names);
|
ALLOC_OR_FAIL(keymap->group_names, keymap->num_group_names);
|
||||||
|
|
||||||
x11_atom_interner_adopt_atoms(interner, iter, keymap->group_names, length);
|
for (size_t i = 0; i < length; i++) {
|
||||||
|
x11_atom_interner_adopt_atom(interner, iter[i],
|
||||||
|
&keymap->group_names[i]);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -212,16 +212,6 @@ retry:
|
||||||
interner->pending[idx].cookie = xcb_get_atom_name(interner->conn, atom);
|
interner->pending[idx].cookie = xcb_get_atom_name(interner->conn, atom);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
x11_atom_interner_adopt_atoms(struct x11_atom_interner *interner,
|
|
||||||
const xcb_atom_t *from, xkb_atom_t *to,
|
|
||||||
size_t count)
|
|
||||||
{
|
|
||||||
for (size_t i = 0; i < count; i++) {
|
|
||||||
x11_atom_interner_adopt_atom(interner, from[i], &to[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void x11_atom_interner_round_trip(struct x11_atom_interner *interner) {
|
void x11_atom_interner_round_trip(struct x11_atom_interner *interner) {
|
||||||
struct xkb_context *ctx = interner->ctx;
|
struct xkb_context *ctx = interner->ctx;
|
||||||
xcb_connection_t *conn = interner->conn;
|
xcb_connection_t *conn = interner->conn;
|
||||||
|
|
|
@ -69,12 +69,6 @@ void
|
||||||
x11_atom_interner_adopt_atom(struct x11_atom_interner *interner,
|
x11_atom_interner_adopt_atom(struct x11_atom_interner *interner,
|
||||||
const xcb_atom_t atom, xkb_atom_t *out);
|
const xcb_atom_t atom, xkb_atom_t *out);
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
x11_atom_interner_adopt_atoms(struct x11_atom_interner *interner,
|
|
||||||
const xcb_atom_t *from, xkb_atom_t *to,
|
|
||||||
size_t count);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get a strdup'd and XkbEscapeMapName'd name of an X atom. The actual write is
|
* Get a strdup'd and XkbEscapeMapName'd name of an X atom. The actual write is
|
||||||
* delayed until the next call to x11_atom_interner_round_trip().
|
* delayed until the next call to x11_atom_interner_round_trip().
|
||||||
|
|
Loading…
Reference in New Issue