Skip to content

Commit 2e7f5fc

Browse files
authored
Deprecate Memory(::ByteData) constructor (#219)
1 parent 2a7af65 commit 2e7f5fc

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

src/TranscodingStreams.jl

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ include("stream.jl")
1616
include("io.jl")
1717
include("noop.jl")
1818
include("transcode.jl")
19+
include("deprecated.jl")
1920

2021
function test_roundtrip_read end
2122
function test_roundtrip_write end

src/deprecated.jl

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Base.@deprecate Memory(data::ByteData) Memory(pointer(data), sizeof(data)) false

src/memory.jl

-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ struct Memory
1111
size::UInt
1212
end
1313

14-
# TODO remove this method
15-
function Memory(data::ByteData)
16-
return Memory(pointer(data), sizeof(data))
17-
end
18-
1914
@inline function Base.length(mem::Memory)
2015
return mem.size
2116
end

0 commit comments

Comments
 (0)