Browse Source

Fixed the generated C# when a virtual function takes an array.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/955/head
Dimitar Dobrev 9 years ago
parent
commit
a319f96261
  1. 3
      src/Generator/Passes/DelegatesPass.cs
  2. 2
      tests/CSharp/CSharp.cpp
  3. 2
      tests/CSharp/CSharp.h

3
src/Generator/Passes/DelegatesPass.cs

@ -236,7 +236,8 @@ namespace CppSharp.Passes @@ -236,7 +236,8 @@ namespace CppSharp.Passes
.Replace("[MarshalAs(UnmanagedType.LPStr)] ", string.Empty)
.Replace("[MarshalAs(UnmanagedType.LPWStr)] ", string.Empty)
.Replace("global::", string.Empty).Replace("*", "Ptr")
.Replace('.', '_').Replace(' ', '_').Replace("::", "_");
.Replace('.', '_').Replace(' ', '_').Replace("::", "_")
.Replace("[]", "Array");
}
private CSharpTypePrinter TypePrinter

2
tests/CSharp/CSharp.cpp

@ -162,7 +162,7 @@ void Qux::setInterface(Qux *qux) @@ -162,7 +162,7 @@ void Qux::setInterface(Qux *qux)
{
}
void Qux::v()
void Qux::v(int array[])
{
}

2
tests/CSharp/CSharp.h

@ -62,7 +62,7 @@ public: @@ -62,7 +62,7 @@ public:
void obsolete();
Qux* getInterface();
void setInterface(Qux* qux);
virtual void v();
virtual void v(int array[]);
};
class DLL_API Bar : public Qux

Loading…
Cancel
Save