shithub: choc

Download patch

ref: 58006edc22d91b3a805ee8a1636e37de671ef1a0
parent: 4edede3f4a10bc7ce8685f61f618e04eb38acef6
author: Simon Howard <fraggle@soulsphere.org>
date: Sun Oct 22 14:39:22 EDT 2017

textscreen: Add extern "C" for C++ imports.

This fixes #941. Thanks to @Altazimuth for the suggestion.

--- a/textscreen/textscreen.h
+++ b/textscreen/textscreen.h
@@ -15,6 +15,10 @@
 #ifndef TEXTSCREEN_H
 #define TEXTSCREEN_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "../src/doomkeys.h"
 #include "txt_main.h"
 
@@ -35,6 +39,10 @@
 #include "txt_widget.h"
 #include "txt_window_action.h"
 #include "txt_window.h"
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* #ifndef TEXTSCREEN_H */