[gtk-doc] scan: restructure output code



commit eac6e4a231e6ac3e197ec4f1996c9a55f19b6a5e
Author: Stefan Sauer <ensonic users sf net>
Date:   Mon Nov 26 07:37:43 2018 +0100

    scan: restructure output code
    
    Put the file rename right after we wrote the file.

 gtkdoc/scan.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
index f7c22fd..8ecd859 100644
--- a/gtkdoc/scan.py
+++ b/gtkdoc/scan.py
@@ -77,10 +77,12 @@ def Run(options):
     with open(new_decl_list, 'w', encoding='utf-8') as f:
         for section in sorted(section_list.keys()):
             f.write(section_list[section])
+    common.UpdateFileIfChanged(old_decl_list, new_decl_list, True)
 
     with open(new_decl, 'w', encoding='utf-8') as f:
         for decl in decl_list:
             f.write(decl)
+    common.UpdateFileIfChanged(old_decl, new_decl, True)
 
     if options.rebuild_types:
         with open(new_types, 'w', encoding='utf-8') as f:
@@ -95,9 +97,6 @@ def Run(options):
         else:
             common.UpdateFileIfChanged(old_types, new_types, True)
 
-    common.UpdateFileIfChanged(old_decl_list, new_decl_list, True)
-    common.UpdateFileIfChanged(old_decl, new_decl, True)
-
     # If there is no MODULE-sections.txt file yet or we are asked to rebuild it,
     # we copy the MODULE-decl-list.txt file into its place. The user can tweak it
     # later if they want.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]