From a6e05954288333bf0e99e3447696ac4af1196cca Mon Sep 17 00:00:00 2001 From: josetr <37419832+josetr@users.noreply.github.com> Date: Sun, 25 Oct 2020 23:05:15 +0000 Subject: [PATCH] Remove unsupported calling convention usage (#1454) * Remove unsupported calling convention usage * Remove empty #define * Move method implementation to source file --- tests/CSharp/CSharp.Tests.cs | 2 +- tests/CSharp/CSharp.cpp | 4 ++++ tests/CSharp/CSharp.h | 8 +++----- tests/Tests.h | 18 ------------------ 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/tests/CSharp/CSharp.Tests.cs b/tests/CSharp/CSharp.Tests.cs index 17e6df53..d9db858b 100644 --- a/tests/CSharp/CSharp.Tests.cs +++ b/tests/CSharp/CSharp.Tests.cs @@ -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)); diff --git a/tests/CSharp/CSharp.cpp b/tests/CSharp/CSharp.cpp index 6edabbef..6f5b9dd8 100644 --- a/tests/CSharp/CSharp.cpp +++ b/tests/CSharp/CSharp.cpp @@ -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; diff --git a/tests/CSharp/CSharp.h b/tests/CSharp/CSharp.h index 88467bf1..58bc60af 100644 --- a/tests/CSharp/CSharp.h +++ b/tests/CSharp/CSharp.h @@ -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 --(); diff --git a/tests/Tests.h b/tests/Tests.h index 5d72be6a..1a25174b 100644 --- a/tests/Tests.h +++ b/tests/Tests.h @@ -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 @@ #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