1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 16:00:22 +02:00

* smob.c (freeprint): New function.

(freecell): Use it to print freed objects, for slightly easier
debugging.
This commit is contained in:
Jim Blandy 1998-12-05 16:52:34 +00:00
parent 6ab397f48e
commit ceef320834

View file

@ -84,14 +84,29 @@ scm_newsmob (smob)
return scm_tc7_smob + (scm_numsmob - 1) * 256;
}
/* {Initialization for i/o types, float, bignum, the type of free cells}
*/
static int
freeprint (SCM exp,
SCM port,
scm_print_state *pstate)
{
char buf[100];
sprintf (buf, "#<freed cell %p; GC missed a reference>", (void *) exp);
scm_puts (buf, port);
return 1;
}
static scm_smobfuns freecell =
{
0,
scm_free0,
0,
freeprint,
0
};