Skip to content

Commit cdfa82c

Browse files
committed
MAINT: Readd missing ifdef __cplusplus extern C
Not sure when this got lost, but should be easy to deal with any conflicts
1 parent b6e4415 commit cdfa82c

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

numpy/core/src/multiarray/abstractdtypes.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
#include "dtypemeta.h"
66

77

8+
#ifdef __cplusplus
9+
extern "C" {
10+
#endif
11+
812
/*
913
* These are mainly needed for value based promotion in ufuncs. It
1014
* may be necessary to make them (partially) public, to allow user-defined
@@ -70,4 +74,8 @@ npy_mark_tmp_array_if_pyscalar(
7074
return 0;
7175
}
7276

77+
#ifdef __cplusplus
78+
}
79+
#endif
80+
7381
#endif /* NUMPY_CORE_SRC_MULTIARRAY_ABSTRACTDTYPES_H_ */

numpy/core/src/multiarray/arrayobject.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
#ifndef NUMPY_CORE_SRC_MULTIARRAY_ARRAYOBJECT_H_
66
#define NUMPY_CORE_SRC_MULTIARRAY_ARRAYOBJECT_H_
77

8+
#ifdef __cplusplus
9+
extern "C" {
10+
#endif
11+
812
extern NPY_NO_EXPORT npy_bool numpy_warn_if_no_mem_policy;
913

1014
NPY_NO_EXPORT PyObject *
@@ -51,4 +55,8 @@ static const int NPY_ARRAY_WAS_PYTHON_COMPLEX = (1 << 28);
5155
static const int NPY_ARRAY_WAS_INT_AND_REPLACED = (1 << 27);
5256
static const int NPY_ARRAY_WAS_PYTHON_LITERAL = (1 << 30 | 1 << 29 | 1 << 28);
5357

58+
#ifdef __cplusplus
59+
}
60+
#endif
61+
5462
#endif /* NUMPY_CORE_SRC_MULTIARRAY_ARRAYOBJECT_H_ */

0 commit comments

Comments
 (0)