mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
Updated Cyc_io_get_output_bytevector for huge bv's
This commit is contained in:
parent
91a7df51dc
commit
c16d854631
1 changed files with 4 additions and 5 deletions
|
@ -118,11 +118,10 @@ void Cyc_io_get_output_bytevector(void *data, object cont, object port)
|
|||
Cyc_rt_raise2(data, "Not an in-memory port", port);
|
||||
}
|
||||
{
|
||||
make_empty_bytevector(bv);
|
||||
bv.len = p->str_bv_in_mem_buf_len;
|
||||
bv.data = alloca(sizeof(char) * bv.len);
|
||||
memcpy(bv.data, p->str_bv_in_mem_buf, p->str_bv_in_mem_buf_len);
|
||||
return_closcall1(data, cont, &bv);
|
||||
object bv;
|
||||
alloc_bytevector(data, bv, p->str_bv_in_mem_buf_len);
|
||||
memcpy(((bytevector)bv)->data, p->str_bv_in_mem_buf, p->str_bv_in_mem_buf_len);
|
||||
return_closcall1(data, cont, bv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue