Browse Source

Remove unsupported calling convention usage (#1454)

* Remove unsupported calling convention usage

* Remove empty #define

* Move method implementation to source file
pull/1457/head
josetr 5 years ago committed by GitHub
parent
commit
a6e0595428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tests/CSharp/CSharp.Tests.cs
  2. 4
      tests/CSharp/CSharp.cpp
  3. 8
      tests/CSharp/CSharp.h
  4. 18
      tests/Tests.h

2
tests/CSharp/CSharp.Tests.cs

@ -164,7 +164,7 @@ public unsafe class CSharpTests : GeneratorTestFixture @@ -164,7 +164,7 @@ public unsafe class CSharpTests : GeneratorTestFixture
{
using (var f = new Foo())
{
foreach(var pod in new[] { f.SmallPodCdecl, f.SmallPodStdcall, f.SmallPodFastcall, f.SmallPodThiscall, f.SmallPodVectorcall })
foreach(var pod in new[] { f.SmallPodCdecl, f.SmallPodStdcall, f.SmallPodThiscall })
{
Assert.That(pod.A, Is.EqualTo(10000));
Assert.That(pod.B, Is.EqualTo(40000));

4
tests/CSharp/CSharp.cpp

@ -110,6 +110,10 @@ int Foo::getGetPropertyCall() @@ -110,6 +110,10 @@ int Foo::getGetPropertyCall()
return 1;
}
SmallPOD Foo::getSmallPod_cdecl() { return { 10000, 40000 }; }
SmallPOD Foo::getSmallPod_stdcall() { return { 10000, 40000 }; }
SmallPOD Foo::getSmallPod_thiscall() { return { 10000, 40000 }; }
int Foo::operator ++()
{
return 5;

8
tests/CSharp/CSharp.h

@ -46,11 +46,9 @@ public: @@ -46,11 +46,9 @@ public:
static int propertyCall();
static int getGetPropertyCall();
SmallPOD CDECL getSmallPod_cdecl() { return { 10000, 40000 }; }
SmallPOD STDCALL getSmallPod_stdcall() { return { 10000, 40000 }; }
SmallPOD FASTCALL getSmallPod_fastcall() { return { 10000, 40000 }; }
SmallPOD THISCALL getSmallPod_thiscall() { return { 10000, 40000 }; }
SmallPOD VECTORCALL getSmallPod_vectorcall() { return { 10000, 40000 }; }
SmallPOD CDECL getSmallPod_cdecl();
SmallPOD STDCALL getSmallPod_stdcall();
SmallPOD THISCALL getSmallPod_thiscall();
int operator ++();
int operator --();

18
tests/Tests.h

@ -16,18 +16,10 @@ @@ -16,18 +16,10 @@
#define CDECL __cdecl
#endif
#ifndef FASTCALL
#define FASTCALL __fastcall
#endif
#ifndef THISCALL
#define THISCALL __thiscall
#endif
#ifndef VECTORCALL
#define VECTORCALL __vectorcall
#endif
#else
#define DLL_API __attribute__ ((visibility ("default")))
@ -44,20 +36,10 @@ @@ -44,20 +36,10 @@
#define CDECL __attribute__((cdecl))
#endif
#ifndef FASTCALL
#define FASTCALL
#endif
#ifndef THISCALL
#define THISCALL
#endif
#ifndef VECTORCALL
#define VECTORCALL
#endif
#define
#endif
#define CS_OUT

Loading…
Cancel
Save