summaryrefslogtreecommitdiff
path: root/numpy/f2py/cfuncs.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2014-02-16 15:07:25 -0700
committerCharles Harris <charlesr.harris@gmail.com>2014-02-16 15:07:25 -0700
commitddcb49e5f779a9e42356914b9ec4162b722d4ab0 (patch)
treec60ddd79ccbeec804ec839ede1ab9858de404f2b /numpy/f2py/cfuncs.py
parent2868dc4a0513f58eafc013f3ba3d84ae07113199 (diff)
downloadnumpy-ddcb49e5f779a9e42356914b9ec4162b722d4ab0.tar.gz
BUG: #4256: f2py, PyString_FromStringAndSize is undefined in Python3.
Use PyUString_FromStringAndSize defined in npy_3kcompat instead. Not using bytes may cause some problems, but strings seem like a better choice. As modules generated with current f2py error out, this particular use is not common and we are free to choose. Closes #4256.
Diffstat (limited to 'numpy/f2py/cfuncs.py')
-rw-r--r--numpy/f2py/cfuncs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
index 5a5d2bf64..aade23db6 100644
--- a/numpy/f2py/cfuncs.py
+++ b/numpy/f2py/cfuncs.py
@@ -312,7 +312,7 @@ cppmacros['pyobj_from_complex_float1']='#define pyobj_from_complex_float1(v) (Py
needs['pyobj_from_string1']=['string']
cppmacros['pyobj_from_string1']='#define pyobj_from_string1(v) (PyString_FromString((char *)v))'
needs['pyobj_from_string1size']=['string']
-cppmacros['pyobj_from_string1size']='#define pyobj_from_string1size(v,len) (PyString_FromStringAndSize((char *)v, len))'
+cppmacros['pyobj_from_string1size']='#define pyobj_from_string1size(v,len) (PyUString_FromStringAndSize((char *)v, len))'
needs['TRYPYARRAYTEMPLATE']=['PRINTPYOBJERR']
cppmacros['TRYPYARRAYTEMPLATE']="""\
/* New SciPy */