Commit d82af062 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge branch '7-what-is-the-use-of-pybobio_filenameconverter' into 'master'

Resolve "What is the use of PyBobIo_FilenameConverter"

Closes #7

See merge request !23
parents ac4bd1ae a04367db
Pipeline #12319 passed with stages
in 11 minutes and 6 seconds
......@@ -73,12 +73,14 @@ int PyBobIo_FilenameConverter (PyObject* o, const char** b) {
*b = PyUnicode_AsUTF8(o);
} else {
PyObject* temp = PyObject_Bytes(o);
if (!temp) return 0;
auto temp_ = make_safe(temp);
*b = PyBytes_AsString(temp);
}
#else
if (PyUnicode_Check(o)) {
PyObject* temp = PyUnicode_AsEncodedString(o, Py_FileSystemDefaultEncoding, "strict");
if (!temp) return 0;
auto temp_ = make_safe(temp);
*b = PyString_AsString(temp);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment