glapi: simplify headers of generated files

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
This commit is contained in:
Marek Olšák
2025-03-08 23:05:58 -05:00
committed by Marge Bot
parent 168cf334e8
commit 4d643d06c8
2 changed files with 3 additions and 20 deletions
+2 -13
View File
@@ -577,13 +577,7 @@ class GLAPIPrinter(ABIPrinter):
pass
def _get_c_header(self):
header = """#ifndef _GLAPI_TMP_H_
#define _GLAPI_TMP_H_
#include "util/glheader.h"
#endif /* _GLAPI_TMP_H_ */"""
return header
return '#include "util/glheader.h"\n'
class SharedGLAPIPrinter(GLAPIPrinter):
"""Shared GLAPI API Printer"""
@@ -604,12 +598,7 @@ class SharedGLAPIPrinter(GLAPIPrinter):
ent.handcode = False
def _get_c_header(self):
header = """#ifndef _GLAPI_TMP_H_
#define _GLAPI_TMP_H_
#include "util/glheader.h"
#endif /* _GLAPI_TMP_H_ */"""
return header
return '#include "util/glheader.h"\n'
def parse_args():
printers = ['glapi', 'es1api', 'es2api', 'shared-glapi']
+1 -7
View File
@@ -52,13 +52,7 @@ def _main():
assert(all(functions[i] == allFunctions[i] for i in range(len(functions))))
assert(all(functions[i].slot == i for i in range(len(functions))))
print(r"""
/* This file is automatically generated by mapi_abi.py. Do not modify. */
#ifndef _GLAPI_TMP_H_
#define _GLAPI_TMP_H_
#endif /* _GLAPI_TMP_H_ */
""".lstrip("\n"))
print('/* This file is automatically generated by gen_gldispatch_mapi.py. Do not modify. */\n')
print(generate_defines(functions))
if target == "gldispatch":