Skip to content

Commit 0f450fb

Browse files
committed
fix: exclude standard library functions from generated checked headers
1 parent 096461c commit 0f450fb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

ci/generate_checked_functions.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,27 @@ def generate_checked_headers(header_paths):
268268
for node in ast.ext
269269
if isinstance(node, c_ast.Decl) and isinstance(node.type, c_ast.FuncDecl)
270270
]
271+
# remove std headers functions
272+
functions = [
273+
f
274+
for f in functions
275+
if f.name
276+
not in (
277+
"__mempcpy",
278+
"__stpcpy",
279+
"memmem",
280+
"memmove",
281+
"mempcpy",
282+
"memset",
283+
"strcasestr",
284+
"strcat",
285+
"strchrnul",
286+
"strcmp",
287+
"strlcat",
288+
"strlcpy",
289+
"strlen",
290+
)
291+
]
271292
functions = sorted(functions, key=lambda f: f.name)
272293

273294
return_types = {

0 commit comments

Comments
 (0)