Skip to content

Commit

Permalink
Explicitly adding extern C++ to functions declared in SnapPea.h but d…
Browse files Browse the repository at this point in the history
…efined in cython. It seems that modern compilers trip when a function was declared without explicit C++ linkage and defined with explicit C++ linkage - which is what cython is doing when the language is C++.
  • Loading branch information
unhyperbolic committed Jul 19, 2023
1 parent f1d5de4 commit 49a9808
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions kernel/headers/SnapPea.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ extern "C" {
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand All @@ -520,6 +523,9 @@ void uAcknowledge(const char *message);
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand All @@ -535,6 +541,9 @@ int uQuery(const char *message, const int num_responses,
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand All @@ -545,6 +554,9 @@ void uFatalError(const char *function, const char *file);
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand All @@ -555,6 +567,9 @@ void uAbortMemoryFull(void);
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand All @@ -569,6 +584,9 @@ void uPrepareMemFullMessage(void);
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand Down Expand Up @@ -632,6 +650,9 @@ void uLongComputationBegins(const char *message,
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand All @@ -641,6 +662,9 @@ FuncResult uLongComputationContinues(void);
*/

extern
#ifdef __cplusplus
"C++"
#endif
#ifdef _MSC_VER
__declspec(dllexport)
#endif
Expand Down

0 comments on commit 49a9808

Please sign in to comment.