From 6a668a2cc84a5a2c13ff740b0ed8a765638a60b2 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Tue, 29 Jan 2008 18:48:04 +0000 Subject: [PATCH] 2008-01-29 Mike Kestner * generator/VirtualMethod (CName): mangle the name. * generator/SymbolTable.cs (MangleName): add 'remove' and 'foreach' mappings. Should probably just get a C# keyword list and map all of them instead of onesy twoseys. Fixes for tnymail binding generation. svn path=/trunk/gtk-sharp/; revision=94286 --- ChangeLog | 8 ++++++++ generator/MethodBase.cs | 2 +- generator/SymbolTable.cs | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 048612a3e..9b757a8cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-01-29 Mike Kestner + + * generator/VirtualMethod (CName): mangle the name. + * generator/SymbolTable.cs (MangleName): add 'remove' and 'foreach' + mappings. Should probably just get a C# keyword list and map all of + them instead of onesy twoseys. + Fixes for tnymail binding generation. + 2008-01-24 Lluis Sanchez Gual * glade/XML.custom: due to a recent Mono fix (bug #322762), diff --git a/generator/MethodBase.cs b/generator/MethodBase.cs index 7b24a9b71..8b4a80b34 100644 --- a/generator/MethodBase.cs +++ b/generator/MethodBase.cs @@ -66,7 +66,7 @@ namespace GtkSharp.Generation { public string CName { get { - return elem.GetAttribute ("cname"); + return SymbolTable.Table.MangleName (elem.GetAttribute ("cname")); } } diff --git a/generator/SymbolTable.cs b/generator/SymbolTable.cs index dd35f071c..a0574649e 100644 --- a/generator/SymbolTable.cs +++ b/generator/SymbolTable.cs @@ -388,6 +388,10 @@ namespace GtkSharp.Generation { return "_internal"; case "where": return "wh3r3"; + case "foreach": + return "for_each"; + case "remove": + return "_remove"; default: break; }