Skip to content

Commit 491a067

Browse files
committed
Use simpler way to find if an occurrence is a callback
1 parent 2e35aa9 commit 491a067

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: ctags/ctags_to_prototypes.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ func functionNameUsedAsFunctionPointerIn(tag *types.CTag, functionTags []*types.
7272
if tag.Line != functionTag.Line && strings.Index(tag.Code, "&"+functionTag.FunctionName) != -1 {
7373
return true
7474
}
75-
if tag.Line != functionTag.Line && strings.Index(tag.Code, functionTag.FunctionName) != -1 &&
76-
(functionTag.Signature == "(void)" || functionTag.Signature == "()") {
75+
if tag.Line != functionTag.Line && strings.Index(strings.TrimSpace(tag.Code), "("+functionTag.FunctionName+")") != -1 {
7776
return true
7877
}
7978
}

0 commit comments

Comments
 (0)