summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-09-05 12:04:08 -0600
committerCharles Harris <charlesr.harris@gmail.com>2021-09-05 13:27:57 -0600
commit06cdc97dcdb78389026ce95fa136494954d2530e (patch)
tree98952edcb411bf05daa80438f18b1c6ec53c55af
parent4af05ea0c88be6120190a70f00094ed764421015 (diff)
downloadnumpy-06cdc97dcdb78389026ce95fa136494954d2530e.tar.gz
MAINT: Standardize guards in numpy/core/src/multiarray.
-rw-r--r--.clang-format2
-rw-r--r--numpy/core/src/multiarray/_datetime.h6
-rw-r--r--numpy/core/src/multiarray/abstractdtypes.h6
-rw-r--r--numpy/core/src/multiarray/alloc.h9
-rw-r--r--numpy/core/src/multiarray/array_coercion.h6
-rw-r--r--numpy/core/src/multiarray/array_method.h6
-rw-r--r--numpy/core/src/multiarray/arrayfunction_override.h6
-rw-r--r--numpy/core/src/multiarray/arrayobject.h8
-rw-r--r--numpy/core/src/multiarray/arraytypes.h6
-rw-r--r--numpy/core/src/multiarray/calculation.h6
-rw-r--r--numpy/core/src/multiarray/common.h14
-rw-r--r--numpy/core/src/multiarray/common_dtype.h6
-rw-r--r--numpy/core/src/multiarray/compiled_base.h9
-rw-r--r--numpy/core/src/multiarray/conversion_utils.h8
-rw-r--r--numpy/core/src/multiarray/convert.h6
-rw-r--r--numpy/core/src/multiarray/convert_datatype.h6
-rw-r--r--numpy/core/src/multiarray/ctors.h6
-rw-r--r--numpy/core/src/multiarray/datetime_busday.h6
-rw-r--r--numpy/core/src/multiarray/datetime_busdaycal.h6
-rw-r--r--numpy/core/src/multiarray/datetime_strings.h6
-rw-r--r--numpy/core/src/multiarray/descriptor.h6
-rw-r--r--numpy/core/src/multiarray/dragon4.h8
-rw-r--r--numpy/core/src/multiarray/dtype_transfer.h6
-rw-r--r--numpy/core/src/multiarray/dtypemeta.h6
-rw-r--r--numpy/core/src/multiarray/einsum_debug.h6
-rw-r--r--numpy/core/src/multiarray/einsum_sumprod.h6
-rw-r--r--numpy/core/src/multiarray/getset.h6
-rw-r--r--numpy/core/src/multiarray/hashdescr.h6
-rw-r--r--numpy/core/src/multiarray/item_selection.h6
-rw-r--r--numpy/core/src/multiarray/iterators.h6
-rw-r--r--numpy/core/src/multiarray/legacy_dtype_implementation.h6
-rw-r--r--numpy/core/src/multiarray/mapping.h6
-rw-r--r--numpy/core/src/multiarray/methods.h6
-rw-r--r--numpy/core/src/multiarray/multiarraymodule.h6
-rw-r--r--numpy/core/src/multiarray/nditer_impl.h17
-rw-r--r--numpy/core/src/multiarray/nditer_pywrap.h6
-rw-r--r--numpy/core/src/multiarray/npy_buffer.h6
-rw-r--r--numpy/core/src/multiarray/number.h6
-rw-r--r--numpy/core/src/multiarray/refcount.h6
-rw-r--r--numpy/core/src/multiarray/scalartypes.h6
-rw-r--r--numpy/core/src/multiarray/sequence.h6
-rw-r--r--numpy/core/src/multiarray/shape.h6
-rw-r--r--numpy/core/src/multiarray/strfuncs.h6
-rw-r--r--numpy/core/src/multiarray/temp_elide.h7
-rw-r--r--numpy/core/src/multiarray/typeinfo.h6
-rw-r--r--numpy/core/src/multiarray/usertypes.h6
-rw-r--r--numpy/core/src/multiarray/vdot.h6
47 files changed, 156 insertions, 154 deletions
diff --git a/.clang-format b/.clang-format
index c78fb5f77..60b1066bc 100644
--- a/.clang-format
+++ b/.clang-format
@@ -16,7 +16,7 @@ DerivePointerAlignment: false
IndentWidth: 4
IncludeBlocks: Regroup
IncludeCategories:
- - Regex: '^[<"](Python|structmember|pymem)'
+ - Regex: '^[<"](Python|structmember|pymem)\.h'
Priority: -3
CaseSensitive: true
- Regex: '^"numpy/'
diff --git a/numpy/core/src/multiarray/_datetime.h b/numpy/core/src/multiarray/_datetime.h
index c0d2f1967..2ebeb1dff 100644
--- a/numpy/core/src/multiarray/_datetime.h
+++ b/numpy/core/src/multiarray/_datetime.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE__DATETIME_H_
-#define _NPY_PRIVATE__DATETIME_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY__DATETIME_H_
+#define NUMPY_CORE_SRC_MULTIARRAY__DATETIME_H_
extern NPY_NO_EXPORT char const *_datetime_strings[NPY_DATETIME_NUMUNITS];
extern NPY_NO_EXPORT int _days_per_month_table[2][12];
@@ -376,4 +376,4 @@ find_object_datetime_type(PyObject *obj, int type_num);
NPY_NO_EXPORT int
PyArray_InitializeDatetimeCasts(void);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY__DATETIME_H_ */
diff --git a/numpy/core/src/multiarray/abstractdtypes.h b/numpy/core/src/multiarray/abstractdtypes.h
index a6c526717..42c192cac 100644
--- a/numpy/core/src/multiarray/abstractdtypes.h
+++ b/numpy/core/src/multiarray/abstractdtypes.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ABSTRACTDTYPES_H
-#define _NPY_ABSTRACTDTYPES_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ABSTRACTDTYPES_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ABSTRACTDTYPES_H_
#include "dtypemeta.h"
@@ -16,4 +16,4 @@ NPY_NO_EXPORT extern PyArray_DTypeMeta PyArray_PyComplexAbstractDType;
NPY_NO_EXPORT int
initialize_and_map_pytypes_to_dtypes(void);
-#endif /*_NPY_ABSTRACTDTYPES_H */
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ABSTRACTDTYPES_H_ */
diff --git a/numpy/core/src/multiarray/alloc.h b/numpy/core/src/multiarray/alloc.h
index 15e31ebb5..1259abca5 100644
--- a/numpy/core/src/multiarray/alloc.h
+++ b/numpy/core/src/multiarray/alloc.h
@@ -1,8 +1,9 @@
-#ifndef _NPY_ARRAY_ALLOC_H_
-#define _NPY_ARRAY_ALLOC_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ALLOC_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ALLOC_H_
+
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
-#include <numpy/ndarraytypes.h>
+#include "numpy/ndarraytypes.h"
#define NPY_TRACE_DOMAIN 389047
@@ -36,4 +37,4 @@ npy_free_cache_dim_array(PyArrayObject * arr)
npy_free_cache_dim(PyArray_DIMS(arr), PyArray_NDIM(arr));
}
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ALLOC_H_ */
diff --git a/numpy/core/src/multiarray/array_coercion.h b/numpy/core/src/multiarray/array_coercion.h
index c5ccad225..db0e479fe 100644
--- a/numpy/core/src/multiarray/array_coercion.h
+++ b/numpy/core/src/multiarray/array_coercion.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_COERCION_H
-#define _NPY_ARRAY_COERCION_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ARRAY_COERCION_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ARRAY_COERCION_H_
/*
@@ -54,4 +54,4 @@ npy_unlink_coercion_cache(coercion_cache_obj *current);
NPY_NO_EXPORT int
PyArray_AssignFromCache(PyArrayObject *self, coercion_cache_obj *cache);
-#endif /* _NPY_ARRAY_COERCION_H */
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ARRAY_COERCION_H_ */
diff --git a/numpy/core/src/multiarray/array_method.h b/numpy/core/src/multiarray/array_method.h
index fc2304889..3017abf25 100644
--- a/numpy/core/src/multiarray/array_method.h
+++ b/numpy/core/src/multiarray/array_method.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_METHOD_H
-#define _NPY_ARRAY_METHOD_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ARRAY_METHOD_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ARRAY_METHOD_H_
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
@@ -177,4 +177,4 @@ PyArrayMethod_GetMaskedStridedLoop(
NPY_NO_EXPORT PyBoundArrayMethodObject *
PyArrayMethod_FromSpec_int(PyArrayMethod_Spec *spec, int private);
-#endif /*_NPY_ARRAY_METHOD_H*/
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ARRAY_METHOD_H_ */
diff --git a/numpy/core/src/multiarray/arrayfunction_override.h b/numpy/core/src/multiarray/arrayfunction_override.h
index fdf0dfcaf..09f7ee548 100644
--- a/numpy/core/src/multiarray/arrayfunction_override.h
+++ b/numpy/core/src/multiarray/arrayfunction_override.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE__ARRAYFUNCTION_OVERRIDE_H
-#define _NPY_PRIVATE__ARRAYFUNCTION_OVERRIDE_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ARRAYFUNCTION_OVERRIDE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ARRAYFUNCTION_OVERRIDE_H_
NPY_NO_EXPORT PyObject *
array_implement_array_function(
@@ -19,4 +19,4 @@ NPY_NO_EXPORT PyObject *
array_function_method_impl(PyObject *func, PyObject *types, PyObject *args,
PyObject *kwargs);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ARRAYFUNCTION_OVERRIDE_H_ */
diff --git a/numpy/core/src/multiarray/arrayobject.h b/numpy/core/src/multiarray/arrayobject.h
index 9b74944ff..fb9b0bd81 100644
--- a/numpy/core/src/multiarray/arrayobject.h
+++ b/numpy/core/src/multiarray/arrayobject.h
@@ -1,10 +1,10 @@
-#ifndef _NPY_INTERNAL_ARRAYOBJECT_H_
-#define _NPY_INTERNAL_ARRAYOBJECT_H_
-
#ifndef _MULTIARRAYMODULE
#error You should not include this
#endif
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ARRAYOBJECT_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ARRAYOBJECT_H_
+
NPY_NO_EXPORT PyObject *
_strings_richcompare(PyArrayObject *self, PyArrayObject *other, int cmp_op,
int rstrip);
@@ -26,4 +26,4 @@ array_might_be_written(PyArrayObject *obj);
*/
static const int NPY_ARRAY_WARN_ON_WRITE = (1 << 31);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ARRAYOBJECT_H_ */
diff --git a/numpy/core/src/multiarray/arraytypes.h b/numpy/core/src/multiarray/arraytypes.h
index a9469aef7..b3a13b297 100644
--- a/numpy/core/src/multiarray/arraytypes.h
+++ b/numpy/core/src/multiarray/arraytypes.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAYTYPES_H_
-#define _NPY_ARRAYTYPES_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ARRAYTYPES_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ARRAYTYPES_H_
#include "common.h"
@@ -28,4 +28,4 @@ small_correlate(const char * d_, npy_intp dstride,
npy_intp nk, enum NPY_TYPES ktype,
char * out_, npy_intp ostride);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ARRAYTYPES_H_ */
diff --git a/numpy/core/src/multiarray/calculation.h b/numpy/core/src/multiarray/calculation.h
index 49105a138..6a9c3c7c9 100644
--- a/numpy/core/src/multiarray/calculation.h
+++ b/numpy/core/src/multiarray/calculation.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_CALCULATION_H_
-#define _NPY_CALCULATION_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_CALCULATION_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_CALCULATION_H_
NPY_NO_EXPORT PyObject*
PyArray_ArgMax(PyArrayObject* self, int axis, PyArrayObject *out);
@@ -67,4 +67,4 @@ PyArray_All(PyArrayObject* self, int axis, PyArrayObject* out);
NPY_NO_EXPORT PyObject*
PyArray_Any(PyArrayObject* self, int axis, PyArrayObject* out);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_CALCULATION_H_ */
diff --git a/numpy/core/src/multiarray/common.h b/numpy/core/src/multiarray/common.h
index 3251da480..b3526c4c1 100644
--- a/numpy/core/src/multiarray/common.h
+++ b/numpy/core/src/multiarray/common.h
@@ -1,10 +1,11 @@
-#ifndef _NPY_PRIVATE_COMMON_H_
-#define _NPY_PRIVATE_COMMON_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_COMMON_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_COMMON_H_
+
#include <structmember.h>
-#include <numpy/npy_common.h>
-#include <numpy/ndarraytypes.h>
-#include <limits.h>
+#include "numpy/npy_common.h"
+#include "numpy/ndarraytypes.h"
#include "npy_import.h"
+#include <limits.h>
#define error_converting(x) (((x) == -1) && PyErr_Occurred())
@@ -343,5 +344,4 @@ new_array_for_sum(PyArrayObject *ap1, PyArrayObject *ap2, PyArrayObject* out,
*/
#define NPY_ITER_REDUCTION_AXIS(axis) (axis + (1 << (NPY_BITSOF_INT - 2)))
-#endif
-
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_COMMON_H_ */
diff --git a/numpy/core/src/multiarray/common_dtype.h b/numpy/core/src/multiarray/common_dtype.h
index b3666531a..13d38ddf8 100644
--- a/numpy/core/src/multiarray/common_dtype.h
+++ b/numpy/core/src/multiarray/common_dtype.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_COMMON_DTYPE_H_
-#define _NPY_COMMON_DTYPE_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_COMMON_DTYPE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_COMMON_DTYPE_H_
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
@@ -14,4 +14,4 @@ NPY_NO_EXPORT PyArray_DTypeMeta *
PyArray_PromoteDTypeSequence(
npy_intp length, PyArray_DTypeMeta **dtypes_in);
-#endif /* _NPY_COMMON_DTYPE_H_ */
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_COMMON_DTYPE_H_ */
diff --git a/numpy/core/src/multiarray/compiled_base.h b/numpy/core/src/multiarray/compiled_base.h
index 082139910..d3bc08cb2 100644
--- a/numpy/core/src/multiarray/compiled_base.h
+++ b/numpy/core/src/multiarray/compiled_base.h
@@ -1,6 +1,7 @@
-#ifndef _NPY_PRIVATE__COMPILED_BASE_H_
-#define _NPY_PRIVATE__COMPILED_BASE_H_
-#include <numpy/ndarraytypes.h>
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_COMPILED_BASE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_COMPILED_BASE_H_
+
+#include "numpy/ndarraytypes.h"
NPY_NO_EXPORT PyObject *
arr_insert(PyObject *, PyObject *, PyObject *);
@@ -23,4 +24,4 @@ io_pack(PyObject *, PyObject *, PyObject *);
NPY_NO_EXPORT PyObject *
io_unpack(PyObject *, PyObject *, PyObject *);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_COMPILED_BASE_H_ */
diff --git a/numpy/core/src/multiarray/conversion_utils.h b/numpy/core/src/multiarray/conversion_utils.h
index 55c0cdd35..89cf2ef27 100644
--- a/numpy/core/src/multiarray/conversion_utils.h
+++ b/numpy/core/src/multiarray/conversion_utils.h
@@ -1,7 +1,7 @@
-#ifndef _NPY_PRIVATE_CONVERSION_UTILS_H_
-#define _NPY_PRIVATE_CONVERSION_UTILS_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_CONVERSION_UTILS_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_CONVERSION_UTILS_H_
-#include <numpy/ndarraytypes.h>
+#include "numpy/ndarraytypes.h"
NPY_NO_EXPORT int
PyArray_IntpConverter(PyObject *obj, PyArray_Dims *seq);
@@ -82,4 +82,4 @@ PyArray_ConvertMultiAxis(PyObject *axis_in, int ndim, npy_bool *out_axis_flags);
*/
extern NPY_NO_EXPORT int evil_global_disable_warn_O4O8_flag;
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_CONVERSION_UTILS_H_ */
diff --git a/numpy/core/src/multiarray/convert.h b/numpy/core/src/multiarray/convert.h
index 96df19711..d64d9be3f 100644
--- a/numpy/core/src/multiarray/convert.h
+++ b/numpy/core/src/multiarray/convert.h
@@ -1,8 +1,8 @@
-#ifndef _NPY_ARRAYOBJECT_CONVERT_H_
-#define _NPY_ARRAYOBJECT_CONVERT_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_CONVERT_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_CONVERT_H_
NPY_NO_EXPORT int
PyArray_AssignZero(PyArrayObject *dst,
PyArrayObject *wheremask);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_CONVERT_H_ */
diff --git a/numpy/core/src/multiarray/convert_datatype.h b/numpy/core/src/multiarray/convert_datatype.h
index e5fc23972..5e0682f22 100644
--- a/numpy/core/src/multiarray/convert_datatype.h
+++ b/numpy/core/src/multiarray/convert_datatype.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_CONVERT_DATATYPE_H_
-#define _NPY_ARRAY_CONVERT_DATATYPE_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_CONVERT_DATATYPE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_CONVERT_DATATYPE_H_
#include "array_method.h"
@@ -99,4 +99,4 @@ simple_cast_resolve_descriptors(
NPY_NO_EXPORT int
PyArray_InitializeCasts(void);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_CONVERT_DATATYPE_H_ */
diff --git a/numpy/core/src/multiarray/ctors.h b/numpy/core/src/multiarray/ctors.h
index 8db1412c7..e59e86e8b 100644
--- a/numpy/core/src/multiarray/ctors.h
+++ b/numpy/core/src/multiarray/ctors.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_CTORS_H_
-#define _NPY_ARRAY_CTORS_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_CTORS_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_CTORS_H_
NPY_NO_EXPORT PyObject *
PyArray_NewFromDescr(
@@ -102,4 +102,4 @@ NPY_NO_EXPORT PyArrayObject *
PyArray_SubclassWrap(PyArrayObject *arr_of_subclass, PyArrayObject *towrap);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_CTORS_H_ */
diff --git a/numpy/core/src/multiarray/datetime_busday.h b/numpy/core/src/multiarray/datetime_busday.h
index 483151122..b53a25010 100644
--- a/numpy/core/src/multiarray/datetime_busday.h
+++ b/numpy/core/src/multiarray/datetime_busday.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE__DATETIME_BUSDAY_H_
-#define _NPY_PRIVATE__DATETIME_BUSDAY_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_DATETIME_BUSDAY_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_DATETIME_BUSDAY_H_
/*
* This is the 'busday_offset' function exposed for calling
@@ -25,4 +25,4 @@ NPY_NO_EXPORT PyObject *
array_is_busday(PyObject *NPY_UNUSED(self),
PyObject *args, PyObject *kwds);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_DATETIME_BUSDAY_H_ */
diff --git a/numpy/core/src/multiarray/datetime_busdaycal.h b/numpy/core/src/multiarray/datetime_busdaycal.h
index 02903e3d2..20efebe0a 100644
--- a/numpy/core/src/multiarray/datetime_busdaycal.h
+++ b/numpy/core/src/multiarray/datetime_busdaycal.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE__DATETIME_BUSDAYDEF_H_
-#define _NPY_PRIVATE__DATETIME_BUSDAYDEF_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_DATETIME_BUSDAYCAL_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_DATETIME_BUSDAYCAL_H_
/*
* A list of holidays, which should be sorted, not contain any
@@ -59,4 +59,4 @@ PyArray_HolidaysConverter(PyObject *dates_in, npy_holidayslist *holidays);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_DATETIME_BUSDAYCAL_H_ */
diff --git a/numpy/core/src/multiarray/datetime_strings.h b/numpy/core/src/multiarray/datetime_strings.h
index 148369595..ca35d29c8 100644
--- a/numpy/core/src/multiarray/datetime_strings.h
+++ b/numpy/core/src/multiarray/datetime_strings.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE__DATETIME_STRINGS_H_
-#define _NPY_PRIVATE__DATETIME_STRINGS_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_DATETIME_STRINGS_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_DATETIME_STRINGS_H_
/*
* Parses (almost) standard ISO 8601 date strings. The differences are:
@@ -81,4 +81,4 @@ NPY_NO_EXPORT PyObject *
array_datetime_as_string(PyObject *NPY_UNUSED(self), PyObject *args,
PyObject *kwds);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_DATETIME_STRINGS_H_ */
diff --git a/numpy/core/src/multiarray/descriptor.h b/numpy/core/src/multiarray/descriptor.h
index e1316acbd..f832958da 100644
--- a/numpy/core/src/multiarray/descriptor.h
+++ b/numpy/core/src/multiarray/descriptor.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAYDESCR_H_
-#define _NPY_ARRAYDESCR_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_DESCRIPTOR_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_DESCRIPTOR_H_
NPY_NO_EXPORT PyObject *arraydescr_protocol_typestr_get(
PyArray_Descr *, void *);
@@ -30,4 +30,4 @@ arraydescr_field_subset_view(PyArray_Descr *self, PyObject *ind);
extern NPY_NO_EXPORT char const *_datetime_strings[];
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_DESCRIPTOR_H_ */
diff --git a/numpy/core/src/multiarray/dragon4.h b/numpy/core/src/multiarray/dragon4.h
index d1b799f68..e3325bfa2 100644
--- a/numpy/core/src/multiarray/dragon4.h
+++ b/numpy/core/src/multiarray/dragon4.h
@@ -29,9 +29,8 @@
* Ryan Juckett's original code was under the Zlib license; he gave numpy
* permission to include it under the MIT license instead.
*/
-
-#ifndef _NPY_DRAGON4_H_
-#define _NPY_DRAGON4_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_DRAGON4_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_DRAGON4_H_
#include <Python.h>
#include <structmember.h>
@@ -136,5 +135,4 @@ Dragon4_Scientific(PyObject *obj, DigitMode digit_mode, int precision,
int min_digits, int sign, TrimMode trim, int pad_left,
int exp_digits);
-#endif
-
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_DRAGON4_H_ */
diff --git a/numpy/core/src/multiarray/dtype_transfer.h b/numpy/core/src/multiarray/dtype_transfer.h
index e29ac40b8..c7e0a029f 100644
--- a/numpy/core/src/multiarray/dtype_transfer.h
+++ b/numpy/core/src/multiarray/dtype_transfer.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_DTYPE_TRANSFER_H
-#define _NPY_DTYPE_TRANSFER_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_DTYPE_TRANSFER_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_DTYPE_TRANSFER_H_
#include "array_method.h"
@@ -202,4 +202,4 @@ get_wrapped_legacy_cast_function(int aligned,
int *out_needs_api, int allow_wrapped);
-#endif /* _NPY_DTYPE_TRANSFER_H */
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_DTYPE_TRANSFER_H_ */
diff --git a/numpy/core/src/multiarray/dtypemeta.h b/numpy/core/src/multiarray/dtypemeta.h
index 200111ac2..fb772c07d 100644
--- a/numpy/core/src/multiarray/dtypemeta.h
+++ b/numpy/core/src/multiarray/dtypemeta.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_DTYPEMETA_H
-#define _NPY_DTYPEMETA_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_DTYPEMETA_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_DTYPEMETA_H_
/* DType flags, currently private, since we may just expose functions */
@@ -80,4 +80,4 @@ PyArray_DTypeFromTypeNum(int typenum)
NPY_NO_EXPORT int
dtypemeta_wrap_legacy_descriptor(PyArray_Descr *dtypem);
-#endif /*_NPY_DTYPEMETA_H */
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_DTYPEMETA_H_ */
diff --git a/numpy/core/src/multiarray/einsum_debug.h b/numpy/core/src/multiarray/einsum_debug.h
index 9aa81fcbd..964964743 100644
--- a/numpy/core/src/multiarray/einsum_debug.h
+++ b/numpy/core/src/multiarray/einsum_debug.h
@@ -6,8 +6,8 @@
*
* See LICENSE.txt for the license.
*/
-#ifndef _NPY_MULTIARRAY_EINSUM_DEBUG_H
-#define _NPY_MULTIARRAY_EINSUM_DEBUG_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_EINSUM_DEBUG_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_EINSUM_DEBUG_H_
/********** PRINTF DEBUG TRACING **************/
#define NPY_EINSUM_DBG_TRACING 0
@@ -25,4 +25,4 @@
#define NPY_EINSUM_DBG_PRINT3(s, p1, p2, p3)
#endif
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_EINSUM_DEBUG_H_ */
diff --git a/numpy/core/src/multiarray/einsum_sumprod.h b/numpy/core/src/multiarray/einsum_sumprod.h
index c6cf18ec6..29ddaea14 100644
--- a/numpy/core/src/multiarray/einsum_sumprod.h
+++ b/numpy/core/src/multiarray/einsum_sumprod.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_MULTIARRAY_EINSUM_SUMPROD_H
-#define _NPY_MULTIARRAY_EINSUM_SUMPROD_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_EINSUM_SUMPROD_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_EINSUM_SUMPROD_H_
#include <numpy/npy_common.h>
@@ -9,4 +9,4 @@ NPY_VISIBILITY_HIDDEN sum_of_products_fn
get_sum_of_products_function(int nop, int type_num,
npy_intp itemsize, npy_intp const *fixed_strides);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_EINSUM_SUMPROD_H_ */
diff --git a/numpy/core/src/multiarray/getset.h b/numpy/core/src/multiarray/getset.h
index 4f1209de5..a95c98020 100644
--- a/numpy/core/src/multiarray/getset.h
+++ b/numpy/core/src/multiarray/getset.h
@@ -1,6 +1,6 @@
-#ifndef _NPY_ARRAY_GETSET_H_
-#define _NPY_ARRAY_GETSET_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_GETSET_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_GETSET_H_
extern NPY_NO_EXPORT PyGetSetDef array_getsetlist[];
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_GETSET_H_ */
diff --git a/numpy/core/src/multiarray/hashdescr.h b/numpy/core/src/multiarray/hashdescr.h
index 8d577e7b0..97375b4af 100644
--- a/numpy/core/src/multiarray/hashdescr.h
+++ b/numpy/core/src/multiarray/hashdescr.h
@@ -1,7 +1,7 @@
-#ifndef _NPY_HASHDESCR_H_
-#define _NPY_HASHDESCR_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_HASHDESCR_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_HASHDESCR_H_
NPY_NO_EXPORT npy_hash_t
PyArray_DescrHash(PyObject* odescr);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_HASHDESCR_H_ */
diff --git a/numpy/core/src/multiarray/item_selection.h b/numpy/core/src/multiarray/item_selection.h
index c1c8b5567..40d9eb298 100644
--- a/numpy/core/src/multiarray/item_selection.h
+++ b/numpy/core/src/multiarray/item_selection.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE__ITEM_SELECTION_H_
-#define _NPY_PRIVATE__ITEM_SELECTION_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ITEM_SELECTION_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ITEM_SELECTION_H_
/*
* Counts the number of True values in a raw boolean array. This
@@ -27,4 +27,4 @@ NPY_NO_EXPORT int
PyArray_MultiIndexSetItem(PyArrayObject *self, const npy_intp *multi_index,
PyObject *obj);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ITEM_SELECTION_H_ */
diff --git a/numpy/core/src/multiarray/iterators.h b/numpy/core/src/multiarray/iterators.h
index d942f45b8..883615cc9 100644
--- a/numpy/core/src/multiarray/iterators.h
+++ b/numpy/core/src/multiarray/iterators.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAYITERATORS_H_
-#define _NPY_ARRAYITERATORS_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_ITERATORS_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_ITERATORS_H_
NPY_NO_EXPORT PyObject
*iter_subscript(PyArrayIterObject *, PyObject *);
@@ -10,4 +10,4 @@ iter_ass_subscript(PyArrayIterObject *, PyObject *, PyObject *);
NPY_NO_EXPORT void
PyArray_RawIterBaseInit(PyArrayIterObject *it, PyArrayObject *ao);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_ITERATORS_H_ */
diff --git a/numpy/core/src/multiarray/legacy_dtype_implementation.h b/numpy/core/src/multiarray/legacy_dtype_implementation.h
index b36eb019a..04f455cde 100644
--- a/numpy/core/src/multiarray/legacy_dtype_implementation.h
+++ b/numpy/core/src/multiarray/legacy_dtype_implementation.h
@@ -1,8 +1,8 @@
-#ifndef _NPY_LEGACY_DTYPE_IMPLEMENTATION_H
-#define _NPY_LEGACY_DTYPE_IMPLEMENTATION_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_LEGACY_DTYPE_IMPLEMENTATION_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_LEGACY_DTYPE_IMPLEMENTATION_H_
NPY_NO_EXPORT npy_bool
PyArray_LegacyCanCastTypeTo(PyArray_Descr *from, PyArray_Descr *to,
NPY_CASTING casting);
-#endif /*_NPY_LEGACY_DTYPE_IMPLEMENTATION_H*/
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_LEGACY_DTYPE_IMPLEMENTATION_H_ */
diff --git a/numpy/core/src/multiarray/mapping.h b/numpy/core/src/multiarray/mapping.h
index 4e22f79df..e929b8b3f 100644
--- a/numpy/core/src/multiarray/mapping.h
+++ b/numpy/core/src/multiarray/mapping.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAYMAPPING_H_
-#define _NPY_ARRAYMAPPING_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_MAPPING_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_MAPPING_H_
extern NPY_NO_EXPORT PyMappingMethods array_as_mapping;
@@ -70,4 +70,4 @@ PyArray_MapIterNew(npy_index_info *indices , int index_num, int index_type,
npy_uint32 subspace_iter_flags, npy_uint32 subspace_flags,
npy_uint32 extra_op_flags, PyArrayObject *extra_op,
PyArray_Descr *extra_op_dtype);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_MAPPING_H_ */
diff --git a/numpy/core/src/multiarray/methods.h b/numpy/core/src/multiarray/methods.h
index c0de23c35..bcada0fea 100644
--- a/numpy/core/src/multiarray/methods.h
+++ b/numpy/core/src/multiarray/methods.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_METHODS_H_
-#define _NPY_ARRAY_METHODS_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_METHODS_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_METHODS_H_
#include "npy_import.h"
@@ -31,4 +31,4 @@ NpyPath_PathlikeToFspath(PyObject *file)
return PyObject_CallFunctionObjArgs(os_fspath, file, NULL);
}
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_METHODS_H_ */
diff --git a/numpy/core/src/multiarray/multiarraymodule.h b/numpy/core/src/multiarray/multiarraymodule.h
index 4cdb6ef72..640940d2a 100644
--- a/numpy/core/src/multiarray/multiarraymodule.h
+++ b/numpy/core/src/multiarray/multiarraymodule.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_MULTIARRAY_H_
-#define _NPY_MULTIARRAY_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_MULTIARRAYMODULE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_MULTIARRAYMODULE_H_
NPY_VISIBILITY_HIDDEN extern PyObject * npy_ma_str_array_wrap;
NPY_VISIBILITY_HIDDEN extern PyObject * npy_ma_str_array_finalize;
@@ -9,4 +9,4 @@ NPY_VISIBILITY_HIDDEN extern PyObject * npy_ma_str_axis2;
NPY_VISIBILITY_HIDDEN extern PyObject * npy_ma_str_like;
NPY_VISIBILITY_HIDDEN extern PyObject * npy_ma_str_numpy;
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_MULTIARRAYMODULE_H_ */
diff --git a/numpy/core/src/multiarray/nditer_impl.h b/numpy/core/src/multiarray/nditer_impl.h
index 6499e4895..b36ab8543 100644
--- a/numpy/core/src/multiarray/nditer_impl.h
+++ b/numpy/core/src/multiarray/nditer_impl.h
@@ -4,20 +4,21 @@
* should use the exposed iterator API.
*/
#ifndef NPY_ITERATOR_IMPLEMENTATION_CODE
-#error "This header is intended for use ONLY by iterator implementation code."
+#error This header is intended for use ONLY by iterator implementation code.
#endif
-#ifndef _NPY_PRIVATE__NDITER_IMPL_H_
-#define _NPY_PRIVATE__NDITER_IMPL_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_NDITER_IMPL_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_NDITER_IMPL_H_
+
+#define NPY_NO_DEPRECATED_API NPY_API_VERSION
+#define _MULTIARRAYMODULE
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <structmember.h>
-#define NPY_NO_DEPRECATED_API NPY_API_VERSION
-#define _MULTIARRAYMODULE
-#include <numpy/arrayobject.h>
-#include <npy_pycompat.h>
+#include "numpy/arrayobject.h"
+#include "npy_pycompat.h"
#include "convert_datatype.h"
#include "lowlevel_strided_loops.h"
@@ -355,4 +356,4 @@ npyiter_copy_to_buffers(NpyIter *iter, char **prev_dataptrs);
NPY_NO_EXPORT void
npyiter_clear_buffers(NpyIter *iter);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_NDITER_IMPL_H_ */
diff --git a/numpy/core/src/multiarray/nditer_pywrap.h b/numpy/core/src/multiarray/nditer_pywrap.h
index 49eb5d89d..d2fcafebd 100644
--- a/numpy/core/src/multiarray/nditer_pywrap.h
+++ b/numpy/core/src/multiarray/nditer_pywrap.h
@@ -1,8 +1,8 @@
-#ifndef __NDITER_PYWRAP_H
-#define __NDITER_PYWRAP_H
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_NDITER_PYWRAP_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_NDITER_PYWRAP_H_
NPY_NO_EXPORT PyObject *
NpyIter_NestedIters(PyObject *NPY_UNUSED(self),
PyObject *args, PyObject *kwds);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_NDITER_PYWRAP_H_ */
diff --git a/numpy/core/src/multiarray/npy_buffer.h b/numpy/core/src/multiarray/npy_buffer.h
index d10f1a020..62e08573c 100644
--- a/numpy/core/src/multiarray/npy_buffer.h
+++ b/numpy/core/src/multiarray/npy_buffer.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE_BUFFER_H_
-#define _NPY_PRIVATE_BUFFER_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_NPY_BUFFER_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_NPY_BUFFER_H_
extern NPY_NO_EXPORT PyBufferProcs array_as_buffer;
@@ -12,4 +12,4 @@ _descriptor_from_pep3118_format(char const *s);
NPY_NO_EXPORT int
void_getbuffer(PyObject *obj, Py_buffer *view, int flags);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_NPY_BUFFER_H_ */
diff --git a/numpy/core/src/multiarray/number.h b/numpy/core/src/multiarray/number.h
index 4f426f964..054840305 100644
--- a/numpy/core/src/multiarray/number.h
+++ b/numpy/core/src/multiarray/number.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_NUMBER_H_
-#define _NPY_ARRAY_NUMBER_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_NUMBER_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_NUMBER_H_
typedef struct {
PyObject *add;
@@ -69,4 +69,4 @@ NPY_NO_EXPORT PyObject *
PyArray_GenericAccumulateFunction(PyArrayObject *m1, PyObject *op, int axis,
int rtype, PyArrayObject *out);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_NUMBER_H_ */
diff --git a/numpy/core/src/multiarray/refcount.h b/numpy/core/src/multiarray/refcount.h
index 761d53dd0..959eef5ba 100644
--- a/numpy/core/src/multiarray/refcount.h
+++ b/numpy/core/src/multiarray/refcount.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE_REFCOUNT_H_
-#define _NPY_PRIVATE_REFCOUNT_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_REFCOUNT_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_REFCOUNT_H_
NPY_NO_EXPORT void
PyArray_Item_INCREF(char *data, PyArray_Descr *descr);
@@ -16,4 +16,4 @@ PyArray_XDECREF(PyArrayObject *mp);
NPY_NO_EXPORT void
PyArray_FillObjectArray(PyArrayObject *arr, PyObject *obj);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_REFCOUNT_H_ */
diff --git a/numpy/core/src/multiarray/scalartypes.h b/numpy/core/src/multiarray/scalartypes.h
index 861f2c943..95a2f66c6 100644
--- a/numpy/core/src/multiarray/scalartypes.h
+++ b/numpy/core/src/multiarray/scalartypes.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_SCALARTYPES_H_
-#define _NPY_SCALARTYPES_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_SCALARTYPES_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_SCALARTYPES_H_
/* Internal look-up tables */
extern NPY_NO_EXPORT unsigned char
@@ -31,4 +31,4 @@ _typenum_fromtypeobj(PyObject *type, int user);
NPY_NO_EXPORT void *
scalar_value(PyObject *scalar, PyArray_Descr *descr);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_SCALARTYPES_H_ */
diff --git a/numpy/core/src/multiarray/sequence.h b/numpy/core/src/multiarray/sequence.h
index b28c50d97..aff6aeb7e 100644
--- a/numpy/core/src/multiarray/sequence.h
+++ b/numpy/core/src/multiarray/sequence.h
@@ -1,6 +1,6 @@
-#ifndef _NPY_ARRAY_SEQUENCE_H_
-#define _NPY_ARRAY_SEQUENCE_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_SEQUENCE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_SEQUENCE_H_
extern NPY_NO_EXPORT PySequenceMethods array_as_sequence;
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_SEQUENCE_H_ */
diff --git a/numpy/core/src/multiarray/shape.h b/numpy/core/src/multiarray/shape.h
index 875b5430f..bef386ed1 100644
--- a/numpy/core/src/multiarray/shape.h
+++ b/numpy/core/src/multiarray/shape.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_SHAPE_H_
-#define _NPY_ARRAY_SHAPE_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_SHAPE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_SHAPE_H_
/*
* Creates a sorted stride perm matching the KEEPORDER behavior
@@ -21,4 +21,4 @@ PyArray_CreateMultiSortedStridePerm(int narrays, PyArrayObject **arrays,
NPY_NO_EXPORT PyObject *
PyArray_SqueezeSelected(PyArrayObject *self, npy_bool *axis_flags);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_SHAPE_H_ */
diff --git a/numpy/core/src/multiarray/strfuncs.h b/numpy/core/src/multiarray/strfuncs.h
index 5dd661a20..134b56ed3 100644
--- a/numpy/core/src/multiarray/strfuncs.h
+++ b/numpy/core/src/multiarray/strfuncs.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_ARRAY_STRFUNCS_H_
-#define _NPY_ARRAY_STRFUNCS_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_STRFUNCS_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_STRFUNCS_H_
NPY_NO_EXPORT void
PyArray_SetStringFunction(PyObject *op, int repr);
@@ -13,4 +13,4 @@ array_str(PyArrayObject *self);
NPY_NO_EXPORT PyObject *
array_format(PyArrayObject *self, PyObject *args);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_STRFUNCS_H_ */
diff --git a/numpy/core/src/multiarray/temp_elide.h b/numpy/core/src/multiarray/temp_elide.h
index 206bb0253..a1fec98d5 100644
--- a/numpy/core/src/multiarray/temp_elide.h
+++ b/numpy/core/src/multiarray/temp_elide.h
@@ -1,5 +1,6 @@
-#ifndef _NPY_ARRAY_TEMP_AVOID_H_
-#define _NPY_ARRAY_TEMP_AVOID_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_TEMP_ELIDE_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_TEMP_ELIDE_H_
+
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#include <numpy/ndarraytypes.h>
@@ -12,4 +13,4 @@ try_binary_elide(PyObject * m1, PyObject * m2,
PyObject * (inplace_op)(PyArrayObject * m1, PyObject * m2),
PyObject ** res, int commutative);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_TEMP_ELIDE_H_ */
diff --git a/numpy/core/src/multiarray/typeinfo.h b/numpy/core/src/multiarray/typeinfo.h
index 28afa4120..af4637fc9 100644
--- a/numpy/core/src/multiarray/typeinfo.h
+++ b/numpy/core/src/multiarray/typeinfo.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE_TYPEINFO_H_
-#define _NPY_PRIVATE_TYPEINFO_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_TYPEINFO_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_TYPEINFO_H_
#define PY_SSIZE_T_CLEAN
#include <Python.h>
@@ -18,4 +18,4 @@ PyArray_typeinforanged(
char typechar, int typenum, int nbits, int align,
PyObject *max, PyObject *min, PyTypeObject *type_obj);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_TYPEINFO_H_ */
diff --git a/numpy/core/src/multiarray/usertypes.h b/numpy/core/src/multiarray/usertypes.h
index 8b2fc80e6..6768e2c42 100644
--- a/numpy/core/src/multiarray/usertypes.h
+++ b/numpy/core/src/multiarray/usertypes.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_PRIVATE_USERTYPES_H_
-#define _NPY_PRIVATE_USERTYPES_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_USERTYPES_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_USERTYPES_H_
#include "array_method.h"
@@ -27,4 +27,4 @@ NPY_NO_EXPORT int
PyArray_AddLegacyWrapping_CastingImpl(
PyArray_DTypeMeta *from, PyArray_DTypeMeta *to, NPY_CASTING casting);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_USERTYPES_H_ */
diff --git a/numpy/core/src/multiarray/vdot.h b/numpy/core/src/multiarray/vdot.h
index 0f60ca6d1..f6da5ddea 100644
--- a/numpy/core/src/multiarray/vdot.h
+++ b/numpy/core/src/multiarray/vdot.h
@@ -1,5 +1,5 @@
-#ifndef _NPY_VDOT_H_
-#define _NPY_VDOT_H_
+#ifndef NUMPY_CORE_SRC_MULTIARRAY_VDOT_H_
+#define NUMPY_CORE_SRC_MULTIARRAY_VDOT_H_
#include "common.h"
@@ -15,4 +15,4 @@ CLONGDOUBLE_vdot(char *, npy_intp, char *, npy_intp, char *, npy_intp, void *);
NPY_NO_EXPORT void
OBJECT_vdot(char *, npy_intp, char *, npy_intp, char *, npy_intp, void *);
-#endif
+#endif /* NUMPY_CORE_SRC_MULTIARRAY_VDOT_H_ */