Skip to content

Commit 3797ea9

Browse files
JeffBezansonKristofferC
authored andcommitted
add some compatibility shims for internal functions changed in 1.4 (#34289)
(cherry picked from commit c33298d)
1 parent bd2ac09 commit 3797ea9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

base/methodshow.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ end
7373

7474
const empty_sym = Symbol("")
7575

76-
function kwarg_decl(m::Method)
76+
# NOTE: second argument is deprecated and is no longer used
77+
function kwarg_decl(m::Method, kwtype = nothing)
7778
mt = get_methodtable(m)
7879
if isdefined(mt, :kwsorter)
7980
kwtype = typeof(mt.kwsorter)

base/util.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ end
238238

239239
# total number of bytes allocated so far
240240
gc_bytes(b::Ref{Int64}) = ccall(:jl_gc_get_total_bytes, Cvoid, (Ptr{Int64},), b)
241+
# NOTE: gc_bytes() is deprecated
242+
function gc_bytes()
243+
b = Ref{Int64}()
244+
gc_bytes(b)
245+
b[]
246+
end
241247

242248
"""
243249
@allocated

0 commit comments

Comments
 (0)