mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Merge branch 'no-more-automatic-GUnixFDList' into 'master'
Revert "gdbus-codegen: emit GUnixFDLists if an arg has type 'h'" See merge request GNOME/glib!1171
This commit is contained in:
commit
9b8ff414c1
@ -284,14 +284,10 @@ class Method:
|
||||
for a in self.in_args:
|
||||
a.post_process(interface_prefix, cns, cns_upper, cns_lower, arg_count)
|
||||
arg_count += 1
|
||||
if 'h' in a.signature:
|
||||
self.unix_fd = True
|
||||
|
||||
for a in self.out_args:
|
||||
a.post_process(interface_prefix, cns, cns_upper, cns_lower, arg_count)
|
||||
arg_count += 1
|
||||
if 'h' in a.signature:
|
||||
self.unix_fd = True
|
||||
|
||||
if utils.lookup_annotation(self.annotations, 'org.freedesktop.DBus.Deprecated') == 'true':
|
||||
self.deprecated = True
|
||||
|
@ -2602,27 +2602,24 @@ handle_hello_fd (FooiGenFDPassing *object,
|
||||
static gboolean
|
||||
handle_no_annotation (FooiGenFDPassing *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
GUnixFDList *fd_list,
|
||||
GVariant *arg_greeting,
|
||||
const gchar *arg_greeting_locale)
|
||||
{
|
||||
foo_igen_fdpassing_complete_no_annotation (object, invocation, fd_list, arg_greeting, arg_greeting_locale);
|
||||
foo_igen_fdpassing_complete_no_annotation (object, invocation, arg_greeting, arg_greeting_locale);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
handle_no_annotation_nested (FooiGenFDPassing *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
GUnixFDList *fd_list,
|
||||
GVariant *arg_files)
|
||||
{
|
||||
foo_igen_fdpassing_complete_no_annotation_nested (object, invocation, fd_list);
|
||||
foo_igen_fdpassing_complete_no_annotation_nested (object, invocation);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Test that generated code for methods includes GUnixFDList arguments if:
|
||||
* - the method is explicitly annotated as C.UnixFD; or
|
||||
* - the method signature contains the type 'h'
|
||||
/* Test that generated code for methods includes GUnixFDList arguments if and
|
||||
* only if the method is explicitly annotated as C.UnixFD.
|
||||
*/
|
||||
static void
|
||||
test_unix_fd_list (void)
|
||||
@ -2633,8 +2630,9 @@ test_unix_fd_list (void)
|
||||
|
||||
/* This method is explicitly annotated. */
|
||||
iface.handle_hello_fd = handle_hello_fd;
|
||||
/* This one is not, but it's got an in and out 'h' parameter so should
|
||||
* automatically grow GUnixFDList arguments.
|
||||
|
||||
/* This one is not annotated; even though it's got an in and out 'h' parameter, for
|
||||
* backwards compatibility we cannot emit GUnixFDList arguments.
|
||||
*/
|
||||
iface.handle_no_annotation = handle_no_annotation;
|
||||
/* This method has an 'h' inside a complex type. */
|
||||
|
Loading…
Reference in New Issue
Block a user