[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: smobs
From: |
tomas |
Subject: |
Re: smobs |
Date: |
Wed, 14 May 2003 10:11:43 +0200 |
User-agent: |
Mutt/1.5.3i |
On Tue, May 13, 2003 at 07:51:19PM +0200, Marius Vollmer wrote:
> "Dr. Peter Ivanyi" <address@hidden> writes:
>
> > For example is this correct:
> >
> > static scm_t_bits data_tag = 0;
> >
> > static SCM make_my_data(SCM scm_data)
> > {
> > int tt;
> >
> > SCM_ASSERT(SCM_INUM(scm_data), ...);
> >
> > tt = SCM_INUM(scm_data);
> >
> > SCM_RETURN_NEWSMOB(data_tag, tt);
> > }
>
[...]
> I don't understand. "tt" is a totally ordinary local C variable that
> behaves like any other local C variable.
Ah, I think I get it. Since tt is `just an int', its *content*
gets copied into the smob, not a ref to tt. Thus, no problem if
`tt disappears' as the stack is popped. Does this help, Peter?
Regards
-- tomas
- smobs, Dr. Peter Ivanyi, 2003/05/11
- Re: smobs, Thamer Al-Harbash, 2003/05/12
- Re: smobs, Thamer Al-Harbash, 2003/05/12
- Re: smobs, Dr. Peter Ivanyi, 2003/05/12
- Re: smobs, Thamer Al-Harbash, 2003/05/12
- Re: smobs, Marius Vollmer, 2003/05/13
- Re: smobs,
tomas <=
- Re: smobs, Dr. Peter Ivanyi, 2003/05/14