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
     1.1 --- a/src/ascension/context.h	Wed Nov 08 21:53:21 2023 +0100
     1.2 +++ b/src/ascension/context.h	Wed Nov 08 21:53:43 2023 +0100
     1.3 @@ -34,10 +34,6 @@
     1.4  #include <cx/buffer.h>
     1.5  #include <cx/list.h>
     1.6  
     1.7 -#ifdef __cplusplus
     1.8 -extern "C" {
     1.9 -#endif
    1.10 -
    1.11  /** The flag for the overall initialized state. */
    1.12  #define ASC_FLAG_INITILIZED  0x01u
    1.13  
    1.14 @@ -64,9 +60,5 @@
    1.15  void asc_context_initialize(void);
    1.16  void asc_context_destroy(void);
    1.17  
    1.18 -#ifdef __cplusplus
    1.19 -} // extern "C"
    1.20 -#endif
    1.21 -
    1.22  #endif /* ASCENSION_CONTEXT_H */
    1.23  
     2.1 --- a/src/ascension/datatypes.h	Wed Nov 08 21:53:21 2023 +0100
     2.2 +++ b/src/ascension/datatypes.h	Wed Nov 08 21:53:43 2023 +0100
     2.3 @@ -28,13 +28,13 @@
     2.4  #ifndef ASCENSION_DATATYPES_H
     2.5  #define ASCENSION_DATATYPES_H
     2.6  
     2.7 +#ifdef __cplusplus
     2.8 +#error You cannot ascend using C++
     2.9 +#endif
    2.10 +
    2.11  #include <stdbool.h>
    2.12  #include <SDL2/SDL_endian.h>
    2.13  
    2.14 -#ifdef __cplusplus
    2.15 -extern "C" {
    2.16 -#endif
    2.17 -
    2.18  // --------------------------------------------------------------------------
    2.19  //    Datatype Definitions
    2.20  // --------------------------------------------------------------------------
    2.21 @@ -119,8 +119,4 @@
    2.22      mat[3][1] = -(top + bottom) / (top - bottom);
    2.23  }
    2.24  
    2.25 -#ifdef __cplusplus
    2.26 -} // extern "C"
    2.27 -#endif
    2.28 -
    2.29  #endif //ASCENSION_DATATYPES_H
     3.1 --- a/src/ascension/error.h	Wed Nov 08 21:53:21 2023 +0100
     3.2 +++ b/src/ascension/error.h	Wed Nov 08 21:53:43 2023 +0100
     3.3 @@ -30,10 +30,6 @@
     3.4  
     3.5  #include <cx/string.h>
     3.6  
     3.7 -#ifdef __cplusplus
     3.8 -extern "C" {
     3.9 -#endif
    3.10 -
    3.11  void asc_error_cxstr(cxstring text);
    3.12  void asc_error_cchar(char const* text);
    3.13  void asc_error_cuchar(unsigned char const* text);
    3.14 @@ -55,9 +51,5 @@
    3.15  #define asc_dprintf(...) printf(__VA_ARGS__); putchar('\n')
    3.16  #endif
    3.17  
    3.18 -#ifdef __cplusplus
    3.19 -} // extern "C"
    3.20 -#endif
    3.21 -
    3.22  #endif /* ASCENSION_ERROR_H */
    3.23  
     4.1 --- a/src/ascension/font.h	Wed Nov 08 21:53:21 2023 +0100
     4.2 +++ b/src/ascension/font.h	Wed Nov 08 21:53:43 2023 +0100
     4.3 @@ -35,10 +35,6 @@
     4.4  #define ASC_MAX_FONTS 64u
     4.5  #endif // ASC_MAX_FONTS
     4.6  
     4.7 -#ifdef __cplusplus
     4.8 -extern "C" {
     4.9 -#endif
    4.10 -
    4.11  enum AscFontStyle {
    4.12      ASC_FONT_REGULAR,
    4.13      ASC_FONT_BOLD,
    4.14 @@ -95,8 +91,4 @@
    4.15   */
    4.16  AscFont const *asc_font_cache_validate(AscFont const *font);
    4.17  
    4.18 -#ifdef __cplusplus
    4.19 -} // extern "C"
    4.20 -#endif
    4.21 -
    4.22  #endif //ASCENSION_FONT_H
     5.1 --- a/src/ascension/utils.h	Wed Nov 08 21:53:21 2023 +0100
     5.2 +++ b/src/ascension/utils.h	Wed Nov 08 21:53:43 2023 +0100
     5.3 @@ -30,11 +30,6 @@
     5.4  
     5.5  #include <stdbool.h>
     5.6  
     5.7 -#ifdef __cplusplus
     5.8 -extern "C" {
     5.9 -#endif
    5.10 -
    5.11 -
    5.12  static inline bool asc_test_flag(unsigned int reg, int flag) {
    5.13      return (reg & flag) == flag;
    5.14  }
    5.15 @@ -47,9 +42,5 @@
    5.16      *reg &= ~flag;
    5.17  }
    5.18  
    5.19 -#ifdef __cplusplus
    5.20 -} // extern "C"
    5.21 -#endif
    5.22 -
    5.23  #endif /* ASCENSION_UTILS_H */
    5.24  
     6.1 --- a/src/ascension/window.h	Wed Nov 08 21:53:21 2023 +0100
     6.2 +++ b/src/ascension/window.h	Wed Nov 08 21:53:43 2023 +0100
     6.3 @@ -37,11 +37,6 @@
     6.4  #define ASC_MAX_WINDOWS 4u
     6.5  #endif // ASC_MAX_WINDOWS
     6.6  
     6.7 -
     6.8 -#ifdef __cplusplus
     6.9 -extern "C" {
    6.10 -#endif
    6.11 -
    6.12  typedef struct AscWindowSettings {
    6.13      int depth_size;
    6.14      int vsync;
    6.15 @@ -107,9 +102,5 @@
    6.16   */
    6.17  void asc_window_sync(AscWindow const *window);
    6.18  
    6.19 -#ifdef __cplusplus
    6.20 -} // extern "C"
    6.21 -#endif
    6.22 -
    6.23  #endif /* ASCENSION_WINDOW_H */
    6.24  

mercurial