* ikarus-fasl.c now recognizes the "v" marker for bytevectors

This commit is contained in:
Abdulaziz Ghuloum 2007-05-18 18:16:52 -04:00
parent 5c24a02d73
commit dfe8e0e1c1
4 changed files with 15 additions and 1 deletions

Binary file not shown.

View File

@ -389,6 +389,20 @@ static ikp do_read(ikpcb* pcb, fasl_port* p){
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 {
fprintf(stderr,
"invalid type '%c' (0x%02x) found in fasl file at byte 0x%08x\n",

Binary file not shown.

View File

@ -73,7 +73,7 @@
(error 'open-input-string "~s is not a string" str))
(let ([port (make-input-port
(make-input-string-handler str)
($make-bytevector 0))])
'#vu8())])
port)))
)