From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A04004696C3 for ; Fri, 10 Apr 2020 02:46:33 +0300 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) From: Serge Petrenko In-Reply-To: Date: Fri, 10 Apr 2020 02:46:33 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <61D44098-8826-479E-A7F9-E1122410A057@tarantool.org> References: <9042734e4ddc49d2e8903b346b84d699d1e2c46b.1585954493.git.sergepetrenko@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2/4] uuid: expose additional from_string constructors List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the review! > 6 =D0=B0=D0=BF=D1=80. 2020 =D0=B3., =D0=B2 00:22, Vladislav Shpilevoy = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0= =B0): >=20 > Thanks for the patch! >=20 >> diff --git a/src/lib/uuid/tt_uuid.c b/src/lib/uuid/tt_uuid.c >> index 1bd2e2cfe..94a0b15bb 100644 >> --- a/src/lib/uuid/tt_uuid.c >> +++ b/src/lib/uuid/tt_uuid.c >> @@ -65,6 +65,15 @@ tt_uuid_create(struct tt_uuid *uu) >> } >> #endif >>=20 >> +extern inline int >=20 > 'inline' modifier won't change anything. The function body is > not visible anyway. Not sure about that. What about other functions? ``` extern inline int = =20 tt_uuid_from_string(const char *in, struct tt_uuid *uu); ``` I=E2=80=99m still not sure what =E2=80=98extern inline=E2=80=99 does, = but I googled a stackoverflow question discussing it: https://stackoverflow.com/questions/216510/what-does-extern-inline-do >=20 >> +tt_uuid >> _validate(struct tt_uuid *uu); >> + >> +extern inline int >> +tt_uuid_from_fmt_string(const char *in, struct tt_uuid *uu, const = char *fmt); >> + >> +extern inline int >> +tt_uuid_from_lstring(const char *in, uint32_t len, struct tt_uuid = *uu); >> + >> extern inline int >> tt_uuid_from_string(const char *in, struct tt_uuid *uu); >>=20 >=20 > There are unit tests for uuid in unit/uuid.c. You may need to > add tests for the new functions. I removed all the excess tt_uuid_from_* helpers in the new version after = discussing the patch with Mons. He is okay with allowing only cdata in indices, so = I don=E2=80=99t need the from string constructors anymore. -- Serge Petrenko sergepetrenko@tarantool.org