Export Flags.ToDict to python

This commit is contained in:
Christopher Lackner 2021-09-28 14:05:33 +02:00
parent 49a6172548
commit 2b7347ce07

View File

@ -177,6 +177,10 @@ PYBIND11_MODULE(pyngcore, m) // NOLINT
return py::cast(self.GetDefineFlag(name));
}, py::arg("name"), "Return flag by given name")
.def("ToDict", [](const Flags& flags)
{
return CreateDictFromFlags(flags);
})
;
py::implicitly_convertible<py::dict, Flags>();