diff --git a/src/core_ffi/python_ffi/binder/group.cc b/src/core_ffi/python_ffi/binder/group.cc index 24d239a..568b91b 100644 --- a/src/core_ffi/python_ffi/binder/group.cc +++ b/src/core_ffi/python_ffi/binder/group.cc @@ -1,3 +1,5 @@ +#include + #include "binder.h" #include "py_ffi/cases.h" diff --git a/src/core_ffi/python_ffi/binder/group_union.cc b/src/core_ffi/python_ffi/binder/group_union.cc index 5e739c2..d7629c9 100644 --- a/src/core_ffi/python_ffi/binder/group_union.cc +++ b/src/core_ffi/python_ffi/binder/group_union.cc @@ -1,3 +1,5 @@ +#include + #include "binder.h" #include "py_ffi/cases.h" diff --git a/src/core_ffi/python_ffi/binder/klsk_code.cc b/src/core_ffi/python_ffi/binder/klsk_code.cc index f8599bc..1e6065f 100644 --- a/src/core_ffi/python_ffi/binder/klsk_code.cc +++ b/src/core_ffi/python_ffi/binder/klsk_code.cc @@ -54,6 +54,13 @@ static void bind_layout(const py::module_ &mod) { .def("__int__", &PyLayout::value) .def("__repr__", &PyLayout::repr) + .def("__copy__", [](const PyLayout &self) { + return PyLayout(self); + }) + .def("__deepcopy__", [](const PyLayout &self, py::dict) { + return PyLayout(self); + }, py::arg("memo")) + .def("next_cases", &PyLayout::next_cases) .def("dump_seq", &PyLayout::dump_seq) // TODO: add fast_cal / fast_cal_multi / ...