Skip to content

Commit

Permalink
Deprecate Memory(::ByteData) constructor (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 authored Jun 24, 2024
1 parent 2a7af65 commit 2e7f5fc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/TranscodingStreams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include("stream.jl")
include("io.jl")
include("noop.jl")
include("transcode.jl")
include("deprecated.jl")

function test_roundtrip_read end
function test_roundtrip_write end
Expand Down
1 change: 1 addition & 0 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Base.@deprecate Memory(data::ByteData) Memory(pointer(data), sizeof(data)) false
5 changes: 0 additions & 5 deletions src/memory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ struct Memory
size::UInt
end

# TODO remove this method
function Memory(data::ByteData)
return Memory(pointer(data), sizeof(data))
end

@inline function Base.length(mem::Memory)
return mem.size
end
Expand Down

0 comments on commit 2e7f5fc

Please sign in to comment.