Skip to content

Commit 4045aff

Browse files
committed
Allow multiple lookup sites in depwarn
1 parent ca3b06e commit 4045aff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

base/deprecated.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ function depwarn(msg, funcsym)
7373
nothing
7474
end
7575

76-
function firstcaller(bt::Array{Ptr{Void},1}, funcsym::Symbol)
76+
firstcaller(bt::Array{Ptr{Void},1}, funcsym::Symbol) = firstcaller(bt, (funcsym,))
77+
function firstcaller(bt::Array{Ptr{Void},1}, funcsyms)
7778
# Identify the calling line
7879
i = 1
7980
while i <= length(bt)
@@ -83,7 +84,7 @@ function firstcaller(bt::Array{Ptr{Void},1}, funcsym::Symbol)
8384
if lkup === StackTraces.UNKNOWN
8485
continue
8586
end
86-
if lkup.func == funcsym
87+
if lkup.func in funcsyms
8788
@goto found
8889
end
8990
end

0 commit comments

Comments
 (0)