mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
完善get_full_path接口
Some checks are pending
Android / build (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Docker / build (push) Waiting to run
Linux / build (push) Waiting to run
Linux_Python / build (push) Waiting to run
macOS / build (push) Waiting to run
macOS_Python / build (push) Waiting to run
Windows / build (push) Waiting to run
Windows_Python / build (push) Waiting to run
Some checks are pending
Android / build (push) Waiting to run
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
Docker / build (push) Waiting to run
Linux / build (push) Waiting to run
Linux_Python / build (push) Waiting to run
macOS / build (push) Waiting to run
macOS_Python / build (push) Waiting to run
Windows / build (push) Waiting to run
Windows_Python / build (push) Waiting to run
This commit is contained in:
parent
6c82601fe2
commit
d8880f032d
@ -239,8 +239,12 @@ PYBIND11_EMBEDDED_MODULE(mk_loader, m) {
|
|||||||
|
|
||||||
m.def("get_full_path", [](const std::string &path, const std::string ¤t_path) -> std::string {
|
m.def("get_full_path", [](const std::string &path, const std::string ¤t_path) -> std::string {
|
||||||
py::gil_scoped_release release;
|
py::gil_scoped_release release;
|
||||||
return File::absolutePath(path, current_path);
|
switch (path.front()) {
|
||||||
});
|
case '/':
|
||||||
|
case '\\': return path;
|
||||||
|
default: return File::absolutePath(path, current_path);
|
||||||
|
}
|
||||||
|
}, py::arg("path"), py::arg("current_path") = "");
|
||||||
|
|
||||||
m.def("set_config", [](const std::string &key, const std::string &value) -> bool {
|
m.def("set_config", [](const std::string &key, const std::string &value) -> bool {
|
||||||
py::gil_scoped_release release;
|
py::gil_scoped_release release;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user