From f3fc2d5c416d857be2d30dea8a990b6991566810 Mon Sep 17 00:00:00 2001 From: Abdelrahman Said Date: Sat, 1 Mar 2025 22:43:16 +0000 Subject: [PATCH] Ensure includes are sorted local first --- codegen/datatypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/datatypes.py b/codegen/datatypes.py index 0ea0466..3569180 100644 --- a/codegen/datatypes.py +++ b/codegen/datatypes.py @@ -258,7 +258,7 @@ def get_datatype_string(_type: CDataType) -> str: def _get_includes_string(includes: list[CInclude]) -> str: output = "" - for include in includes: + for include in sorted(includes, key=lambda inc: inc.local, reverse=True): output += str(include) if len(output) > 0: output += "\n"