Re: [RFC PATCH v5 0/8] rebase-interactive
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 26, 2018, 17:57 UTC
- Message-ID
- <xmqqh8p2d8jh.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <9ca76d31-828d-0b6f-5069-375792c1f55d@jeffhostetler.com>
Jeff Hostetler <git@jeffhostetler.com> writes:
> I defined that routine to take a uint64_t because I wanted to > pass a nanosecond value received from getnanotime() and that's > what it returns.
Hmph, but the target format does not have different representation of inttypes in different sizes, no?
I personally doubt that we would benefit from having a group of functions (i.e. format_int{8,16,32,64}_to_json()) that callers have to choose from, depending on the exact size of the integer they want to serialize. The de-serializing side would be the same story.
Even if the variable a potential caller of the formetter is a sized type that is different from uintmax_t, the caller shouldn't have to add an extra cast.
Am I missing some obvious merit for having these separate functions for explicit sizes?