sio: introduce and use sio_snprintf()
sio_strfaddr() can't be used in the places where static buffer is not acceptable - in any code which wants to push the value to Lua, or the address string must be long living. The patch introduces sio_snprintf(), which does the same, but saves the result into a provided buffer with a limited size. In the Lua C code the patch saves the address string on the stack which makes it safe against Lua GC interruptions. Part of #5632
Showing
- src/box/iproto.cc 5 additions, 3 deletionssrc/box/iproto.cc
- src/box/iproto.h 1 addition, 1 deletionsrc/box/iproto.h
- src/box/lua/info.c 3 additions, 2 deletionssrc/box/lua/info.c
- src/box/lua/session.c 5 additions, 2 deletionssrc/box/lua/session.c
- src/lib/core/sio.c 28 additions, 12 deletionssrc/lib/core/sio.c
- src/lib/core/sio.h 4 additions, 0 deletionssrc/lib/core/sio.h
Loading
Please register or sign in to comment