Skip to content

Commit 6e467bf

Browse files
committed
---
yaml --- r: 3839 b: refs/heads/master c: c15aa5e h: refs/heads/master i: 3837: 79898bb 3835: c1ce733 3831: ca75ad8 3823: e9242fa 3807: 0ba1e8d 3775: e6b9cca 3711: 326c19d 3583: c282e5e v: v3
1 parent 4a36884 commit 6e467bf

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3275cad6d5217b12e4747bc280a1dd43246e13e4
2+
refs/heads/master: c15aa5e3a373a4dfad8c276a9de06bc8f5ed44df

trunk/src/lib/ebmlivec.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type ebml_state = rec(ebml_tag ebml_tag, uint tag_pos, uint data_pos);
1717
// ebml reading
1818
type doc = rec(@u8[] data, uint start, uint end);
1919

20-
fn vint_at(&@u8[] data, uint start) -> tup(uint, uint) {
20+
fn vint_at(&u8[] data, uint start) -> tup(uint, uint) {
2121
auto a = data.(start);
2222
if (a & 0x80u8 != 0u8) { ret tup(a & 0x7fu8 as uint, start + 1u); }
2323
if (a & 0x40u8 != 0u8) {
@@ -40,17 +40,17 @@ fn new_doc(&@u8[] data) -> doc {
4040
}
4141

4242
fn doc_at(&@u8[] data, uint start) -> doc {
43-
auto elt_tag = vint_at(data, start);
44-
auto elt_size = vint_at(data, elt_tag._1);
43+
auto elt_tag = vint_at(*data, start);
44+
auto elt_size = vint_at(*data, elt_tag._1);
4545
auto end = elt_size._1 + elt_size._0;
4646
ret rec(data=data, start=elt_size._1, end=end);
4747
}
4848

4949
fn maybe_get_doc(doc d, uint tg) -> option::t[doc] {
5050
auto pos = d.start;
5151
while (pos < d.end) {
52-
auto elt_tag = vint_at(d.data, pos);
53-
auto elt_size = vint_at(d.data, elt_tag._1);
52+
auto elt_tag = vint_at(*d.data, pos);
53+
auto elt_size = vint_at(*d.data, elt_tag._1);
5454
pos = elt_size._1 + elt_size._0;
5555
if (elt_tag._0 == tg) {
5656
ret some[doc](rec(data=d.data, start=elt_size._1, end=pos));
@@ -72,8 +72,8 @@ fn get_doc(doc d, uint tg) -> doc {
7272
iter docs(doc d) -> tup(uint, doc) {
7373
auto pos = d.start;
7474
while (pos < d.end) {
75-
auto elt_tag = vint_at(d.data, pos);
76-
auto elt_size = vint_at(d.data, elt_tag._1);
75+
auto elt_tag = vint_at(*d.data, pos);
76+
auto elt_size = vint_at(*d.data, elt_tag._1);
7777
pos = elt_size._1 + elt_size._0;
7878
put tup(elt_tag._0, rec(data=d.data, start=elt_size._1, end=pos));
7979
}
@@ -82,8 +82,8 @@ iter docs(doc d) -> tup(uint, doc) {
8282
iter tagged_docs(doc d, uint tg) -> doc {
8383
auto pos = d.start;
8484
while (pos < d.end) {
85-
auto elt_tag = vint_at(d.data, pos);
86-
auto elt_size = vint_at(d.data, elt_tag._1);
85+
auto elt_tag = vint_at(*d.data, pos);
86+
auto elt_size = vint_at(*d.data, elt_tag._1);
8787
pos = elt_size._1 + elt_size._0;
8888
if (elt_tag._0 == tg) {
8989
put rec(data=d.data, start=elt_size._1, end=pos);

0 commit comments

Comments
 (0)