summaryrefslogtreecommitdiff
path: root/numpy/f2py/rules.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2021-04-12 23:23:48 +0300
committerPearu Peterson <pearu.peterson@gmail.com>2021-05-10 17:47:46 +0300
commit8992459df6f8558c85d5036951799b757d74b3d5 (patch)
tree61faaf7398432c894328047a7570218a2cf1a866 /numpy/f2py/rules.py
parentf9c3ed5bc5c7bad4649bbfc4056c5d6ea39e1abb (diff)
downloadnumpy-8992459df6f8558c85d5036951799b757d74b3d5.tar.gz
BUG: revise string_from_pyobj/try_pyarr_from_string usages, fixes #18431.
Diffstat (limited to 'numpy/f2py/rules.py')
-rwxr-xr-xnumpy/f2py/rules.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/f2py/rules.py b/numpy/f2py/rules.py
index 63e47baa2..ae0ae684a 100755
--- a/numpy/f2py/rules.py
+++ b/numpy/f2py/rules.py
@@ -963,7 +963,8 @@ if (#varname#_cb.capi==Py_None) {
'args_capi': {isrequired: ',&#varname#_capi'},
'keys_capi': {isoptional: ',&#varname#_capi'},
'pyobjfrom': {isintent_inout: '''\
-\tf2py_success = try_pyarr_from_#ctype#(#varname#_capi,#varname#);
+\tf2py_success = try_pyarr_from_#ctype#(#varname#_capi, #varname#,
+\t slen(#varname#));
\tif (f2py_success) {'''},
'closepyobjfrom': {isintent_inout: '\t} /*if (f2py_success) of #varname# pyobjfrom*/'},
'need': {isintent_inout: 'try_pyarr_from_#ctype#'},