Skip to content

Commit 5115900

Browse files
committed
Add some helper conversions
1 parent 3324adb commit 5115900

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/convert.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ as_fval(v::String) = convert(TAMQPFieldValue{TAMQPLongStr}, convert(TAMQPLongStr
1212

1313
convert(::Type{Any}, t::TAMQPFieldTable) = convert(Dict{Any,Any}, t)
1414
convert(::Type{Dict{K,V}}, t::TAMQPFieldTable) where {K, V} = Dict{K,V}(f.name => f.val for f in t.data)
15+
convert(::Type{Dict{String, String}}, t::TAMQPFieldTable) = Dict{String, String}(String(f.name.data) => String(f.val.fld.data) for f in t.data)
1516
function convert(::Type{TAMQPFieldTable}, d::Dict{String,Any})
1617
data = TAMQPFieldValuePair[]
1718
for (n,v) in d

src/types.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ end
4545

4646
struct TAMQPShortStr <: TAMQPLengthPrefixed
4747
len::TAMQPOctet
48-
data::Vector{Int8}
48+
data::Vector{UInt8}
4949
end
5050

5151
struct TAMQPLongStr <: TAMQPLengthPrefixed

0 commit comments

Comments
 (0)