Code

charset: make utf8_with() "pure"
authorMax Kellermann <max@duempel.org>
Sun, 11 Oct 2009 17:20:49 +0000 (19:20 +0200)
committerMax Kellermann <max@duempel.org>
Sun, 11 Oct 2009 17:20:49 +0000 (19:20 +0200)
This allows gcc to optimize further.

src/charset.h

index e5a9e957db2713e6467f978fc5b57511042cf824..d1b3f75e3676e9d87ae87e15942bf35ffd78b3e0 100644 (file)
@@ -22,8 +22,9 @@
 
 #include "config.h"
 
+#include <glib.h>
+
 #include <stdbool.h>
-#include <stddef.h>
 
 #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);