aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--sciteco.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sciteco.h b/sciteco.h
index fca4434..88ab109 100644
--- a/sciteco.h
+++ b/sciteco.h
@@ -36,6 +36,8 @@ typedef gint64 tecoBool;
#define IS_SUCCESS(X) ((X) < 0)
#define IS_FAILURE(X) (!IS_SUCCESS(X))
+#define CHR2STR(X) ((gchar []){X, '\0'})
+
namespace String {
static inline void
@@ -50,7 +52,7 @@ append(gchar *&str1, const gchar *str2)
static inline void
append(gchar *&str, gchar chr)
{
- append(str, (gchar []){chr, '\0'});
+ append(str, CHR2STR(chr));
}
} /* namespace String */