From dc09727a95aa78b6583d8ebcca5e76b98a29f441 Mon Sep 17 00:00:00 2001 From: linker99 Date: Wed, 1 Nov 2023 05:17:26 +0800 Subject: [PATCH] service-proxy: Fix introspection annotation --- gupnp.spec | 6 +- ...e-proxy-Fix-introspection-annotation.patch | 56 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 service-proxy-Fix-introspection-annotation.patch diff --git a/gupnp.spec b/gupnp.spec index db5eeed..8471bef 100644 --- a/gupnp.spec +++ b/gupnp.spec @@ -1,6 +1,6 @@ Name: gupnp Version: 1.2.4 -Release: 6 +Release: 7 Summary: UPnP devices & control points creation framework License: LGPLv2+ URL: http://www.gupnp.org/ @@ -11,6 +11,7 @@ Patch2: linux-cm-Fds-can-be-0.patch Patch3: service-action-Protect-against-unsent-message-use.patch Patch4: service-action-Do-not-leak-message-if-never-sent.patch Patch5: context-Small-code-cleanup.patch +Patch6: service-proxy-Fix-introspection-annotation.patch BuildRequires: gssdp-devel >= 1.2.3 gtk-doc gobject-introspection-devel >= 1.36 BuildRequires: libsoup-devel libxml2-devel libuuid-devel vala meson @@ -79,6 +80,9 @@ This package contains help file and developer documentation for gupnp. %{_mandir}/man1/gupnp-binding-tool-* %changelog +* Mon Dec 11 2023 fandehui - 1.2.4-7 +- service-proxy: Fix introspection annotation + * Thu Nov 23 2023 fandehui - 1.2.4-6 - context: Small code cleanup diff --git a/service-proxy-Fix-introspection-annotation.patch b/service-proxy-Fix-introspection-annotation.patch new file mode 100644 index 0000000..15fed6b --- /dev/null +++ b/service-proxy-Fix-introspection-annotation.patch @@ -0,0 +1,56 @@ +From 0cedf004b4730da8d8533ae6a38efa97553430f1 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Thu, 20 May 2021 12:28:51 +0200 +Subject: [PATCH] service-proxy: Fix introspection annotation + +call_action will not add a reference to action but just pass it through +so it is really transfer none + +call_action_finish does not add a reference to the returned action, so +it is also transfer none for the return value +--- + libgupnp/gupnp-service-proxy.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c +index 56bb438..6e09456 100644 +--- a/libgupnp/gupnp-service-proxy.c ++++ b/libgupnp/gupnp-service-proxy.c +@@ -2066,7 +2066,7 @@ gupnp_service_proxy_get_subscribed (GUPnPServiceProxy *proxy) + /** + * gupnp_service_proxy_call_action_async: + * @proxy: (transfer none): A #GUPnPServiceProxy +- * @action: An action ++ * @action: (transfer none): A #GUPnPServiceProxyAction to call + * @cancellable: (allow-none): A #GCancellable which can be used to cancel the + * current action call + * @callback: (scope async): A #GAsyncReadyCallback to call when the action is +@@ -2115,7 +2115,7 @@ gupnp_service_proxy_call_action_async (GUPnPServiceProxy *proxy, + * Finish an asynchronous call initiated with + * gupnp_service_proxy_call_action_async(). + * +- * Returns: %NULL, if the call had an error, the action otherwise. ++ * Returns: (nullable) (transfer none): %NULL, if the call had an error, the action otherwise. + */ + GUPnPServiceProxyAction * + gupnp_service_proxy_call_action_finish (GUPnPServiceProxy *proxy, +@@ -2130,14 +2130,14 @@ gupnp_service_proxy_call_action_finish (GUPnPServiceProxy *proxy, + /** + * gupnp_service_proxy_call_action: + * @proxy: (transfer none): A #GUPnPServiceProxy +- * @action: An action ++ * @action: (transfer none): An action + * @cancellable: (allow-none): A #GCancellable which can be used to cancel the + * current action call + * @error: (allow-none): Return location for a #GError, or %NULL. + * + * Synchronously call the @action on the remote UPnP service. + * +- * Returns: %NULL on error, @action if successful. ++ * Returns: (nullable)(transfer none): %NULL on error, @action if successful. + */ + GUPnPServiceProxyAction * + gupnp_service_proxy_call_action (GUPnPServiceProxy *proxy, +-- +2.27.0 +