[vte] gtk: Allow passing null callback to spawn_async



commit fafaa6ff619fd05fc03244fa99619c67cf717e0d
Author: Christian Persch <chpe src gnome org>
Date:   Wed Sep 30 16:52:31 2020 +0200

    gtk: Allow passing null callback to spawn_async
    
    Fixes: https://gitlab.gnome.org/GNOME/vte/-/issues/286

 src/vtegtk.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/vtegtk.cc b/src/vtegtk.cc
index 483cb665..bba76988 100644
--- a/src/vtegtk.cc
+++ b/src/vtegtk.cc
@@ -3375,7 +3375,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
@@ -3447,7 +3447,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));
@@ -3491,7 +3490,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]