MCPcopy Create free account
hub / github.com/lief-project/LIEF / init_utils

Function init_utils

api/python/src/ELF/init.cpp:103–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103inline void init_utils(nb::module_&) {
104 lief_mod->def("is_elf",
105 [] (nb::PathLike path) {
106 return is_elf(path);
107 }, "Check if the given file is an ``ELF``", "filename"_a
108 );
109
110 lief_mod->def("is_elf",
111 nb::overload_cast<const std::vector<uint8_t>&>(&is_elf),
112 "Check if the given raw data is an ``ELF``",
113 "raw"_a);
114}
115
116void init(nb::module_& m) {
117 nb::module_ elf_mod = m.def_submodule("ELF", "Python API for the ELF format");

Callers 1

initFunction · 0.70

Calls 1

is_elfFunction · 0.50

Tested by

no test coverage detected