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:
+2
-13
@@ -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']
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user