On Sun, 2018-02-11 at 19:41 +0000, philip chimento gmail com wrote:
So, the example would become /** * foo_bar_decide_async: (finish-func foo_bar_decide_finish) (sync- func foo_bar_decide): * @self: a #FooBar * @blah: a #FooBlah * @cancellable: (nullable): a #GCancellable * @callback: a #GAsyncResultCallback * @data: data to pass to @callback ... with the understanding that in this example, both annotations would actually be unnecessary since they would be correctly picked up by the heuristics.
π
For completeness, how about an (async-func) annotation on the sync function? Maybe that should only be an attribute in the GIR, not an annotation, since it can be determined automatically from the sync- func annotation/heuristic?
I think (async-func) should definitely be an attribute in the GIR, but I canβt immediately see a need for it in the annotation syntax. As you say, it should be possible to determine it automatically from the other direction.
Note that linking from the finish-func back to the original async function isn't possible, since g_file_replace_contents_finish() is the finish-func for two async operations.
π Philip 4
Attachment:
signature.asc
Description: This is a digitally signed message part