guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Eduardo Acuña
Subject:
Date: Sun, 29 Dec 2013 19:58:54 -0700

Hi, i have a question about the use of the function scm_remember_upto_here_1.

The Guile manual says:

"It’s only in quite rare circumstances that a missing scm_remember_upto_here_1 will
bite, but when it happens the consequences are serious. Fortunately the rule is simple:
whenever calling a Guile library function or doing something that might, ensure that the
SCM of a smob is referenced past all accesses to its insides. Do this by adding an scm_
remember_upto_here_1 if there are no other references."

In the example code the clean_image function does call scm_remember_upto_here_1 after accessing data in the smob, however the function print_image does not, and access the name member of the image.

If i don't call a Guile library function, but i modify a value inside the smob, do i have tu call this function?

In the case of the print_image function, a scm_display is called with a SCM value inside the smob, that's why they didn't call scm_remember_upto_here_1 ?

When is necessary to call this function?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]