More words abot what a free function is allowed to do.
authorMarius Vollmer <mvo@zagadka.de>
Fri, 24 Sep 2004 23:11:09 +0000 (23:11 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Fri, 24 Sep 2004 23:11:09 +0000 (23:11 +0000)
doc/ref/api-smobs.texi
doc/ref/libguile-smobs.texi

index 4099c0f..08236d8 100644 (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
 
index c9509fb..0af81fe 100644 (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