|
67 | 67 | invalid(InvalidChar, buf, pos, Any) |
68 | 68 | end |
69 | 69 |
|
70 | | -@inline function read(::StringType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
| 70 | +function read(::StringType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
71 | 71 | if b != UInt8('"') |
72 | 72 | error = ExpectedOpeningQuoteChar |
73 | 73 | @goto invalid |
|
98 | 98 | invalid(error, buf, pos, T) |
99 | 99 | end |
100 | 100 |
|
101 | | -@inline function read(::BoolType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
| 101 | +function read(::BoolType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
102 | 102 | if pos + 3 <= len && |
103 | 103 | b == UInt8('t') && |
104 | 104 | buf[pos + 1] == UInt8('r') && |
|
117 | 117 | end |
118 | 118 | end |
119 | 119 |
|
120 | | -@inline function read(::NullType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
| 120 | +function read(::NullType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
121 | 121 | if pos + 3 <= len && |
122 | 122 | b == UInt8('n') && |
123 | 123 | buf[pos + 1] == UInt8('u') && |
|
129 | 129 | end |
130 | 130 | end |
131 | 131 |
|
132 | | -@inline function read(::NumberType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
| 132 | +function read(::NumberType, buf, pos, len, b, ::Type{T}; kw...) where {T} |
133 | 133 | x, code, pos = Parsers.typeparser(StructTypes.numbertype(T), buf, pos, len, b, Int16(0), Parsers.OPTIONS) |
134 | 134 | if code > 0 |
135 | 135 | return pos, construct(T, x; kw...) |
@@ -327,7 +327,7 @@ mutable struct MutableClosure{T, KW} |
327 | 327 | end |
328 | 328 |
|
329 | 329 | @inline function (f::MutableClosure)(i, nm, TT; kw...) |
330 | | - kw2 = merge(kw, f.kw) |
| 330 | + kw2 = merge(kw.data, f.kw) |
331 | 331 | pos_i, y_i = read(StructType(TT), f.buf, f.pos, f.len, f.b, TT; kw2...) |
332 | 332 | f.pos = pos_i |
333 | 333 | return y_i |
|
383 | 383 | @eof |
384 | 384 | b = getbyte(buf, pos) |
385 | 385 | @wh |
386 | | - c = MutableClosure(buf, pos, len, b, kw) |
| 386 | + c = MutableClosure(buf, pos, len, b, kw.data) |
387 | 387 | if StructTypes.applyfield!(c, x, key) |
388 | 388 | pos = c.pos |
389 | 389 | else |
|
0 commit comments