Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e921f3a

Browse files
committed
MAINT: Use npy_os in f2py
1 parent 865fdda commit e921f3a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

numpy/f2py/cfuncs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@
6464
typedefs['unsigned_long'] = 'typedef unsigned long unsigned_long;'
6565
typedefs['signed_char'] = 'typedef signed char signed_char;'
6666
typedefs['long_long'] = """\
67-
#ifdef _WIN32
67+
#if defined(NPY_OS_WIN32)
6868
typedef __int64 long_long;
6969
#else
7070
typedef long long long_long;
7171
typedef unsigned long long unsigned_long_long;
7272
#endif
7373
"""
7474
typedefs['unsigned_long_long'] = """\
75-
#ifdef _WIN32
75+
#if defined(NPY_OS_WIN32)
7676
typedef __uint64 long_long;
7777
#else
7878
typedef unsigned long long unsigned_long_long;

numpy/f2py/rules.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
127127
/* Unconditionally included */
128128
#include <Python.h>
129+
#include <numpy/npy_os.h>
129130
130131
""" + gentitle("See f2py2e/cfuncs.py: includes") + """
131132
#includes#

0 commit comments

Comments
 (0)