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

2
src/Generator/Types/TypeMap.cs

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

Loading…
Cancel
Save