| 187 | } |
| 188 | |
| 189 | void init_range(nb::module_& m) { |
| 190 | nb::class_<LIEF::range_t>(m, "range_t") |
| 191 | .def_rw("low", &LIEF::range_t::low) |
| 192 | .def_rw("high", &LIEF::range_t::high) |
| 193 | .def_prop_ro("size", &LIEF::range_t::size) |
| 194 | .def("__repr__", |
| 195 | [] (const LIEF::range_t& R) { |
| 196 | return fmt::format("<range: 0x{:04x}-0x{:04x}>", R.low, R.high); |
| 197 | } |
| 198 | ) |
| 199 | |
| 200 | LIEF_DEFAULT_STR(LIEF::range_t); |
| 201 | ; |
| 202 | } |
| 203 | |
| 204 | void init_debug_location(nb::module_& m) { |
| 205 | nb::class_<LIEF::debug_location_t>(m, "debug_location_t") |