From e031a4ff18996d8a108bd98081cd175a8f966f38 Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Wed, 9 Oct 2013 18:51:38 +0200 Subject: [PATCH] generator: auto escape string constants --- generator/Constant.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/generator/Constant.cs b/generator/Constant.cs index c8a06ca14..2b197d782 100644 --- a/generator/Constant.cs +++ b/generator/Constant.cs @@ -58,7 +58,13 @@ namespace GtkSharp.Generation { StreamWriter sw = gen_info.Writer; - sw.WriteLine ("{0}public const {1} {2} = {3}{4}{3};", indent, ConstType, Name, IsString ? "\"": String.Empty, value); + sw.WriteLine ("{0}public const {1} {2} = {3}{4}{5};", + indent, + ConstType, + Name, + IsString ? "@\"": String.Empty, + value, + IsString ? "\"": String.Empty); } } }