diff options
author | 卜部昌平 <[email protected]> | 2019-12-02 14:48:42 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2019-12-26 20:45:12 +0900 |
commit | 863dbb21d8912c73e84fed47f2d3a1ac5d8275d4 (patch) | |
tree | b49b99fc802dbf5f3ac1264b165a83b251cf9ec1 /internal.h | |
parent | 1dd149d3b1e46f21b0c358fdf205e97ac009bb40 (diff) |
assume C99
Now that we no longer support old compilers, we can safely delete
several obsolete #ifdef gurads. Also because (as of writing) it is
impossible to compile the program using C++ compilers, lets just
entirely prohibit __cplusplus to reduce # of LOCs.
Note however that we still cannot eliminate __STDC_VERSION__ checks,
because MSVC does not define it, saying its C99 support is partial.
See also https://social.msdn.microsoft.com/Forums/vstudio/en-US/53a4fd75-9f97-48b2-aa63-2e2e5a15efa3
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2711
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/internal.h b/internal.h index 5b7f87ae8d..337aee814d 100644 --- a/internal.h +++ b/internal.h @@ -12,13 +12,10 @@ #ifndef RUBY_INTERNAL_H #define RUBY_INTERNAL_H 1 -#include "ruby.h" +#include "ruby/config.h" -#if defined(__cplusplus) -extern "C" { -#if 0 -} /* satisfy cc-mode */ -#endif +#ifdef __cplusplus +# error not for C++ #endif #include "ruby/encoding.h" @@ -87,10 +84,4 @@ extern "C" { #include "internal/inits.h" #include "internal/warnings.h" -#if defined(__cplusplus) -#if 0 -{ /* satisfy cc-mode */ -#endif -} /* extern "C" { */ -#endif #endif /* RUBY_INTERNAL_H */ |