Merge pull request #132 from Velaron/xshlib-fix

scripts/xshlib: line endings fix
This commit is contained in:
mittorn 2020-02-25 19:44:25 +07:00 committed by GitHub
commit 04c17995a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -80,10 +80,10 @@ def apply_static(main, *reloc):
out_node.write('%s\nstruct {const char *name;void *func;} libs[] = {\n%s\n{0,0}\n};\n' % (externs, table ))
def write_export_list(name,in_node, out_node):
def write_export_list(name, in_node, out_node):
"generate exports list for library"
exports = in_node.read().split('\n')
exports = in_node.read().splitlines()
externs = '\n'.join(['extern void %s(void);' % 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 ))