1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-24 21:50:20 +02:00

* dump.c (scm_undump): Bug fixed.

This commit is contained in:
Keisuke Nishida 2001-02-16 00:57:11 +00:00
parent 14dd0e27c3
commit e228a20323
2 changed files with 12 additions and 5 deletions

View file

@ -1,3 +1,10 @@
2001-02-15 Keisuke Nishida <kxn30@po.cwru.edu>
* dump.c (scm_undump): Use SCM_CARLOC/SCM_CDRLOC to obtain the
address of car/cdr. (Thanks to Dirk Herrmann)
Use scm_sizet to obtain the length of strings.
(Thanks to Matthias Koeppe)
2001-02-15 Marius Vollmer <mvo@zagadka.ping.de> 2001-02-15 Marius Vollmer <mvo@zagadka.ping.de>
* symbols.c (scm_mem2symbol): Put a empty statement after the * symbols.c (scm_mem2symbol): Put a empty statement after the

View file

@ -408,7 +408,7 @@ scm_dump (SCM obj, SCM dstate)
case scm_tc7_vector: case scm_tc7_vector:
{ {
int i; int i;
int len = SCM_VECTOR_LENGTH (obj); scm_bits_t len = SCM_VECTOR_LENGTH (obj);
SCM *base = SCM_VELTS (obj); SCM *base = SCM_VELTS (obj);
scm_store_word (scm_tc7_vector, dstate); scm_store_word (scm_tc7_vector, dstate);
scm_store_word (len, dstate); scm_store_word (len, dstate);
@ -458,8 +458,8 @@ scm_undump (SCM dstate)
{ {
SCM_NEWCELL (obj); SCM_NEWCELL (obj);
/* cdr was stored first */ /* cdr was stored first */
scm_restore_object ((SCM *) &SCM_CDR (obj), dstate); scm_restore_object (SCM_CDRLOC (obj), dstate);
scm_restore_object ((SCM *) &SCM_CAR (obj), dstate); scm_restore_object (SCM_CARLOC (obj), dstate);
goto store_object; goto store_object;
} }
@ -467,7 +467,7 @@ scm_undump (SCM dstate)
{ {
case scm_tc7_symbol: case scm_tc7_symbol:
{ {
int len; scm_sizet len;
const char *mem; const char *mem;
scm_restore_string (&mem, &len, dstate); scm_restore_string (&mem, &len, dstate);
obj = scm_mem2symbol (mem, len); obj = scm_mem2symbol (mem, len);
@ -475,7 +475,7 @@ scm_undump (SCM dstate)
} }
case scm_tc7_string: case scm_tc7_string:
{ {
int len; scm_sizet len;
const char *mem; const char *mem;
scm_restore_string (&mem, &len, dstate); scm_restore_string (&mem, &len, dstate);
obj = scm_makfromstr (mem, len, 0); obj = scm_makfromstr (mem, len, 0);