[Pkg-libvirt-commits] [libguestfs] 13/54: generator: Sort most output.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 9 11:21:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch debian
in repository libguestfs.

commit 20e080d3a82ead736466a7a44eb341d5d7aba40f
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sat Feb 15 20:27:12 2014 +0000

    generator: Sort most output.
    
    Look for use of external_functions and fish_functions and replace with
    use of external_functions_sorted and fish_functions_sorted where
    possible.  This ensures that the output of the generator is sorted as
    far as possible.
    
    I also checked for uses of internal_functions and documented_functions
    but those are not used.  The *_sorted versions are always used
    instead.
    
    (cherry picked from commit 6cc521dc4533d10659214cc660f31239de9e28e7)
---
 generator/fish.ml    | 6 +++---
 generator/gobject.ml | 6 +++---
 generator/haskell.ml | 4 ++--
 generator/java.ml    | 4 ++--
 generator/main.ml    | 2 +-
 generator/perl.ml    | 2 +-
 generator/python.ml  | 6 +++---
 generator/ruby.ml    | 4 ++--
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/generator/fish.ml b/generator/fish.ml
index 477fb29..fb3d0f6 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -80,7 +80,7 @@ let generate_fish_cmds () =
     fun { name = name } ->
       pr "static int run_%s (const char *cmd, size_t argc, char *argv[]);\n"
         name
-  ) fish_functions;
+  ) fish_functions_sorted;
 
   pr "\n";
 
@@ -170,7 +170,7 @@ Guestfish will prompt for these separately."
       pr "  .run = run_%s\n" name;
       pr "};\n";
       pr "\n";
-  ) fish_functions;
+  ) fish_functions_sorted;
 
   (* list_commands function, which implements guestfish -h *)
   pr "void\n";
@@ -657,7 +657,7 @@ Guestfish will prompt for these separately."
       pr "  return ret;\n";
       pr "}\n";
       pr "\n"
-  ) fish_functions;
+  ) fish_functions_sorted;
 
   (* run_action function *)
   pr "int\n";
diff --git a/generator/gobject.ml b/generator/gobject.ml
index 8080cbf..499837a 100644
--- a/generator/gobject.ml
+++ b/generator/gobject.ml
@@ -116,7 +116,7 @@ let filenames =
       function
       | { style = _, _, (_::_) } -> true
       | { style = _, _, [] } -> false
-    ) external_functions
+    ) external_functions_sorted
   )
 
 let header_start filename =
@@ -706,7 +706,7 @@ gboolean guestfs_session_close (GuestfsSession *session, GError **err);
     fun ({ name = name; style = style } as f) ->
       generate_gobject_proto name style f;
       pr ";\n";
-  ) external_functions;
+  ) external_functions_sorted;
 
   header_end filename
 
@@ -1293,4 +1293,4 @@ guestfs_session_close (GuestfsSession *session, GError **err)
       );
 
       pr "}\n";
-  ) external_functions
+  ) external_functions_sorted
diff --git a/generator/haskell.ml b/generator/haskell.ml
index ca2a1ce..efffa1e 100644
--- a/generator/haskell.ml
+++ b/generator/haskell.ml
@@ -60,7 +60,7 @@ module Guestfs (
   List.iter (
     fun { name = name; style = style } ->
       if can_generate style then pr ",\n  %s" name
-  ) external_functions;
+  ) external_functions_sorted;
 
   pr "
   ) where
@@ -208,7 +208,7 @@ assocListOfHashtable (a:b:rest) = (a,b) : assocListOfHashtable rest
         );
         pr "\n";
       )
-  ) external_functions
+  ) external_functions_sorted
 
 and generate_haskell_prototype ~handle ?(hs = false) (ret, args, optargs) =
   pr "%s -> " handle;
diff --git a/generator/java.ml b/generator/java.ml
index 2e54483..2477e35 100644
--- a/generator/java.ml
+++ b/generator/java.ml
@@ -389,7 +389,7 @@ public class GuestFS {
       generate_java_prototype ~privat:true ~native:true f.name f.style;
       pr "\n";
       pr "\n";
-  ) external_functions;
+  ) external_functions_sorted;
 
   pr "}\n"
 
@@ -1114,7 +1114,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
 
       pr "}\n";
       pr "\n"
-  ) external_functions
+  ) external_functions_sorted
 
 and generate_java_struct_return typ jtyp cols =
   pr "  cl = (*env)->FindClass (env, \"com/redhat/et/libguestfs/%s\");\n" jtyp;
diff --git a/generator/main.ml b/generator/main.ml
index 2db5c48..a24fb45 100644
--- a/generator/main.ml
+++ b/generator/main.ml
@@ -194,7 +194,7 @@ Run it from the top source directory using the command
       output_to filename
         (generate_gobject_optargs_source short name optargs f)
     | { style = _, _, [] } -> ()
-  ) external_functions;
+  ) external_functions_sorted;
   delete_except_generated "gobject/include/guestfs-gobject/optargs-*.h";
   delete_except_generated "gobject/src/optargs-*.c";
 
diff --git a/generator/perl.ml b/generator/perl.ml
index 9d368a2..3da45fd 100644
--- a/generator/perl.ml
+++ b/generator/perl.ml
@@ -577,7 +577,7 @@ PREINIT:
       );
 
       pr "\n"
-  ) external_functions
+  ) external_functions_sorted
 
 and generate_perl_struct_list_code typ cols name style n =
   pr "      if (r == NULL)\n";
diff --git a/generator/python.ml b/generator/python.ml
index 607ca88..72bc8a0 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -518,7 +518,7 @@ put_table (char * const * const argv)
       pr "  return py_r;\n";
       pr "}\n";
       pr "\n"
-  ) external_functions;
+  ) external_functions_sorted;
 
   (* Table of functions. *)
   pr "static PyMethodDef methods[] = {\n";
@@ -534,7 +534,7 @@ put_table (char * const * const argv)
     fun { name = name } ->
       pr "  { (char *) \"%s\", py_guestfs_%s, METH_VARARGS, NULL },\n"
         name name
-  ) external_functions;
+  ) external_functions_sorted;
   pr "  { NULL, NULL, 0, NULL }\n";
   pr "};\n";
   pr "\n";
@@ -823,4 +823,4 @@ class GuestFS(object):
         fun alias ->
           pr "    %s = %s\n\n" alias f.name
       ) f.non_c_aliases
-  ) external_functions
+  ) external_functions_sorted
diff --git a/generator/ruby.ml b/generator/ruby.ml
index f2d700e..1111993 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -743,7 +743,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn)
 
       pr "}\n";
       pr "\n"
-  ) external_functions;
+  ) external_functions_sorted;
 
   pr "\
 extern void Init__guestfs (void); /* keep GCC warnings happy */
@@ -804,7 +804,7 @@ Init__guestfs (void)
           pr "  rb_define_method (c_guestfs, \"%s\",\n" alias;
           pr "        ruby_guestfs_%s, %d);\n" name nr_args
       ) non_c_aliases
-  ) external_functions;
+  ) external_functions_sorted;
 
   pr "}\n"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list