Skip to content

Commit e52ea92

Browse files
committed
Fix pointer size for F90 allocatable arrays on 64-bit platform. Closes ticket numpy#147.
1 parent d8f883a commit e52ea92

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numpy/f2py/f90mod_rules.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
show=pprint.pprint
2525

2626
from auxfuncs import *
27+
import numpy as N
2728
import capi_maps
2829
import cfuncs
2930
import rules
@@ -44,7 +45,8 @@ def findf90modules(m):
4445
fgetdims1 = """\
4546
external f2pysetdata
4647
logical ns
47-
integer s(*),r,i,j
48+
integer r,i,j
49+
integer(%d) s(*)
4850
ns = .FALSE.
4951
if (allocated(d)) then
5052
do i=1,r
@@ -56,7 +58,7 @@ def findf90modules(m):
5658
deallocate(d)
5759
end if
5860
end if
59-
if ((.not.allocated(d)).and.(s(1).ge.1)) then"""
61+
if ((.not.allocated(d)).and.(s(1).ge.1)) then""" % N.intp().itemsize
6062

6163
fgetdims2="""\
6264
end if

0 commit comments

Comments
 (0)