Re: [PATCH 08/67] add reentrant variants of sha1_to_hex and find_unique_abbrev
- From
Jeff King <peff@peff.net>
- Date
- Sep 16, 2015, 10:33 UTC
- Message-ID
- <20150916103350.GF13966@sigill.intra.peff.net>
- In-Reply-To
- <c62ef479c559cb040628fc4ede5b151b@dscho.org>
On Wed, Sep 16, 2015 at 10:15:02AM +0200, Johannes Schindelin wrote:
Show 7 quoted lines
> Maybe we should stick to the established practice of the many, many > reentrant POSIX functions following the *_r() naming convention? I.e. > the reentrant version of localtime() is called localtime_r(), the > reentrant version of random() is called random_r() etc. > > So I could see myself not needing an explanation if I had read > sha1_to_hex_r(...).
I like this suggestion. By itself, the "_r" does not communicate as much as "_to" to me, but as long as the reader knows the "_r" idiom, it communicates much more.
I'll switch to this unless there is any objection.
-Peff