* ikarus-fasl.c now recognizes the "v" marker for bytevectors
This commit is contained in:
parent
5c24a02d73
commit
dfe8e0e1c1
BIN
bin/ikarus
BIN
bin/ikarus
Binary file not shown.
|
@ -389,6 +389,20 @@ static ikp do_read(ikpcb* pcb, fasl_port* p){
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(c == 'v'){
|
||||||
|
/* bytevector */
|
||||||
|
int len;
|
||||||
|
fasl_read_buf(p, &len, sizeof(int));
|
||||||
|
int size = align(len + disp_bytevector_data + 1);
|
||||||
|
ikp x = ik_alloc(pcb, size) + bytevector_tag;
|
||||||
|
ref(x, off_bytevector_length) = fix(len);
|
||||||
|
fasl_read_buf(p, x+off_bytevector_data, len);
|
||||||
|
x[off_bytevector_data+len] = 0;
|
||||||
|
if(put_mark_index){
|
||||||
|
p->marks[put_mark_index] = x;
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"invalid type '%c' (0x%02x) found in fasl file at byte 0x%08x\n",
|
"invalid type '%c' (0x%02x) found in fasl file at byte 0x%08x\n",
|
||||||
|
|
BIN
src/ikarus.boot
BIN
src/ikarus.boot
Binary file not shown.
|
@ -73,7 +73,7 @@
|
||||||
(error 'open-input-string "~s is not a string" str))
|
(error 'open-input-string "~s is not a string" str))
|
||||||
(let ([port (make-input-port
|
(let ([port (make-input-port
|
||||||
(make-input-string-handler str)
|
(make-input-string-handler str)
|
||||||
($make-bytevector 0))])
|
'#vu8())])
|
||||||
port)))
|
port)))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue