[Tarantool-patches] [PATCH 2/4] uuid: expose additional from_string constructors

Serge Petrenko sergepetrenko at tarantool.org
Fri Apr 10 02:46:33 MSK 2020


Hi! Thanks for the review!


> 6 апр. 2020 г., в 00:22, Vladislav Shpilevoy <v.shpilevoy at tarantool.org> написал(а):
> 
> Thanks for the patch!
> 
>> 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
>> 
>> +extern inline int
> 
> 'inline' modifier won't change anything. The function body is
> not visible anyway.

Not sure about that.
What about other functions?

```
extern inline int                                                                   
tt_uuid_from_string(const char *in, struct tt_uuid *uu);
```

I’m still not sure what ‘extern inline’ does, but I googled a stackoverflow
question discussing it:
https://stackoverflow.com/questions/216510/what-does-extern-inline-do

> 
>> +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);
>> 
> 
> 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’t need
the from string constructors anymore.

--
Serge Petrenko
sergepetrenko at tarantool.org




More information about the Tarantool-patches mailing list