summaryrefslogtreecommitdiff
path: root/numpy/f2py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-09-12 23:07:39 -0500
committerGitHub <noreply@github.com>2020-09-12 23:07:39 -0500
commit3ad444b07ed53cf43d11e755701224a96840de62 (patch)
tree38de6842fbe6de6576eafc35aeefb7b8cfa2f842 /numpy/f2py
parent48efb02a936da85e395ff29a477765ea3916770d (diff)
parentc2dae48225b8b004fe68ae1875eecec4f4b758f1 (diff)
downloadnumpy-3ad444b07ed53cf43d11e755701224a96840de62.tar.gz
Merge pull request #17292 from charris/cleanup-remaining-pystring-macros
MAINT: Replace remaining PyString macros.
Diffstat (limited to 'numpy/f2py')
-rw-r--r--numpy/f2py/cfuncs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
index 35f77eec2..94867b309 100644
--- a/numpy/f2py/cfuncs.py
+++ b/numpy/f2py/cfuncs.py
@@ -438,7 +438,7 @@ cppmacros['GETSTRFROMPYTUPLE'] = """\
goto capi_fail;\\
if (PyBytes_Check(rv_cb_str)) {\\
str[len-1]='\\0';\\
- STRINGCOPYN((str),PyString_AS_STRING((PyBytesObject*)rv_cb_str),(len));\\
+ STRINGCOPYN((str),PyBytes_AS_STRING((PyBytesObject*)rv_cb_str),(len));\\
} else {\\
PRINTPYOBJERR(rv_cb_str);\\
PyErr_SetString(#modulename#_error,\"string object expected\");\\
@@ -675,9 +675,9 @@ fprintf(stderr,\"string_from_pyobj(str='%s',len=%d,inistr='%s',obj=%p)\\n\",(cha
}
if (tmp == NULL) goto capi_fail;
if (*len == -1)
- *len = PyString_GET_SIZE(tmp);
+ *len = PyBytes_GET_SIZE(tmp);
STRINGMALLOC(*str,*len);
- STRINGCOPYN(*str,PyString_AS_STRING(tmp),*len+1);
+ STRINGCOPYN(*str,PyBytes_AS_STRING(tmp),*len+1);
Py_DECREF(tmp);
return 1;
capi_fail: