mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
lib_static: use functions for exports instead of globals
This commit is contained in:
parent
3e3aff040e
commit
97228a4249
@ -84,7 +84,7 @@ def apply_static(main, *reloc):
|
|||||||
"generate exports list for library"
|
"generate exports list for library"
|
||||||
|
|
||||||
exports = in_node.read().split('\n')
|
exports = in_node.read().split('\n')
|
||||||
externs = '\n'.join(['extern void %s;' % e for e in exports])
|
externs = '\n'.join(['extern void %s();' % e for e in exports])
|
||||||
table = '\n'.join(['{ "%s", &%s },' % (e, e) for e in exports])
|
table = '\n'.join(['{ "%s", &%s },' % (e, e) for e in exports])
|
||||||
out_node.write('%s\nstruct {const char *name;void *func;} lib_%s_exports[] = {\n%s\n{0,0}\n};\n' % (externs, name, table ))
|
out_node.write('%s\nstruct {const char *name;void *func;} lib_%s_exports[] = {\n%s\n{0,0}\n};\n' % (externs, name, table ))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user