Make the script Python3 compatible
This commit is contained in:
parent
1588a67570
commit
af70c1dbcb
@ -70,6 +70,7 @@ r'''/* This file is generated automatically by genapi.py - do not edit. */
|
||||
|
||||
#ifndef GEANY_FUNCTIONS_H
|
||||
#define GEANY_FUNCTIONS_H
|
||||
|
||||
'''
|
||||
|
||||
if __name__ == "__main__":
|
||||
@ -80,15 +81,15 @@ if __name__ == "__main__":
|
||||
sys.exit("No function names read!")
|
||||
|
||||
f = open(outfile, 'w')
|
||||
print >> f, header % (outfile)
|
||||
f.write(header % (outfile))
|
||||
|
||||
for fname in fnames:
|
||||
ptr, name = get_api_tuple(fname)
|
||||
# note: name no longer needed
|
||||
print >> f, '#define %s \\\n\tgeany_functions->%s->%s' % (fname, ptr, fname)
|
||||
f.write('#define %s \\\n\tgeany_functions->%s->%s\n' % (fname, ptr, fname))
|
||||
|
||||
print >> f, '\n#endif'
|
||||
f.write('\n#endif\n')
|
||||
f.close()
|
||||
|
||||
if not '-q' in sys.argv:
|
||||
print 'Generated ' + outfile
|
||||
sys.stdout.write('Generated %s\n' % outfile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user