Skip to content

Commit 632e8fc

Browse files
committed
Do appropriate include for alloca
1 parent 94486de commit 632e8fc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

numpy/core/src/multiarray/hpy_utils.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33

44
#include "numpy/ndarraytypes.h"
55

6+
/* declare alloca() */
7+
#if defined(_MSC_VER)
8+
# include <malloc.h> /* for alloca() */
9+
#else
10+
# include <stdint.h>
11+
# if (defined (__SVR4) && defined (__sun)) || defined(_AIX) || defined(__hpux)
12+
# include <alloca.h>
13+
# endif
14+
#endif
15+
616
#define HPy_SETREF(ctx, op, op2) \
717
do { \
818
HPy _h_tmp = (op); \

0 commit comments

Comments
 (0)