Skip to content

Commit f9147bf

Browse files
committed
Update with clang-format off.
1 parent 81106b6 commit f9147bf

File tree

3 files changed

+201
-317
lines changed

3 files changed

+201
-317
lines changed

analytics/generate_windows_stubs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def generate_function_pointers(header_file_path, output_h_path, output_c_path):
129129
f.write('extern "C" {\n')
130130
f.write("#endif\n\n")
131131
f.write("// --- Function Pointer Declarations ---\n")
132+
f.write("// clang-format off\n")
132133
f.write("\n".join(extern_declarations))
134+
f.write("\n// clang-format on\n")
133135
f.write("\n\n// --- Dynamic Loader Declaration for Windows ---\n")
134136
f.write("#if defined(_WIN32)\n")
135137
f.write('#include <windows.h> // For HMODULE\n')
@@ -151,7 +153,8 @@ def generate_function_pointers(header_file_path, output_h_path, output_c_path):
151153
f.write(f"{COPYRIGHT_NOTICE}")
152154
f.write(f"// Generated from {os.path.basename(header_file_path)} by {os.path.basename(sys.argv[0])}\n\n")
153155
f.write(f'#include "{INCLUDE_PREFIX}{os.path.basename(output_h_path)}"\n')
154-
f.write('#include <stddef.h> // For NULL\n\n')
156+
f.write('#include <stddef.h>\n\n')
157+
f.write("// clang-format off\n\n")
155158
f.write("// --- Stub Function Definitions ---\n")
156159
f.write("\n\n".join(stub_functions))
157160
f.write("\n\n\n// --- Function Pointer Initializations ---\n")
@@ -183,6 +186,7 @@ def generate_function_pointers(header_file_path, output_h_path, output_c_path):
183186
loader_lines.append('}\n')
184187
loader_lines.append('#endif // defined(_WIN32)\n')
185188
f.write('\n'.join(loader_lines))
189+
f.write("// clang-format on\n")
186190

187191
print(f"Successfully generated C source file: {output_c_path}")
188192

0 commit comments

Comments
 (0)