[pygobject/wip/gio-async-awaitable-return: 37/38] fixup! async: Add a new async type that is an awaitable for a _finish call




commit f69e8ec0ad8903e8b8794a1ce1dc0ee66a26caa1
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Nov 17 10:20:13 2020 +0100

    fixup! async: Add a new async type that is an awaitable for a _finish call

 gi/pygi-async.c | 5 ++---
 gi/pygi-async.h | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gi/pygi-async.c b/gi/pygi-async.c
index 50fb9d95..f1c98602 100644
--- a/gi/pygi-async.c
+++ b/gi/pygi-async.c
@@ -403,16 +403,15 @@ pygi_async_finish_cb (GObject *source_object, gpointer res, PyGIAsync *self)
 
 /**
  * pygi_async_new:
- * @async_finish: A #GIFunctionInfo to wrap that is used to finish.
+ * @finish_func: A #GIFunctionInfo to wrap that is used to finish.
  *
  * Return a new async instance.
  *
  * Returns: An instance of gi.Async or %NULL on error.
  */
 PyObject *
-pygi_async_new(GIFunctionInfo *async_finish) {
+pygi_async_new(PyObject *finish_func) {
 
-    PyObject *finish_func = (PyObject*) _pygi_info_new ((GIBaseInfo *) async_finish);
     PyObject *res;
     PyObject *args;
 
diff --git a/gi/pygi-async.h b/gi/pygi-async.h
index 8702a8eb..b2bed218 100644
--- a/gi/pygi-async.h
+++ b/gi/pygi-async.h
@@ -54,6 +54,6 @@ void
 pygi_async_finish_cb (GObject *source_object, gpointer res, PyGIAsync *async);
 
 PyObject*
-pygi_async_new            (GIFunctionInfo *async_finish);
+pygi_async_new            (PyObject *async_finish);
 
 #endif /* __PYGI_ASYNCRESULT_H__ */


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