From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: "Ricardo Cañuelo" <ricardo.canuelo@collabora.com>
Cc: linux-fsdevel@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH] Implement utf8 unit tests as a kunit test suite.
Date: Thu, 16 Apr 2020 10:17:54 -0400 [thread overview]
Message-ID: <855zdz5xbh.fsf@collabora.com> (raw)
In-Reply-To: <20200416075146.zo5bcx5eoatbdgvx@rcn-XPS-13-9360> ("Ricardo Cañuelo"'s message of "Thu, 16 Apr 2020 09:51:46 +0200")
Ricardo Cañuelo <ricardo.canuelo@collabora.com> 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
prev parent reply other threads:[~2020-04-16 14:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 8:28 [PATCH] Implement utf8 unit tests as a kunit test suite Ricardo Cañuelo
2020-04-15 16:19 ` Randy Dunlap
2020-04-15 18:40 ` Gabriel Krisman Bertazi
2020-04-16 7:51 ` Ricardo Cañuelo
2020-04-16 14:17 ` Gabriel Krisman Bertazi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=855zdz5xbh.fsf@collabora.com \
--to=krisman@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ricardo.canuelo@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.