self_scm_=SCM_EOL;

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

self_scm_=SCM_EOL;

Erik Sandberg
Hi,

I noticed that the
self_scm_=SCM_EOL;
line is missing in many constructors of smobs, e.g. in Context. Is this safe?

I don't know about Guile internals, but I can imagine that smobify_self()
could trigger a GC, which could do bad things. I don't understand why this
would be less risky in classes which have no subclasses.

Erik


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: self_scm_=SCM_EOL;

Han-Wen Nienhuys
Erik Sandberg wrote:
> Hi,
>
> I noticed that the
> self_scm_=SCM_EOL;
> line is missing in many constructors of smobs, e.g. in Context. Is this safe?
>
> I don't know about Guile internals, but I can imagine that smobify_self()
> could trigger a GC, which could do bad things. I don't understand why this
> would be less risky in classes which have no subclasses.

the self_scm_ is never marked, so yes, this is safe.



--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel