Skip to content

Instantly share code, notes, and snippets.

@maliubiao
Created October 21, 2013 13:02
Show Gist options
  • Select an option

  • Save maliubiao/7083509 to your computer and use it in GitHub Desktop.

Select an option

Save maliubiao/7083509 to your computer and use it in GitHub Desktop.
remove the prefix of a c++ global symbol .
if __name__ == "__main__":
import sys
if len(sys.argv) < 1:
print "error"
exit()
f = open(sys.argv[1], "r")
src = f.readlines()
dst = []
for line in src:
dst.append(line.replace("_GLOBAL__sub_I_", ""))
f.close()
f = open(sys.argv[1], "w")
for line in dst:
f.write(line)
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment