Browse Source

Removed MarshalContext.SupportAfter

pull/1/head
marcos henrich 12 years ago
parent
commit
ebccc0ac97
  1. 10
      src/Generator/Generators/CLI/CLISourcesTemplate.cs
  2. 2
      src/Generator/Types/TypeMap.cs

10
src/Generator/Generators/CLI/CLISourcesTemplate.cs

@ -251,9 +251,6 @@ namespace Cxxi.Generators.CLI
WriteLine("{0} = {1};", variable, marshal.Context.Return); WriteLine("{0} = {1};", variable, marshal.Context.Return);
if (!string.IsNullOrWhiteSpace(marshal.Context.SupportAfter))
Write(marshal.Context.SupportAfter);
WriteCloseBraceIndent(); WriteCloseBraceIndent();
NewLine(); NewLine();
} }
@ -460,6 +457,7 @@ namespace Cxxi.Generators.CLI
var ctx = new MarshalContext(Driver) var ctx = new MarshalContext(Driver)
{ {
ArgName = field.Name,
ReturnVarName = nativeField, ReturnVarName = nativeField,
ReturnType = field.Type ReturnType = field.Type
}; };
@ -471,9 +469,6 @@ namespace Cxxi.Generators.CLI
Write(marshal.Context.SupportBefore); Write(marshal.Context.SupportBefore);
WriteLine("{0} = {1};", field.Name, marshal.Context.Return); WriteLine("{0} = {1};", field.Name, marshal.Context.Return);
if (!string.IsNullOrWhiteSpace(marshal.Context.SupportAfter))
Write(marshal.Context.SupportAfter);
} }
} }
@ -747,9 +742,6 @@ namespace Cxxi.Generators.CLI
WriteLine("auto {0}{1} = {2};", marshal.VarPrefix, argName, marshal.Context.Return); WriteLine("auto {0}{1} = {2};", marshal.VarPrefix, argName, marshal.Context.Return);
if (!string.IsNullOrWhiteSpace(marshal.Context.SupportAfter))
Write(marshal.Context.SupportAfter);
var argText = marshal.ArgumentPrefix + argName; var argText = marshal.ArgumentPrefix + argName;
return new ParamMarshal {Name = argText, Param = param}; return new ParamMarshal {Name = argText, Param = param};
} }

2
src/Generator/Types/TypeMap.cs

@ -11,7 +11,6 @@ namespace Cxxi.Types
{ {
Driver = driver; Driver = driver;
SupportBefore = new TextGenerator(); SupportBefore = new TextGenerator();
SupportAfter = new TextGenerator();
Return = new TextGenerator(); Return = new TextGenerator();
} }
@ -21,7 +20,6 @@ namespace Cxxi.Types
public CLIMarshalManagedToNativePrinter MarshalToNative; public CLIMarshalManagedToNativePrinter MarshalToNative;
public TextGenerator SupportBefore { get; private set; } public TextGenerator SupportBefore { get; private set; }
public TextGenerator SupportAfter { get; private set; }
public TextGenerator Return { get; private set; } public TextGenerator Return { get; private set; }
public string ReturnVarName { get; set; } public string ReturnVarName { get; set; }

Loading…
Cancel
Save