feat(script/gen_constants_cpp.py): support for provifing custom C name
This commit is contained in:
parent
79a8d9aa65
commit
d78ad40aaf
1 changed files with 5 additions and 1 deletions
|
|
@ -47,7 +47,11 @@ def main(argv=None):
|
|||
constants = []
|
||||
with open(infile, 'r') as f:
|
||||
for line in f:
|
||||
constants.append([to_c_const(line.strip()), line.strip()])
|
||||
p = line.split()
|
||||
if len(p) == 2:
|
||||
constants.append([p[1].strip(), p[0].strip()])
|
||||
else:
|
||||
constants.append([to_c_const(line.strip()), line.strip()])
|
||||
|
||||
basedir, name = os.path.split(infile)
|
||||
os.chdir(basedir)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue