From bb90d76a117c5e2ff57b37dfc21c536572887ac6 Mon Sep 17 00:00:00 2001 From: pmp-p Date: Tue, 16 Jan 2024 10:25:36 +0100 Subject: [PATCH 1/3] ensure em_asm template get C++ linkage --- include/pocketpy/export.h | 3 +-- include/pocketpy/pocketpy_c.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/pocketpy/export.h b/include/pocketpy/export.h index c6487dd5..5e573266 100644 --- a/include/pocketpy/export.h +++ b/include/pocketpy/export.h @@ -5,7 +5,6 @@ #define PK_EXPORT __declspec(dllexport) #define PK_SYS_PLATFORM 0 #elif __EMSCRIPTEN__ - #include #define PK_EXPORT EMSCRIPTEN_KEEPALIVE #define PK_SYS_PLATFORM 1 #elif __APPLE__ @@ -31,4 +30,4 @@ #else #define PK_EXPORT #define PK_SYS_PLATFORM 6 -#endif \ No newline at end of file +#endif diff --git a/include/pocketpy/pocketpy_c.h b/include/pocketpy/pocketpy_c.h index 27730e46..d00cdcfd 100644 --- a/include/pocketpy/pocketpy_c.h +++ b/include/pocketpy/pocketpy_c.h @@ -2,6 +2,9 @@ #define POCKETPY_C_H #ifdef __cplusplus +#if __EMSCRIPTEN__ +#include +#endif extern "C" { #endif From 2157523313f4a66d2d99a69d34861c340e3bffed Mon Sep 17 00:00:00 2001 From: pmp-p Date: Tue, 16 Jan 2024 11:35:04 +0100 Subject: [PATCH 2/3] just don't use keep alive at all for static build --- include/pocketpy/export.h | 2 +- include/pocketpy/pocketpy_c.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/pocketpy/export.h b/include/pocketpy/export.h index 5e573266..284ed63d 100644 --- a/include/pocketpy/export.h +++ b/include/pocketpy/export.h @@ -5,7 +5,7 @@ #define PK_EXPORT __declspec(dllexport) #define PK_SYS_PLATFORM 0 #elif __EMSCRIPTEN__ - #define PK_EXPORT EMSCRIPTEN_KEEPALIVE + #define PK_EXPORT #define PK_SYS_PLATFORM 1 #elif __APPLE__ #include diff --git a/include/pocketpy/pocketpy_c.h b/include/pocketpy/pocketpy_c.h index d00cdcfd..27730e46 100644 --- a/include/pocketpy/pocketpy_c.h +++ b/include/pocketpy/pocketpy_c.h @@ -2,9 +2,6 @@ #define POCKETPY_C_H #ifdef __cplusplus -#if __EMSCRIPTEN__ -#include -#endif extern "C" { #endif From 73bcd3ecab8c5e7b57fc6e2b9790905f55b66e88 Mon Sep 17 00:00:00 2001 From: pmp-p Date: Tue, 16 Jan 2024 11:40:34 +0100 Subject: [PATCH 3/3] line ending --- include/pocketpy/export.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/pocketpy/export.h b/include/pocketpy/export.h index 284ed63d..112c7fdf 100644 --- a/include/pocketpy/export.h +++ b/include/pocketpy/export.h @@ -31,3 +31,4 @@ #define PK_EXPORT #define PK_SYS_PLATFORM 6 #endif +