Hi,

Bruce Korb <bk...@gnu.org> writes:

>>> > By replacing "scm_listofnull" with "ag_scm_listofnull" and initializing 
>>> > it:
>>> >    SCM ag_scm_listofnull =  scm_list_1 (SCM_EOL);
>> In Guile < 1.9.3, you have to scm_gc_protect_object this value
>> (info "(guile) Garbage Collection Functions").
>
> and it sounds like scm_gc_protect_object(ag_scm_listofnull) won't
> work in 2.0.

It will.

> Would you-all please put scm_listofnull back?

I’d rather avoid it, since it’s so trivially worked around, and it was
never documented.

So, just use code like below, unconditionally:

  SCM ag_listofnulls;

  ...

    ag_listofnulls = scm_gc_protect_object (scm_list_1 (SCM_EOL));

It will work for 1.6 to 2.0, at least.

Thanks,
Ludo’.


Reply via email to