From 7e0ae4b4d5bfcebd7bf4cefcefe681ea7ecc5f61 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 21 Jul 2013 16:41:27 +0300 Subject: atom: allow interning non-NUL-terminated strings We need this later. The strlen was calculated anyway, so no loss here. Signed-off-by: Ran Benita --- src/context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/context.c') diff --git a/src/context.c b/src/context.c index 8d56487..923060e 100644 --- a/src/context.c +++ b/src/context.c @@ -331,19 +331,19 @@ xkb_context_new(enum xkb_context_flags flags) xkb_atom_t xkb_atom_lookup(struct xkb_context *ctx, const char *string) { - return atom_lookup(ctx->atom_table, string); + return atom_lookup(ctx->atom_table, string, strlen(string)); } xkb_atom_t xkb_atom_intern(struct xkb_context *ctx, const char *string) { - return atom_intern(ctx->atom_table, string, false); + return atom_intern(ctx->atom_table, string, strlen(string), false); } xkb_atom_t xkb_atom_steal(struct xkb_context *ctx, char *string) { - return atom_intern(ctx->atom_table, string, true); + return atom_intern(ctx->atom_table, string, strlen(string), true); } char * -- cgit v1.2.1