core: populate mp_ctx with virtual copy
We are going to populate port_c with mp_object, which requires mp_ctx. However, we want to have an ability to dump one port_c instance several times, so we need to add virtual copy to mp_ctx. It would be fair to say that copy constructor must accept `src` as a constant object, but this approach is inconvinient in C, and such method would be embarrassing to use in our code. So `src` is not constant in copy constructor. Method copy of mp_box_ctx is not implemented because it's not trivial, it probably will require reference counting in tuple_format_map. Anyway, it is not needed now, so that's not a problem. Also, mp_ctx_move required dst to be default initialized. However, since it provides semantics of move constructor, we shouldn't expect dst to be initialized at all, since constructor is used to construct an uninitialized object. So let's drop this requirement along the way. NO_TEST=trivial NO_CHANGELOG=internal NO_DOC=internal
Please register or sign in to comment