Browse Source

Use a safe identifier when generating variable names.

pull/1/head
triton 12 years ago
parent
commit
abb12aedc0
  1. 2
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

2
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -1025,7 +1025,7 @@ namespace Cxxi.Generators.CSharp
if (!string.IsNullOrWhiteSpace(marshal.Context.SupportBefore)) if (!string.IsNullOrWhiteSpace(marshal.Context.SupportBefore))
Write(marshal.Context.SupportBefore); Write(marshal.Context.SupportBefore);
WriteLine("var {0} = {1};", argName, marshal.Context.Return); WriteLine("var {0} = {1};", SafeIdentifier(argName), marshal.Context.Return);
} }
return paramMarshal; return paramMarshal;

Loading…
Cancel
Save