diff options
Diffstat (limited to 'numpy/f2py/lib/src')
-rw-r--r-- | numpy/f2py/lib/src/pyobj_to_string_len.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/numpy/f2py/lib/src/pyobj_to_string_len.c b/numpy/f2py/lib/src/pyobj_to_string_len.c index 306c961a3..f082a4b3b 100644 --- a/numpy/f2py/lib/src/pyobj_to_string_len.c +++ b/numpy/f2py/lib/src/pyobj_to_string_len.c @@ -1,11 +1,11 @@ int pyobj_to_string_len(PyObject* obj, f2py_string* value, size_t length) { - if (PyString_Check(obj)) { - if (strncpy((char*)value,PyString_AS_STRING(obj), length)) - return 1; - } - if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_TypeError, - "Failed to convert python object to C f2py_string."); - } - return 0; + if (PyString_Check(obj)) { + if (strncpy((char*)value,PyString_AS_STRING(obj), length)) + return 1; + } + if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "Failed to convert python object to C f2py_string."); + } + return 0; } |