From d8e166e49a7dc5f64f701b097f71475f2ad8c6ea Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 4 Aug 2020 18:33:27 +0200 Subject: [PATCH] Adds explicit destructor for AngelscriptScript. --- CInterface/AngelScript/AngelScriptResolver.cpp | 1 - CInterface/AngelScript/AngelscriptScript.cpp | 4 ++++ CInterface/Core.hpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 CInterface/AngelScript/AngelscriptScript.cpp diff --git a/CInterface/AngelScript/AngelScriptResolver.cpp b/CInterface/AngelScript/AngelScriptResolver.cpp index 383e9bd..bdfe304 100644 --- a/CInterface/AngelScript/AngelScriptResolver.cpp +++ b/CInterface/AngelScript/AngelScriptResolver.cpp @@ -1,4 +1,3 @@ - #include "../../src/ScriptResolving/AngelScript/AngelScriptResolver.hpp" #include "../Core.hpp" diff --git a/CInterface/AngelScript/AngelscriptScript.cpp b/CInterface/AngelScript/AngelscriptScript.cpp new file mode 100644 index 0000000..c40112c --- /dev/null +++ b/CInterface/AngelScript/AngelscriptScript.cpp @@ -0,0 +1,4 @@ +#include "../../src/ScriptResolving/AngelScript/AngelScriptScript.hpp" +#include "../Core.hpp" + +export uint8_t PkmnLib_AngelscriptScript_Destruct(AngelScriptScript* p) { Try(delete p;) } \ No newline at end of file diff --git a/CInterface/Core.hpp b/CInterface/Core.hpp index fc57421..7364017 100644 --- a/CInterface/Core.hpp +++ b/CInterface/Core.hpp @@ -4,7 +4,7 @@ #include #include #include -#define export extern "C" +#define export extern "C" [[maybe_unused]] #define PkmnLibException 4