1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

More words abot what a free function is allowed to do.

This commit is contained in:
Marius Vollmer 2004-09-24 23:11:09 +00:00
parent 0ff7e3ff22
commit 1a82e37046
2 changed files with 8 additions and 0 deletions

View file

@ -55,6 +55,10 @@ directly associated with the smob instance @var{OBJ}. It must assume
that all @code{SCM} values that it references have already been freed
and are thus invalid.
It must also not call any libguile function or macro except
@code{scm_gc_free}, @code{SCM_SMOB_FLAGS}, @code{SCM_SMOB_DATA},
@code{SCM_SMOB_DATA_2}, and @code{SCM_SMOB_DATA_3}.
The @var{free} procedure must return 0.
@end deftypefn

View file

@ -61,6 +61,10 @@ the size of the struct passed to @code{scm_make_smob_type} is non-zero)
using @code{scm_gc_free}. @xref{Garbage Collecting Smobs}, for more
details.
This function operates while the heap is in an inconsistent state and
must therefore be careful. @xref{Smobs}, for details about what this
function is allowed to do.
@item print
Guile will apply this function to each instance of the new type to print
the value, as for @code{display} or @code{write}. The default print