box: refactor port_c msgpack methods
Methods `get_msgpack` and `dump_msgpack` generally do the same things except for some details (array header, type of destination buffer), so let's factor out their core part into a separate function - it doesn't make much sense right now, but we are going to populate port_c with new types, and these two functions would become very similar without this refactoring. Along the way, let's panic in these methods when we are out of memory - it's the approach we are taking right now in Tarantool. Corresponding error injection is dropped as well. NO_TEST=refactoring NO_CHANGELOG=refactoring NO_DOC=refactoring
Showing
- src/box/port.c 45 additions, 63 deletionssrc/box/port.c
- src/box/port.h 1 addition, 3 deletionssrc/box/port.h
- src/box/sql/port.c 1 addition, 2 deletionssrc/box/sql/port.c
- src/lib/core/errinj.h 0 additions, 1 deletionsrc/lib/core/errinj.h
- test/box/errinj.result 0 additions, 37 deletionstest/box/errinj.result
- test/box/errinj.test.lua 0 additions, 14 deletionstest/box/errinj.test.lua
Loading
Please register or sign in to comment