Skip to content

Commit ae02851

Browse files
committed
Add numItems parameter to printCborStream helper: no sink overload.
1 parent f780559 commit ae02851

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ os:
77
language: d
88

99
d:
10-
- dmd-2.071.0
10+
- dmd-2.071.2
1111
- dmd-2.070.2
1212
- dmd-2.069.2
1313
- dmd-2.068.2
@@ -17,7 +17,7 @@ d:
1717

1818
matrix:
1919
allow_failures:
20-
- ldc-1.0.0
20+
- d: ldc-1.0.0
2121

2222
env:
2323
matrix:

cbor.d

+3-3
Original file line numberDiff line numberDiff line change
@@ -1229,15 +1229,15 @@ private float halfToFloat(ushort half) @nogc
12291229
( half & 0x8000 ) << 16 // sign << ( 31 - 15 )
12301230
| ( exp | mant ) << 13 ) // value << ( 23 - 10 )
12311231
};
1232-
return f.f;
1232+
return f.f;
12331233
}
12341234

12351235
/// Outputs textual representation of cbor stream into sink or stdout if not provided.
1236-
void printCborStream(string singleIndent=" ", R)(auto ref R input)
1236+
void printCborStream(string singleIndent=" ", R)(auto ref R input, ulong numItems = ulong.max)
12371237
{
12381238
import std.stdio : stdout;
12391239
auto writer = stdout.lockingTextWriter;
1240-
printCborStream!singleIndent(input, writer);
1240+
printCborStream!singleIndent(input, writer, numItems);
12411241
}
12421242

12431243
/// ditto

0 commit comments

Comments
 (0)