Browse Source

Fixed the "ret" conflict in the CLI back-end as well.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/46/head
Dimitar Dobrev 13 years ago
parent
commit
bf2dfd375c
  1. 6
      src/Generator/Generators/CLI/CLISourcesTemplate.cs
  2. 2
      tests/Basic/Basic.h

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

@ -740,7 +740,7 @@ namespace CppSharp.Generators.CLI @@ -740,7 +740,7 @@ namespace CppSharp.Generators.CLI
var @params = GenerateFunctionParamsMarshal(function.Parameters, function);
if (needsReturn)
Write("auto {0}ret = ",(function.ReturnType.Type.IsReference())? "&": string.Empty);
Write("auto {0}__ret = ",(function.ReturnType.Type.IsReference())? "&": string.Empty);
if (!IsNativeFunctionOrStaticMethod(function))
{
@ -799,8 +799,8 @@ namespace CppSharp.Generators.CLI @@ -799,8 +799,8 @@ namespace CppSharp.Generators.CLI
{
var ctx = new MarshalContext(Driver)
{
ArgName = "ret",
ReturnVarName = "ret",
ArgName = "__ret",
ReturnVarName = "__ret",
ReturnType = retType
};

2
tests/Basic/Basic.h

@ -66,4 +66,4 @@ public: @@ -66,4 +66,4 @@ public:
int RetEnum(Enum);
};
int unsafeFunction(const Bar& ret);
int DLL_API unsafeFunction(const Bar& ret);

Loading…
Cancel
Save