[Tarantool-patches] [PATCH v3 00/10] fix say_x format and rework fibers

Cyrill Gorcunov gorcunov at gmail.com
Thu May 13 14:44:09 MSK 2021


On Thu, May 13, 2021 at 01:17:15PM +0200, Vladislav Shpilevoy wrote:
> On 13.05.2021 10:17, Cyrill Gorcunov wrote:
> > On Wed, May 12, 2021 at 08:41:42PM +0200, Vladislav Shpilevoy wrote:
> >>>
> >>> static int
> >>> lbox_fiber_top_entry(struct fiber *f, void *cb_ctx)
> >>> {
> >>> 	struct lua_State *L = (struct lua_State *) cb_ctx;
> >>>
> >>> -->	lua_pushfstring(L, "%f/%s", (lua_Number)f->fid, f->name);
> >>>
> >>> why do we use float formate here at all?!
> >>
> >> Because lua_pushfstring() does not support %llu.
> > 
> > What about the idea below? float is 4 byte len and won't cover the
> > 8 byte integer so we will have a rounding error.
> 
> Looks good. But also this is strange how did it work before? lua_Number

I think it was simply a bit screwed but nobody noticed it yet.

> is double, if I am not mistaken. Which means it should have %lf format,
> and it should be fine for all the reachable fiber IDs.
> 
> Anyway, the solution below looks good too.

I squashed it into patch 1 and force pushed. Can I assume that I've got
your Ack?


More information about the Tarantool-patches mailing list