1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-03 13:20:26 +02:00

*** empty log message ***

This commit is contained in:
Jim Blandy 1998-10-07 20:06:29 +00:00
parent dab7f56692
commit a8e0500932
2 changed files with 24 additions and 1 deletions

21
NEWS
View file

@ -526,7 +526,6 @@ are now incorrect, since they will return early, and fail to mark any
other objects the smob refers to. Some code in the Guile library used
to work this way.
** Function: int scm_internal_select (int fds,
SELECT_TYPE *rfds,
SELECT_TYPE *wfds,
@ -603,6 +602,26 @@ Body functions to scm_internal_catch and friends do not any longer
take a second argument. This is because it is no longer possible to
pass a #f arg to catch.
** Calls to scm_protect_object and scm_unprotect now nest properly.
The function scm_protect_object protects its argument from being freed
by the garbage collector. scm_unprotect_object removes that
protection.
These functions now nest properly. That is, for every object O, there
is a counter which scm_protect_object(O) increments and
scm_unprotect_object(O) decrements, if the counter is greater than
zero. Every object's counter is zero when it is first created. If an
object's counter is greater than zero, the garbage collector will not
reclaim its storage.
This allows you to use scm_protect_object in your code without
worrying that some other function you call will call
scm_unprotect_object, and allow it to be freed. Assuming that the
functions you call are well-behaved, and unprotect only those objects
they protect, you can follow the same rule and have confidence that
objects will be freed only at appropriate times.
Changes in Guile 1.2 (released Tuesday, June 24 1997):

View file

@ -1,5 +1,9 @@
1998-10-07 Jim Blandy <jimb@zwingli.cygnus.com>
* gc.c (scm_unprotect_object): Change this so that calls to
scm_protect_object and scm_unprotect_object nest properly.
(scm_protect_object): Doc fixes.
* strings.c (scm_string_set_x): Require the argument to be a
writable string, not a substring or a symbol.
* strings.h (SCM_RWSTRINGP, SCM_NRWSTRINGP): New predicates.