Skip to content

Commit 0dc4005

Browse files
author
Gerry Manoim
committed
remove more pre 3.5 compat
1 parent 8bd4245 commit 0dc4005

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

include/libpy/to_object.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct to_object<std::filesystem::path> {
142142
static py::owned_ref<> f(const std::filesystem::path& path) {
143143
py::owned_ref path_str{
144144
PyUnicode_FromStringAndSize(path.c_str(), path.native().length())};
145-
#if PY_VERSION_HEX >= 0x03040000
145+
146146
py::owned_ref pathlib(PyImport_ImportModule("pathlib"));
147147
if (!pathlib) {
148148
throw py::exception();
@@ -158,9 +158,6 @@ struct to_object<std::filesystem::path> {
158158
throw py::exception();
159159
}
160160
return path_obj;
161-
#else
162-
return path_str;
163-
#endif
164161
}
165162
};
166163

0 commit comments

Comments
 (0)