Skip to content

Commit

Permalink
add some compatibility shims for internal functions changed in 1.4 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored Jan 7, 2020
1 parent 37275c3 commit c33298d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/methodshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ end

const empty_sym = Symbol("")

function kwarg_decl(m::Method)
# NOTE: second argument is deprecated and is no longer used
function kwarg_decl(m::Method, kwtype = nothing)
mt = get_methodtable(m)
if isdefined(mt, :kwsorter)
kwtype = typeof(mt.kwsorter)
Expand Down
6 changes: 6 additions & 0 deletions base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ end

# total number of bytes allocated so far
gc_bytes(b::Ref{Int64}) = ccall(:jl_gc_get_total_bytes, Cvoid, (Ptr{Int64},), b)
# NOTE: gc_bytes() is deprecated
function gc_bytes()
b = Ref{Int64}()
gc_bytes(b)
b[]
end

"""
@allocated
Expand Down

0 comments on commit c33298d

Please sign in to comment.