summaryrefslogtreecommitdiffstats
path: root/src/mapi
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-12-09 21:11:54 +0000
committerEmil Velikov <[email protected]>2019-01-24 18:13:25 +0000
commit5b1bdce15684095702143f656681ceb91c82a48c (patch)
tree6e9fd1109def392ad4fc687364364216f1f30c3c /src/mapi
parent313f977224aa3608cc688ac11401e0b04b2236cc (diff)
mapi/new: split out public_entries handling
The only instance that requires the public_entries table is the dispatch library - split that into another function. We have to be careful with when undefining the guard, so split it out. We might want to merge this back in GLVND. Minor GLVND cleanup will be needed first. Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mapi')
-rwxr-xr-xsrc/mapi/new/gen_gldispatch_mapi.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mapi/new/gen_gldispatch_mapi.py b/src/mapi/new/gen_gldispatch_mapi.py
index be7b7495909..959d8798f5c 100755
--- a/src/mapi/new/gen_gldispatch_mapi.py
+++ b/src/mapi/new/gen_gldispatch_mapi.py
@@ -67,6 +67,8 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLe
print(generate_noop_array(functions))
print(generate_public_stubs(functions))
print(generate_public_entries(functions))
+ print(generate_public_entries_table(functions))
+ print(generate_undef_public_entries())
print(generate_stub_asm_gcc(functions))
def generate_defines(functions):
@@ -154,10 +156,20 @@ GLAPI {f.rt} APIENTRY {f.name}({f.decArgs})
""".lstrip("\n").format(f=func, retStr=retStr)
text += "\n"
+ text += "#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */\n"
+ return text
+
+def generate_public_entries_table(functions):
+ text = "#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN\n"
text += "static const mapi_func public_entries[] = {\n"
for func in functions:
text += " (mapi_func) %s,\n" % (func.name,)
text += "};\n"
+ text += "#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */\n"
+ return text
+
+def generate_undef_public_entries():
+ text = "#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN\n"
text += "#undef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN\n"
text += "#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */\n"
return text