[vte/vte-0-62] gtk: Allow passing null callback to spawn_async
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-0-62] gtk: Allow passing null callback to spawn_async
- Date: Wed, 30 Sep 2020 14:53:16 +0000 (UTC)
commit d9ba092c741beb8c54fbc8bfd8e08c42b9ec62ea
Author: Christian Persch <chpe src gnome org>
Date: Wed Sep 30 16:53:02 2020 +0200
gtk: Allow passing null callback to spawn_async
Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/286
(cherry picked from commit fafaa6ff619fd05fc03244fa99619c67cf717e0d)
src/vtegtk.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index a0f7cf81..dcc9d612 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -3346,7 +3346,7 @@ spawn_async_cb(GObject *source,
* @child_setup_data_destroy: (destroy child_setup_data): a #GDestroyNotify for @child_setup_data, or %NULL
* @timeout: a timeout value in ms, -1 for the default timeout, or G_MAXINT to wait indefinitely
* @cancellable: (allow-none): a #GCancellable, or %NULL
- * @callback: (scope async): a #VteTerminalSpawnAsyncCallback, or %NULL
+ * @callback: (nullable) (scope async): a #VteTerminalSpawnAsyncCallback, or %NULL
* @user_data: (closure callback): user data for @callback, or %NULL
*
* A convenience function that wraps creating the #VtePty and spawning
@@ -3418,7 +3418,6 @@ try
{
g_return_if_fail(VTE_IS_TERMINAL(terminal));
g_return_if_fail(cancellable == nullptr || G_IS_CANCELLABLE (cancellable));
- g_return_if_fail(callback);
auto error = vte::glib::Error{};
auto pty = vte::glib::take_ref(vte_terminal_pty_new_sync(terminal, pty_flags, cancellable, error));
@@ -3462,7 +3461,7 @@ catch (...)
* @child_setup_data_destroy: (destroy child_setup_data): a #GDestroyNotify for @child_setup_data, or %NULL
* @timeout: a timeout value in ms, -1 for the default timeout, or G_MAXINT to wait indefinitely
* @cancellable: (allow-none): a #GCancellable, or %NULL
- * @callback: (scope async): a #VteTerminalSpawnAsyncCallback, or %NULL
+ * @callback: (nullable) (scope async): a #VteTerminalSpawnAsyncCallback, or %NULL
* @user_data: (closure callback): user data for @callback, or %NULL
*
* A convenience function that wraps creating the #VtePty and spawning
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]