Skip to content

Commit 273e611

Browse files
committed
Rename #include guards without using reserved names.
Anything (approximately) starting with two underscores, or an underscore and a capital letter is reserved in the C++ standard.
1 parent 42055ad commit 273e611

18 files changed

+40
-40
lines changed

lib/matplotlib/tri/_tri.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
* points below or above (including the same as) the contour level) and 6 that
6161
* do. See the function get_exit_edge for details.
6262
*/
63-
#ifndef _TRI_H
64-
#define _TRI_H
63+
#ifndef MPL_TRI_H
64+
#define MPL_TRI_H
6565

6666
#include "src/numpy_cpp.h"
6767

src/_backend_agg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/* _backend_agg.h
44
*/
55

6-
#ifndef __BACKEND_AGG_H__
7-
#define __BACKEND_AGG_H__
6+
#ifndef MPL_BACKEND_AGG_H
7+
#define MPL_BACKEND_AGG_H
88

99
#include <cmath>
1010
#include <vector>

src/_backend_agg_basic_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef __BACKEND_AGG_BASIC_TYPES_H__
2-
#define __BACKEND_AGG_BASIC_TYPES_H__
1+
#ifndef MPL_BACKEND_AGG_BASIC_TYPES_H
2+
#define MPL_BACKEND_AGG_BASIC_TYPES_H
33

44
/* Contains some simple types from the Agg backend that are also used
55
by other modules */

src/_contour.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@
139139
* different polygons. The S-most polygon must be started first, then the next
140140
* S-most and so on until the N-most polygon is started in that quad.
141141
*/
142-
#ifndef _CONTOUR_H
143-
#define _CONTOUR_H
142+
#ifndef MPL_CONTOUR_H
143+
#define MPL_CONTOUR_H
144144

145145
#include "src/numpy_cpp.h"
146146
#include <stdint.h>

src/_image.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
*/
66

7-
#ifndef _IMAGE_H
8-
#define _IMAGE_H
7+
#ifndef MPL_IMAGE_H
8+
#define MPL_IMAGE_H
99

1010
#include <vector>
1111

src/_image_resample.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -*- mode: c++; c-basic-offset: 4 -*- */
22

3-
#ifndef RESAMPLE_H
4-
#define RESAMPLE_H
3+
#ifndef MPL_RESAMPLE_H
4+
#define MPL_RESAMPLE_H
55

66
#include "agg_image_accessors.h"
77
#include "agg_path_storage.h"
@@ -1010,4 +1010,4 @@ void resample(
10101010
}
10111011
}
10121012

1013-
#endif /* RESAMPLE_H */
1013+
#endif /* MPL_RESAMPLE_H */

src/_path.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -*- mode: c++; c-basic-offset: 4 -*- */
22

3-
#ifndef __PATH_H__
4-
#define __PATH_H__
3+
#ifndef MPL_PATH_H
4+
#define MPL_PATH_H
55

66
#include <limits>
77
#include <math.h>

src/agg_workaround.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef __AGG_WORKAROUND_H__
2-
#define __AGG_WORKAROUND_H__
1+
#ifndef MPL_AGG_WORKAROUND_H
2+
#define MPL_AGG_WORKAROUND_H
33

44
#include "agg_pixfmt_rgba.h"
55

src/array.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
/* Utilities to create scalars and empty arrays that behave like the
44
Numpy array wrappers in numpy_cpp.h */
55

6-
#ifndef _SCALAR_H_
7-
#define _SCALAR_H_
6+
#ifndef MPL_SCALAR_H
7+
#define MPL_SCALAR_H
88

99
namespace array
1010
{

src/file_compat.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef __FILE_COMPAT_H__
2-
#define __FILE_COMPAT_H__
1+
#ifndef MPL_FILE_COMPAT_H
2+
#define MPL_FILE_COMPAT_H
33

44
#include <Python.h>
55
#include <stdio.h>
@@ -234,4 +234,4 @@ static NPY_INLINE int mpl_PyFile_CloseFile(PyObject *file)
234234
}
235235
#endif
236236

237-
#endif /* ifndef __FILE_COMPAT_H__ */
237+
#endif /* ifndef MPL_FILE_COMPAT_H */

0 commit comments

Comments
 (0)