Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

‎ctags/ctags_to_prototypes.go‎

Lines changed: 1 addition & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /