[Tarantool-patches] [PATCH v3 00/10] fix say_x format and rework fibers
Cyrill Gorcunov
gorcunov at gmail.com
Wed May 12 00:15:38 MSK 2021
On Tue, May 11, 2021 at 10:13:01PM +0200, Vladislav Shpilevoy wrote:
> Hi! Good job on the fixes, really!
>
> Although function lbox_fiber_statof() still uses lua_pushinteger():
>
Thanks a huge for catching it, Vlad. Here is an update. Squashed
to patch 1 "fiber: use uint64_t for fiber IDs" and force pushed.
---
src/lua/fiber.c | 2 +-
src/lua/utils.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lua/fiber.c b/src/lua/fiber.c
index eb6bcc612..0d28fce8c 100644
--- a/src/lua/fiber.c
+++ b/src/lua/fiber.c
@@ -267,7 +267,7 @@ lbox_fiber_statof(struct fiber *f, void *cb_ctx, bool backtrace)
{
struct lua_State *L = (struct lua_State *) cb_ctx;
- lua_pushinteger(L, f->fid);
+ luaL_pushuint64(L, f->fid);
lua_newtable(L);
lua_pushliteral(L, "name");
diff --git a/src/lua/utils.c b/src/lua/utils.c
index b5a6ca5b7..0fbe700fc 100644
--- a/src/lua/utils.c
+++ b/src/lua/utils.c
@@ -1348,10 +1348,10 @@ void cord_on_yield(void)
*/
struct lua_State *L = fiber()->storage.lua.stack;
assert(L != NULL);
- lua_pushfstring(L, "fiber %d is switched while running the"
+ lua_pushfstring(L, "fiber %llu is switched while running the"
" compiled code (it's likely a function with"
" a yield underneath called via LuaJIT FFI)",
- fiber()->fid);
+ (long long)fiber()->fid);
if (g->panic)
g->panic(L);
exit(EXIT_FAILURE);
--
2.31.1
More information about the Tarantool-patches
mailing list