git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [PATCH v2 0/3] C99: declare bool experiment a success

From
rsbecker@nexbridge.com <rsbecker@nexbridge.com>
Date
Jul 15, 2025, 20:47 UTC
Message-ID
<000501dbf5c9$af9598d0$0ec0ca70$@nexbridge.com>
In-Reply-To
<CABPp-BHjU2NFVoM+wkBxDrr3P85yYzmS-O4mBAc_e4_6wfOBMw@mail.gmail.com>
On July 15, 2025 3:35 PM, Elijah Newren wrote:
Show 40 quoted lines
>On Tue, Jul 15, 2025 at 11:23 AM <rsbecker@nexbridge.com> wrote:
>>
>> On July 15, 2025 1:19 PM Elijah Newren wrote:
>> >On Tue, Jul 15, 2025 at 6:53 AM Phillip Wood
>> ><phillip.wood123@gmail.com>
>> >wrote:
>> >>
>> >> From: Phillip Wood <phillip.wood@dunelm.org.uk>
>> >>
>> >> We've had a test balloon for C99's bool type since 8277dbe987
>> >> (git-compat-util: convert skip_{prefix,suffix}{,_mem} to bool,
>> >> 2023-12-16). As it has been over 18 months since this was added and
>> >> there have been no complaints let's declare it a success and
>> >> convert the return type our other string predicates to match.
>> >>
>[...]
>>
>> bool is not standard in all c99 implementations. I have to #include
>> <stdbool.h> in order to use this type. Please make sure there is a mechanism for
>that.
>
>>From the referenced commit in the commit message:
>
>$ git log --oneline -1 -p 8277dbe987 | head -n 13
>8277dbe9872 git-compat-util: convert skip_{prefix,suffix}{,_mem} to bool diff --git
>a/git-compat-util.h b/git-compat-util.h index 3e7a59b5ff1..603c97e3b3f 100644
>--- a/git-compat-util.h
>+++ b/git-compat-util.h
>@@ -225,6 +225,7 @@ struct strbuf;
> #include <stddef.h>
> #include <stdlib.h>
> #include <stdarg.h>
>+#include <stdbool.h>
> #include <string.h>
> #ifdef HAVE_STRINGS_H
> #include <strings.h> /* for strcasecmp() */
>
>
>So, there's not only a mechanism for that, it has already been done for you 1.5
>years ago.  No extra work on your or anyone else's part needed.  :-)
Many thanks.
Previous: Elijah NewrenNext: Junio C Hamano
Message 20 of 33 in “C99: declare bool experiment a success”
  1. 0/3 C99: declare bool experiment a successPhillip Wood, Jul 14, 2025
  2. 1/3 CodingGuildlines: allow the use of boolPhillip Wood, Jul 14, 2025
  3. Junio C HamanoJul 14, 2025
  4. 2/3 git-compat-util: convert string predicates to return boolPhillip Wood, Jul 14, 2025
  5. Eric SunshineJul 14, 2025
  6. Elijah NewrenJul 14, 2025
  7. brian m. carlsonJul 14, 2025
  8. Phillip WoodJul 15, 2025
  9. 3/3 strbuf: convert predicates to return boolPhillip Wood, Jul 14, 2025
  10. 0/3 C99: declare bool experiment a successPhillip Wood, Jul 15, 2025
  11. 1/3 CodingGuildlines: allow the use of boolPhillip Wood, Jul 15, 2025
  12. Jeff KingJul 16, 2025
  13. Jeff KingJul 16, 2025
  14. Elijah NewrenJul 16, 2025
  15. 2/3 git-compat-util: convert string predicates to return boolPhillip Wood, Jul 15, 2025
  16. 3/3 strbuf: convert predicates to return boolPhillip Wood, Jul 15, 2025
  17. Elijah NewrenJul 15, 2025
  18. rsbecker@nexbridge.comJul 15, 2025
  19. Elijah NewrenJul 15, 2025
  20. rsbecker@nexbridge.comJul 15, 2025
  21. Junio C HamanoJul 15, 2025
  22. Junio C HamanoJul 15, 2025
  23. brian m. carlsonJul 15, 2025
  24. Junio C HamanoJul 15, 2025
  25. 0/3 C99: declare bool experiment a successPhillip Wood, Jul 16, 2025
  26. 1/3 CodingGuidelines: allow the use of boolPhillip Wood, Jul 16, 2025
  27. 2/3 git-compat-util: convert string predicates to return boolPhillip Wood, Jul 16, 2025
  28. Karthik NayakJul 16, 2025
  29. 3/3 strbuf: convert predicates to return boolPhillip Wood, Jul 16, 2025
  30. Karthik NayakJul 16, 2025
  31. Karthik NayakJul 16, 2025
  32. Phillip WoodJul 17, 2025
  33. Karthik NayakJul 22, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.