From dac2963841c7c8ff7e6620a0bfede82d77bc5d12 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 11 Oct 2009 19:20:49 +0200 Subject: [PATCH] charset: make utf8_with() "pure" This allows gcc to optimize further. --- src/charset.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/charset.h b/src/charset.h index e5a9e95..d1b3f75 100644 --- a/src/charset.h +++ b/src/charset.h @@ -22,8 +22,9 @@ #include "config.h" +#include + #include -#include #ifdef ENABLE_LOCALE const char * @@ -33,6 +34,7 @@ charset_init(void); /** * Returns the number of terminal cells occupied by this string. */ +G_GNUC_PURE unsigned utf8_width(const char *str); -- 2.30.2