[glib] Do not generate marshaller aliases in source files



commit bf0be21208800d7976b5a660287e1e487f8a57d3
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Nov 28 15:05:16 2017 +0000

    Do not generate marshaller aliases in source files
    
    When generating the body of the marshallers, we need to skip aliases to
    standard marshallers provided by GLib itself.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=790829

 gobject/glib-genmarshal.in |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
index 2560f9f..3656bf9 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -1034,19 +1034,20 @@ if __name__ == '__main__':
             elif args.body:
                 if args.verbose:
                     print_info('Generating definition for {}'.format(line.strip()))
-                if compatibility_mode:
-                    generate_std_alias = False
-                    if args.stdinc:
-                        std_marshaller = generate_marshaller_name(STD_PREFIX, retval, params)
-                        if std_marshaller in GOBJECT_MARSHALLERS:
-                            if args.verbose:
-                                print_info('Skipping default marshaller {}'.format(line.strip()))
-                            generate_std_alias = True
+                generate_std_alias = False
+                if args.stdinc:
+                    std_marshaller = generate_marshaller_name(STD_PREFIX, retval, params)
+                    if std_marshaller in GOBJECT_MARSHALLERS:
+                        if args.verbose:
+                            print_info('Skipping default marshaller {}'.format(line.strip()))
+                        generate_std_alias = True
                 marshaller = generate_marshaller_name(args.prefix, retval, params)
-                if compatibility_mode and generate_std_alias:
-                    generate_marshaller_alias(args.output, marshaller, std_marshaller,
-                                              source_location=location,
-                                              include_va=args.valist_marshallers)
+                if generate_std_alias:
+                    # We need to generate the alias if we are in compatibility mode
+                    if compatibility_mode:
+                        generate_marshaller_alias(args.output, marshaller, std_marshaller,
+                                                  source_location=location,
+                                                  include_va=args.valist_marshallers)
                 else:
                     generate_marshallers_body(args.output, retval, params,
                                               prefix=args.prefix,


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