From 51b787e7805afe820a96838c8d4b5087f8b901c8 Mon Sep 17 00:00:00 2001 From: David Herberth Date: Mon, 18 Mar 2024 18:38:54 +0100 Subject: [PATCH] c: fixes include header replacement closes: #459 --- glad/generator/c/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glad/generator/c/__init__.py b/glad/generator/c/__init__.py index ef68b1e1..70f27f8d 100644 --- a/glad/generator/c/__init__.py +++ b/glad/generator/c/__init__.py @@ -502,8 +502,8 @@ def _replace_included_headers(self, feature_set, config): for pheader in self.ADDITIONAL_HEADERS: name = pheader.name.rsplit('/', 1)[-1] content = re.sub( - '^(#include\\s*["<]({}|{})[>"])'.format(name, pheader.name), r'/* \1 */', - content, + '^(#include\\s*["<]({}|{})(\\.h)?[>"])'.format(name, pheader.include), r'/* \1 */', + content, flags=re.MULTILINE )