Skip to content

Commit be7e7b7

Browse files
committed
---
yaml --- r: 10158 b: refs/heads/snap-stage3 c: 3f8223f h: refs/heads/master v: v3
1 parent e591563 commit be7e7b7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ecd431809431b07fd63fb62c0f3ae70e2c917582
4+
refs/heads/snap-stage3: 3f8223ffc2b820108677ca9c69e3db98af1b157d
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/rt/rust_builtin.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,15 @@ str_reserve_shared(rust_vec_box** sp,
157157
* Copies elements in an unsafe buffer to the given interior vector. The
158158
* vector must have size zero.
159159
*/
160-
extern "C" CDECL rust_vec*
160+
extern "C" CDECL rust_vec_box*
161161
vec_from_buf_shared(type_desc *ty, void *ptr, size_t count) {
162162
rust_task *task = rust_get_current_task();
163163
size_t fill = ty->size * count;
164-
rust_vec* v = (rust_vec*)task->kernel->malloc(fill + sizeof(rust_vec),
165-
"vec_from_buf");
166-
v->fill = v->alloc = fill;
167-
memmove(&v->data[0], ptr, fill);
164+
rust_vec_box* v = (rust_vec_box*)
165+
task->kernel->malloc(fill + sizeof(rust_vec_box),
166+
"vec_from_buf");
167+
v->body.fill = v->body.alloc = fill;
168+
memmove(&v->body.data[0], ptr, fill);
168169
return v;
169170
}
170171

0 commit comments

Comments
 (0)