From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 4B3586EC5B; Thu, 13 May 2021 14:44:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4B3586EC5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1620906254; bh=boEAknLC5r0A+rdZUegE7ZC9g3rRn4sLY2q20O8V1A0=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=hRYFbDHrz2MtVTUPLaS466FD/rzudkCO5WSoQmJreQw2umnuT5uOgxEBCimfwP6+w AwyXN3gDbko1nqr8qQzxPbj1Ii4JrxLCvkSfBFVs9tbcL9KmPuP+78lMa6Lrswlq8d dgy195mScas6LG2YCbc+gkHIxLKp/BlWULW9dx88= Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id EECDB6EC5B for ; Thu, 13 May 2021 14:44:12 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EECDB6EC5B Received: by mail-lf1-f53.google.com with SMTP id h4so38172292lfv.0 for ; Thu, 13 May 2021 04:44:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UsXf4C9Ft6UleI1+wvjRMxkeyR3nal4hp7J0ZYHfKbc=; b=DwK3BlvK1yHXBSwkdUTpUm/Rll02YQ4secVnLtzVWHwYjp0IcoJ4oY82XBtByCBHeg tm26tIfOh22s/DZ5HwmuHbswtJc8Fosid2DD6po2DDZXesfyKgWiDAV1oUT6cRkWvPiT eNYg6OXONxty1USbLkWNHVeAH5geB+Y1UX5FqXzQR2+RJzuTz2KlEUgxFE6UDbve3WrA QzclSDTdqGvzzohRk3Sq/s9vbzuOz1UeYLNW1tkEMS+0kxd9cPVemZTPTrrCrEkn70aS iXtj8ucEN5X2GtVDCNewWW5no7ldoSV+5R1SfYzsWxlNaQwnhpPZDA30srt1ZQRHA4v9 dxKQ== X-Gm-Message-State: AOAM53233pvl0OLnmhIeEWXsCf839urdeayKL84GWXG01xileB/Ath/F LT9SSZRnObd8NV0OcWHjSM0zzeMVots= X-Google-Smtp-Source: ABdhPJzYl97dphPGuGZwzka1M1sEG1K2WgTfk8r28U9NO8D71ogOuUsoXSMSl5yTu+G9yzb5gwXzFQ== X-Received: by 2002:a19:ac4d:: with SMTP id r13mr26790143lfc.360.1620906251898; Thu, 13 May 2021 04:44:11 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id z12sm267363lfr.106.2021.05.13.04.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 04:44:10 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id C0ADB5A003D; Thu, 13 May 2021 14:44:09 +0300 (MSK) Date: Thu, 13 May 2021 14:44:09 +0300 To: Vladislav Shpilevoy Message-ID: References: <20210504155819.290874-1-gorcunov@gmail.com> <3917eb85-85e6-56d1-4176-7d6926587a49@tarantool.org> <8da1ce85-e510-9d27-95b1-b07c14dacf4a@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8da1ce85-e510-9d27-95b1-b07c14dacf4a@tarantool.org> User-Agent: Mutt/2.0.6 (2021-03-06) Subject: Re: [Tarantool-patches] [PATCH v3 00/10] fix say_x format and rework fibers X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: tml Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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?