1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-21 20:20:24 +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 that all @code{SCM} values that it references have already been freed
and are thus invalid. 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. The @var{free} procedure must return 0.
@end deftypefn @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 using @code{scm_gc_free}. @xref{Garbage Collecting Smobs}, for more
details. 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 @item print
Guile will apply this function to each instance of the new type to 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 the value, as for @code{display} or @code{write}. The default print