Skip to content
Snippets Groups Projects
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
Branches
Tags
1 merge request!23Resolve "What is the use of PyBobIo_FilenameConverter"
Pipeline #
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment