■ ■ ■ ■ ■ ■
api/python/src/PE/objects/debug/pyCodeViewPDB.cpp
| skipped 21 lines |
22 | 22 | | #include <nanobind/stl/string.h> |
23 | 23 | | #include <nanobind/stl/array.h> |
24 | 24 | | |
| 25 | + | #include "pySafeString.hpp" |
| 26 | + | |
25 | 27 | | namespace LIEF::PE::py { |
26 | 28 | | |
27 | 29 | | template<> |
| skipped 27 lines |
55 | 57 | | nb::overload_cast<uint32_t>(&CodeViewPDB::age)) |
56 | 58 | | |
57 | 59 | | .def_prop_rw("filename", |
58 | | - | nb::overload_cast<>(&CodeViewPDB::filename, nb::const_), |
| 60 | + | [] (const CodeViewPDB& self) { |
| 61 | + | return LIEF::py::safe_string(self.filename()); |
| 62 | + | }, |
59 | 63 | | nb::overload_cast<std::string>(&CodeViewPDB::filename), |
60 | 64 | | "Original pdb path") |
61 | 65 | | |
| skipped 5 lines |