diff options
author | Olly Betts <olly@survex.com> | 2022-07-19 08:14:07 +1200 |
---|---|---|
committer | Olly Betts <ojwbetts@gmail.com> | 2022-07-19 09:35:46 +1200 |
commit | 892557e799f37f168fd91e3c220a1061d6889458 (patch) | |
tree | 2f6ff4b74a85c705e94420da35d3315ebdea119a /Lib | |
parent | dd0c8632bf05765f30c99e74203e99b1d281478c (diff) | |
download | swig-892557e799f37f168fd91e3c220a1061d6889458.tar.gz |
Improve #include guard macros
Avoid using reserved identifiers such as `_DOHINT_H` (fixes #1989),
fix cases where the name doesn't match the filename, and make the naming
more consistent and less likely to collide with include guards in other
headers.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/allkw.swg | 6 | ||||
-rw-r--r-- | Lib/octave/octheaders.hpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/allkw.swg b/Lib/allkw.swg index 2d3cf6ea9..5e4cb8308 100644 --- a/Lib/allkw.swg +++ b/Lib/allkw.swg @@ -1,5 +1,5 @@ -#ifndef __Lib_allkw_swg__ -#define __Lib_allkw_swg__ +#ifndef SWIG_INCLUDED_LIB_ALLKW_SWG +#define SWIG_INCLUDED_LIB_ALLKW_SWG /* @@ -30,4 +30,4 @@ %include <tcl/tclkw.swg> -#endif //__Lib_allkw_swg__ +#endif // SWIG_INCLUDED_LIB_ALLKW_SWG diff --git a/Lib/octave/octheaders.hpp b/Lib/octave/octheaders.hpp index abf6428e7..26e5564d4 100644 --- a/Lib/octave/octheaders.hpp +++ b/Lib/octave/octheaders.hpp @@ -9,8 +9,8 @@ // g++ -c -include octheaders.hpp ... // -#if !defined(_SWIG_OCTAVE_OCTHEADERS_HPP) -#define _SWIG_OCTAVE_OCTHEADERS_HPP +#if !defined(SWIG_OCTAVE_OCTHEADERS_HPP) +#define SWIG_OCTAVE_OCTHEADERS_HPP // Required C++ headers #include <cstdlib> @@ -127,4 +127,4 @@ #include <octave/call-stack.h> #endif -#endif // !defined(_SWIG_OCTAVE_OCTHEADERS_HPP) +#endif // !defined(SWIG_OCTAVE_OCTHEADERS_HPP) |