1/*
2 * Copyright (c) 2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 118 unchanged lines hidden (view full) ---

127 ;
128}
129
130static void
131init_serialize(py::module &m_native)
132{
133 py::module m = m_native.def_submodule("serialize");
134
135 py::class_<Serializable>(m, "Serializable")
135 py::class_<Serializable, std::unique_ptr<Serializable, py::nodelete>>(
136 m, "Serializable")
137 ;
138
139 py::class_<CheckpointIn>(m, "CheckpointIn")
140 ;
141}
142
143static void
144init_range(py::module &m_native)

--- 16 unchanged lines hidden (view full) ---

161 .def("valid", &AddrRange::valid)
162 .def("start", &AddrRange::start)
163 .def("end", &AddrRange::end)
164 .def("mergesWith", &AddrRange::mergesWith)
165 .def("intersects", &AddrRange::intersects)
166 .def("isSubset", &AddrRange::isSubset)
167 ;
168
168 // We need to make vectors of AddrRange opaque to avoid a weird
169 // We need to make vectors of AddrRange opaque to avoid weird
170 // memory allocation issues in PyBind's STL wrappers.
171 py::bind_vector<std::vector<AddrRange>>(m, "AddrRangeVector");
172
173 m.def("RangeEx", &RangeEx);
174 m.def("RangeIn", &RangeIn);
175 m.def("RangeSize", &RangeSize);
176}
177

--- 103 unchanged lines hidden ---