diff options
-rwxr-xr-x | gstdoc-scangobj | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gstdoc-scangobj b/gstdoc-scangobj index cc1e294..3b669f0 100755 --- a/gstdoc-scangobj +++ b/gstdoc-scangobj @@ -1023,6 +1023,12 @@ output_object_hierarchy (void) fclose (fp); } +static int +type_cmp (const void * p1, const void * p2) +{ + return strcmp (g_type_name (*((GType *) p1)), g_type_name (*((GType *) p2))); +} + /* This is called recursively to output the hierarchy of a widget. */ static void output_hierarchy (FILE *fp, @@ -1054,6 +1060,8 @@ output_hierarchy (FILE *fp, children = g_type_children (type, &n_children); + qsort (&children[0], n_children, sizeof (GType), type_cmp); + for (i=0; i < n_children; i++) { output_hierarchy (fp, children[i], level + 1); } |