Re: [PATCH] Implement utf8 unit tests as a kunit test suite.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ricardo Cañuelo <ricardo.canuelo@xxxxxxxxxxxxx> writes:


> I don't think it's a good idea to have the version specifier hardcoded twice in
> the same file, one in string form (for utf8_load) and another one in integer
> form (for the rest of the functions that take the version as a parameter). I
> think it'd be a better option to use a macro to stringify the version number
> from the integer constants and avoid the snprintf entirely:
>
> #define str(s) #s
> #define VERSION_STR(maj, min, rev) str(maj) "." str(min) "." str(rev)
>
> ...
>
> table = utf8_load(VERSION_STR(latest_maj, latest_min, latest_rev));
>
>
> This way we can define the version constant only once, in integer form, and
> then the string form will be a constant generated at compile time. Are you ok
> with this?

fine with me.

Thanks,

-- 
Gabriel Krisman Bertazi



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux