remove C++ support

Wed, 08 Nov 2023 21:53:43 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 08 Nov 2023 21:53:43 +0100
changeset 14
9dbfc0031887
parent 13
f04a49b2aeee
child 15
362b7659dc76

remove C++ support

src/ascension/context.h file | annotate | diff | comparison | revisions
src/ascension/datatypes.h file | annotate | diff | comparison | revisions
src/ascension/error.h file | annotate | diff | comparison | revisions
src/ascension/font.h file | annotate | diff | comparison | revisions
src/ascension/utils.h file | annotate | diff | comparison | revisions
src/ascension/window.h file | annotate | diff | comparison | revisions
--- a/src/ascension/context.h	Wed Nov 08 21:53:21 2023 +0100
+++ b/src/ascension/context.h	Wed Nov 08 21:53:43 2023 +0100
@@ -34,10 +34,6 @@
 #include <cx/buffer.h>
 #include <cx/list.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** The flag for the overall initialized state. */
 #define ASC_FLAG_INITILIZED  0x01u
 
@@ -64,9 +60,5 @@
 void asc_context_initialize(void);
 void asc_context_destroy(void);
 
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
 #endif /* ASCENSION_CONTEXT_H */
 
--- a/src/ascension/datatypes.h	Wed Nov 08 21:53:21 2023 +0100
+++ b/src/ascension/datatypes.h	Wed Nov 08 21:53:43 2023 +0100
@@ -28,13 +28,13 @@
 #ifndef ASCENSION_DATATYPES_H
 #define ASCENSION_DATATYPES_H
 
+#ifdef __cplusplus
+#error You cannot ascend using C++
+#endif
+
 #include <stdbool.h>
 #include <SDL2/SDL_endian.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // --------------------------------------------------------------------------
 //    Datatype Definitions
 // --------------------------------------------------------------------------
@@ -119,8 +119,4 @@
     mat[3][1] = -(top + bottom) / (top - bottom);
 }
 
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
 #endif //ASCENSION_DATATYPES_H
--- a/src/ascension/error.h	Wed Nov 08 21:53:21 2023 +0100
+++ b/src/ascension/error.h	Wed Nov 08 21:53:43 2023 +0100
@@ -30,10 +30,6 @@
 
 #include <cx/string.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void asc_error_cxstr(cxstring text);
 void asc_error_cchar(char const* text);
 void asc_error_cuchar(unsigned char const* text);
@@ -55,9 +51,5 @@
 #define asc_dprintf(...) printf(__VA_ARGS__); putchar('\n')
 #endif
 
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
 #endif /* ASCENSION_ERROR_H */
 
--- a/src/ascension/font.h	Wed Nov 08 21:53:21 2023 +0100
+++ b/src/ascension/font.h	Wed Nov 08 21:53:43 2023 +0100
@@ -35,10 +35,6 @@
 #define ASC_MAX_FONTS 64u
 #endif // ASC_MAX_FONTS
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 enum AscFontStyle {
     ASC_FONT_REGULAR,
     ASC_FONT_BOLD,
@@ -95,8 +91,4 @@
  */
 AscFont const *asc_font_cache_validate(AscFont const *font);
 
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
 #endif //ASCENSION_FONT_H
--- a/src/ascension/utils.h	Wed Nov 08 21:53:21 2023 +0100
+++ b/src/ascension/utils.h	Wed Nov 08 21:53:43 2023 +0100
@@ -30,11 +30,6 @@
 
 #include <stdbool.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
 static inline bool asc_test_flag(unsigned int reg, int flag) {
     return (reg & flag) == flag;
 }
@@ -47,9 +42,5 @@
     *reg &= ~flag;
 }
 
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
 #endif /* ASCENSION_UTILS_H */
 
--- a/src/ascension/window.h	Wed Nov 08 21:53:21 2023 +0100
+++ b/src/ascension/window.h	Wed Nov 08 21:53:43 2023 +0100
@@ -37,11 +37,6 @@
 #define ASC_MAX_WINDOWS 4u
 #endif // ASC_MAX_WINDOWS
 
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct AscWindowSettings {
     int depth_size;
     int vsync;
@@ -107,9 +102,5 @@
  */
 void asc_window_sync(AscWindow const *window);
 
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
 #endif /* ASCENSION_WINDOW_H */
 

mercurial