From 5d69b4c4a7d334ca29e61969712f5f8eedfa5cd9 Mon Sep 17 00:00:00 2001 From: Xavier G Date: Fri, 13 May 2016 17:35:47 +0200 Subject: Convert string policies from #define to enum. --- src/core/utf8.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/utf8.h') diff --git a/src/core/utf8.h b/src/core/utf8.h index 411b2048..5bb53193 100644 --- a/src/core/utf8.h +++ b/src/core/utf8.h @@ -24,8 +24,10 @@ int string_advance(char const **str, int policy); * TREAT_STRING_AS_UTF8 means strings are to be treated using g_utf8_* * functions. */ -#define TREAT_STRING_AS_BYTES 0 -#define TREAT_STRING_AS_UTF8 1 +enum str_policy { + TREAT_STRING_AS_BYTES, + TREAT_STRING_AS_UTF8 +}; /* Return how the str string ought to be treated: TREAT_STRING_AS_UTF8 if the * terminal handles UTF-8 and if the string appears to be a valid UTF-8 string; -- cgit v1.2.3