This commit cleans and modernizes the code base of LIEF.

Among the changes:

- It removes the ``and, or, not`` keywords
- It updates the Documentation
- It moves the internal structures in the ``details::`` namespace
This commit is contained in:
rthomas
2022-01-27 18:50:12 +01:00
committed by Romain Thomas
parent 540049d0d9
commit a615adbee4
625 changed files with 15701 additions and 15535 deletions
+13 -4
View File
@@ -32,7 +32,10 @@ using setter_t = void (Function::*)(T);
template<>
void create<Function>(py::module& m) {
py::class_<Function, Symbol> pyfunction(m, "Function");
py::class_<Function, Symbol> pyfunction(m, "Function",
R"delim(
Class which represents a Function in an executable file format.
)delim");
py::enum_<Function::FLAGS>(pyfunction, "FLAGS")
.value(PY_ENUM(Function::FLAGS::IMPORTED))
@@ -47,16 +50,22 @@ void create<Function>(py::module& m) {
.def(py::init<uint64_t>())
.def(py::init<const std::string&, uint64_t>())
.def("add",
&Function::add,
"Add the given " RST_CLASS_REF(lief.Function.FLAGS) "",
"flag"_a)
.def_property_readonly("flags",
&Function::flags,
"Function flags as a list of " RST_CLASS_REF(lief.Function.FLAGS) "")
.def_property("address",
static_cast<getter_t<uint64_t>>(&Function::address),
static_cast<setter_t<uint64_t>>(&Function::address),
"Function's address")
.def("__str__",
[] (const Function& f)
{
[] (const Function& f) {
std::ostringstream stream;
stream << f;
std::string str = stream.str();