From: Jeff Hostetler <git@jeffhostetler.com>
To: "René Scharfe" <l.s.r@web.de>, git@vger.kernel.org
Cc: gitster@pobox.com, peff@peff.net,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH v8 1/2] json_writer: new routines to create data in JSON format
Date: Mon, 11 Jun 2018 06:40:33 -0400 [thread overview]
Message-ID: <293b890c-3d8f-a6b9-7f3c-f14e76ce7687@jeffhostetler.com> (raw)
In-Reply-To: <515709a2-3cfe-b147-6176-ff95455e1692@web.de>
On 6/8/2018 4:32 PM, René Scharfe wrote:
> Am 07.06.2018 um 16:12 schrieb git@jeffhostetler.com:
>> Makefile | 2 +
>> json-writer.c | 419 ++++++++++++++++++++++++++++++++
>> json-writer.h | 113 +++++++++
>> t/helper/test-json-writer.c | 572 ++++++++++++++++++++++++++++++++++++++++++++
>> t/t0019-json-writer.sh | 236 ++++++++++++++++++
>> 5 files changed, 1342 insertions(+)
>> create mode 100644 json-writer.c
>> create mode 100644 json-writer.h
>> create mode 100644 t/helper/test-json-writer.c
>> create mode 100755 t/t0019-json-writer.sh
>
> $ git grep 'static inline' '*json*'
> json-writer.c:static inline void indent_pretty(struct json_writer *jw)
> json-writer.c:static inline void begin(struct json_writer *jw, char ch_open, int pretty)
> json-writer.c:static inline void assert_in_object(const struct json_writer *jw, const char *key)
> json-writer.c:static inline void assert_in_array(const struct json_writer *jw)
> json-writer.c:static inline void maybe_add_comma(struct json_writer *jw)
> json-writer.c:static inline void fmt_double(struct json_writer *jw, int precision,
> json-writer.c:static inline void object_common(struct json_writer *jw, const char *key)
> json-writer.c:static inline void array_common(struct json_writer *jw)
> json-writer.c:static inline void assert_is_terminated(const struct json_writer *jw)
> t/helper/test-json-writer.c:static inline int scripted(int argc, const char **argv)
> t/helper/test-json-writer.c:static inline int my_usage(void)
>
> Do you need all those inline keywords? I'd rather leave the decision
> about inlining to the compiler and (via optimization flags) the user
> as much as possible. Not a biggie, but the high frequency of that
> word made me blink..
>
> René
>
I was just trying to match the patterns I found elsewhere in the code.
$ grep "static inline" *.c builtin/*.c | wc -l
111
But yeah, it's no big deal. I can remove them.
Jeff
next prev parent reply other threads:[~2018-06-11 10:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-07 14:12 [PATCH v8 0/2] json-writer V8 git
2018-06-07 14:12 ` [PATCH v8 1/2] json_writer: new routines to create data in JSON format git
2018-06-07 17:24 ` Eric Sunshine
2018-06-08 20:17 ` Jeff Hostetler
2018-06-08 6:05 ` René Scharfe
2018-06-11 11:43 ` Jeff Hostetler
2018-06-08 20:07 ` René Scharfe
2018-06-11 11:51 ` Jeff Hostetler
2018-06-08 20:32 ` René Scharfe
2018-06-11 10:40 ` Jeff Hostetler [this message]
2018-06-07 14:12 ` [PATCH v8 2/2] json-writer: t0019: add perl unit test git
2018-06-07 17:13 ` Eric Sunshine
2018-06-11 12:16 ` Jeff Hostetler
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=293b890c-3d8f-a6b9-7f3c-f14e76ce7687@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=l.s.r@web.de \
--cc=peff@peff.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).