Skip to content

Commit

Permalink
analysis: Check if is async based on finish-func
Browse files Browse the repository at this point in the history
  • Loading branch information
A6GibKm committed Jun 1, 2024
1 parent 049d209 commit f4162ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/analysis/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,10 @@ fn analyze_function(
) -> Info {
let ns_id = type_tid.map_or(MAIN_NAMESPACE, |t| t.ns_id);
let type_tid = type_tid.unwrap_or_default();
let r#async = func.parameters.iter().any(|parameter| {
parameter.scope == ParameterScope::Async && parameter.c_type == "GAsyncReadyCallback"
});
let r#async = func.finish_func.is_some()
|| func.parameters.iter().any(|parameter| {
parameter.scope == ParameterScope::Async && parameter.c_type == "GAsyncReadyCallback"
});
let has_callback_parameter = !r#async
&& func
.parameters
Expand Down

0 comments on commit f4162ce

Please sign in to comment.