[Numpy-svn] r3720 - trunk/numpy/f2py

numpy-svn@scip... numpy-svn@scip...
Fri Apr 20 07:12:58 CDT 2007


Author: stefan
Date: 2007-04-20 07:12:43 -0500 (Fri, 20 Apr 2007)
New Revision: 3720

Modified:
   trunk/numpy/f2py/f90mod_rules.py
Log:
Fix pointer size for F90 allocatable arrays on 64-bit platform. Closes ticket #147.


Modified: trunk/numpy/f2py/f90mod_rules.py
===================================================================
--- trunk/numpy/f2py/f90mod_rules.py	2007-04-18 18:32:47 UTC (rev 3719)
+++ trunk/numpy/f2py/f90mod_rules.py	2007-04-20 12:12:43 UTC (rev 3720)
@@ -24,6 +24,7 @@
 show=pprint.pprint
 
 from auxfuncs import *
+import numpy as N
 import capi_maps
 import cfuncs
 import rules
@@ -44,7 +45,8 @@
 fgetdims1 = """\
       external f2pysetdata
       logical ns
-      integer s(*),r,i,j
+      integer r,i,j
+      integer(%d) s(*)
       ns = .FALSE.
       if (allocated(d)) then
          do i=1,r
@@ -56,7 +58,7 @@
             deallocate(d)
          end if
       end if
-      if ((.not.allocated(d)).and.(s(1).ge.1)) then"""
+      if ((.not.allocated(d)).and.(s(1).ge.1)) then""" % N.intp().itemsize
 
 fgetdims2="""\
       end if



More information about the Numpy-svn mailing list