[Git][NTPsec/ntpsec][util-pep263] Fixed error in encoding definition location

Ian Bruene gitlab at mg.gitlab.com
Wed May 3 01:37:14 UTC 2017


Ian Bruene pushed to branch util-pep263 at NTPsec / ntpsec


Commits:
a1bad61a by Ian Bruene at 2017-05-02T20:36:34-05:00
Fixed error in encoding definition location

- - - - -


1 changed file:

- wafhelpers/pythonize-header


Changes:

=====================================
wafhelpers/pythonize-header
=====================================
--- a/wafhelpers/pythonize-header
+++ b/wafhelpers/pythonize-header
@@ -36,7 +36,6 @@ impossibles = ("sizeof", "offsetof")
 
 def pythonize(rfp, wfp):
     "Pythonize a specified C header file."
-    wfp.write("# -*- coding: utf-8 -*-\n")
     wfp.write("# This file was generated by pythonize-header;\n")
     wfp.write("# DO NOT HAND-HACK IT!\n")
     skipto = False
@@ -84,6 +83,7 @@ if __name__ == '__main__':
     else:
         for path in sys.argv[1:]:
             with open(path) as rfp:
+                sys.stdout.write("# -*- coding: utf-8 -*-\n")
                 sys.stdout.write("#\n# Definitions from %s begin\n#\n" % path)
                 pythonize(rfp, sys.stdout)
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a1bad61a2569097db4bb7af01c7d7531542e2ab3

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/a1bad61a2569097db4bb7af01c7d7531542e2ab3
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170503/0a3905ec/attachment.html>


More information about the vc mailing list