diff options
author | Pearu Peterson <pearu@pearu-laptop.(none)> | 2010-10-16 21:37:21 +0300 |
---|---|---|
committer | Pearu Peterson <pearu@pearu-laptop.(none)> | 2010-10-16 21:37:21 +0300 |
commit | 1ef8aac121008e558040d8937788daed46ce8ca4 (patch) | |
tree | 17a41b0cce19994cc2da6cb8fed3e30c4d0f94d9 /numpy/f2py/cb_rules.py | |
parent | eca8f94e294003336d901b7e718375fad0c2619c (diff) | |
download | numpy-1ef8aac121008e558040d8937788daed46ce8ca4.tar.gz |
BUG: f2py: fix creating string object from callback function using string size.
Diffstat (limited to 'numpy/f2py/cb_rules.py')
-rw-r--r-- | numpy/f2py/cb_rules.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/f2py/cb_rules.py b/numpy/f2py/cb_rules.py index 99742cb46..8e8320bfd 100644 --- a/numpy/f2py/cb_rules.py +++ b/numpy/f2py/cb_rules.py @@ -333,7 +333,7 @@ cb_arg_rules=[ 'pyobjfrom':[{debugcapi:'\tfprintf(stderr,"debug-capi:cb:#varname#=\\"#showvalueformat#\\":%d:\\n",#varname_i#,#varname_i#_cb_len);'}, {isintent_in:"""\ \tif (#name#_nofargs>capi_i) -\t\tif (PyTuple_SetItem((PyObject *)capi_arglist,capi_i++,pyobj_from_#ctype#1(#varname_i#))) +\t\tif (PyTuple_SetItem((PyObject *)capi_arglist,capi_i++,pyobj_from_#ctype#1size(#varname_i#,#varname_i#_cb_len))) \t\t\tgoto capi_fail;"""}, {isintent_inout:"""\ \tif (#name#_nofargs>capi_i) { @@ -341,7 +341,7 @@ cb_arg_rules=[ \t\tif (PyTuple_SetItem((PyObject *)capi_arglist,capi_i++,pyarr_from_p_#ctype#1(#varname_i#,#varname_i#_cb_dims))) \t\t\tgoto capi_fail; \t}"""}], - 'need':[{isintent_in:'pyobj_from_#ctype#1'}, + 'need':[{isintent_in:'pyobj_from_#ctype#1size'}, {isintent_inout:'pyarr_from_p_#ctype#1'}], '_check':l_and(isstring,isintent_nothide), '_optional':'' |