Skip to content

Commit

Permalink
cgen: support a -d no_bool option, for cgen compatibility with the …
Browse files Browse the repository at this point in the history
…C23 language standard (since `bool` is a builtin type and a keyword in it) (#21637)
  • Loading branch information
MaxwellGengYF authored Jun 4, 2024
1 parent cc92dbc commit 2250d60
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions vlib/v/gen/c/cheaders.v
Original file line number Diff line number Diff line change
Expand Up @@ -681,15 +681,17 @@ typedef u8 array_fixed_byte_300 [300];
typedef struct sync__Channel* chan;
#ifndef __cplusplus
#ifndef bool
#ifdef CUSTOM_DEFINE_4bytebool
typedef int bool;
#else
typedef u8 bool;
#ifndef CUSTOM_DEFINE_no_bool
#ifndef __cplusplus
#ifndef bool
#ifdef CUSTOM_DEFINE_4bytebool
typedef int bool;
#else
typedef u8 bool;
#endif
#define true 1
#define false 0
#endif
#define true 1
#define false 0
#endif
#endif
Expand Down

0 comments on commit 2250d60

Please sign in to comment.