File: 0001-Fix-use-of-bool-keyword-in-C23-fixes-199.patch

package info (click to toggle)
python-pyahocorasick 1.4.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 768 kB
  • sloc: ansic: 4,552; python: 2,823; sh: 312; makefile: 242
file content (37 lines) | stat: -rw-r--r-- 802 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 1d77ecbccb3f586c43958d426ffdcd8febfae403 Mon Sep 17 00:00:00 2001
From: Niklas Fiekas <niklas.fiekas@backscattering.de>
Date: Thu, 22 May 2025 19:43:30 +0200
Subject: Fix use of bool keyword in C23 (fixes #199)

Instead of custom typedef and defines, use stdbool.h which includes the
required feature testing.

Signed-off-by: Niklas Fiekas <niklas.fiekas@backscattering.de>
---
 common.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/common.h b/common.h
index 262ff29..61de3dc 100644
--- a/common.h
+++ b/common.h
@@ -16,6 +16,7 @@
 #include <structmember.h>   // PyMemberDef
 
 #include <iso646.h>
+#include <stdbool.h>
 
 #define DEBUG
 
@@ -90,8 +91,4 @@
 #   define F(name) name
 #endif
 
-typedef char    bool;
-#define true 1
-#define false 0
-
 #endif
-- 
2.30.2