@@ -32,17 +32,17 @@ write(io::IO, b::TAMQPBodyPayload) = write(io, b.data)
32
32
33
33
function read (io:: IO , :: Type{TAMQPShortStr} )
34
34
len = ntoh (read (io, TAMQPOctet))
35
- TAMQPShortStr (len, read! (io, Vector {UInt8} (uninitialized , len)))
35
+ TAMQPShortStr (len, read! (io, Vector {UInt8} (undef , len)))
36
36
end
37
37
38
38
function read (io:: IO , :: Type{TAMQPLongStr} )
39
39
len = ntoh (read (io, TAMQPLongUInt))
40
- TAMQPLongStr (len, read! (io, Vector {UInt8} (uninitialized , len)))
40
+ TAMQPLongStr (len, read! (io, Vector {UInt8} (undef , len)))
41
41
end
42
42
43
43
function read (io:: IO , :: Type{TAMQPByteArray} )
44
44
len = ntoh (read (io, TAMQPLongUInt))
45
- TAMQPByteArray (len, read! (io, Vector {UInt8} (uninitialized , len)))
45
+ TAMQPByteArray (len, read! (io, Vector {UInt8} (undef , len)))
46
46
end
47
47
48
48
write (io:: IO , s:: T ) where {T<: Union{TAMQPShortStr,TAMQPLongStr,TAMQPByteArray} } = write (io, hton (s. len), s. data)
@@ -63,7 +63,7 @@ write(io::IO, fv::TAMQPFieldValuePair) = write(io, fv.name, fv.val)
63
63
function read (io:: IO , :: Type{TAMQPFieldTable} )
64
64
len = ntoh (read (io, fieldtype (TAMQPFieldTable, :len )))
65
65
@debug (" read fieldtable length $(len) " )
66
- buff = read! (io, Vector {UInt8} (uninitialized , len))
66
+ buff = read! (io, Vector {UInt8} (undef , len))
67
67
data = TAMQPFieldValuePair[]
68
68
iob = IOBuffer (buff)
69
69
while ! eof (iob)
@@ -102,7 +102,7 @@ function read(io::IO, ::Type{TAMQPGenericFrame})
102
102
@assert hdr in (1 ,2 ,3 ,8 )
103
103
props = read (io, fieldtype (TAMQPGenericFrame, :props ))
104
104
@debug (" reading generic frame type:$hdr , channel:$(props. channel) , payloadsize:$(props. payloadsize) " )
105
- payload = read! (io, TAMQPBodyPayload (Vector {TAMQPOctet} (uninitialized , props. payloadsize)))
105
+ payload = read! (io, TAMQPBodyPayload (Vector {TAMQPOctet} (undef , props. payloadsize)))
106
106
fend = ntoh (read (io, fieldtype (TAMQPGenericFrame, :fend )))
107
107
@assert fend == FrameEnd
108
108
TAMQPGenericFrame (hdr, props, payload, fend)
@@ -1177,7 +1177,7 @@ end
1177
1177
function on_channel_message_in (chan:: MessageChannel , m:: TAMQPContentHeaderFrame , ctx)
1178
1178
msg = chan. partial_msgs[1 ]
1179
1179
msg. properties = m. hdrpayload. proplist
1180
- msg. data = Vector {UInt8} (uninitialized , m. hdrpayload. bodysize)
1180
+ msg. data = Vector {UInt8} (undef , m. hdrpayload. bodysize)
1181
1181
msg. filled = 0
1182
1182
nothing
1183
1183
end
0 commit comments