This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Critical sections and marking of free cells


> #define SCM_NEWCELL(scm, car, cdr) { SCM_NEWCELL_OLD(scm); \
>                                      SCM_DEFER_INTS;       \
>                                      SCM_SETCAR(scm, car); \
>                                      SCM_SETCDR(scm, cdr); \
>                                      SCM_ALLOW_INTS; }

Is this essentially different to the following?

	scm = gh_cons( car, cdr );

> The current way this is done forces users to use such a pattern all the
> time, which means degrading them to error-prone macro processors which are
> completely lost as soon as a failure occurs. I up to now did not encounter
> problems due to some forgotten DEFER-ALLOW pair, but I'm pretty sure it
> would take me a lot of time to figure out what's wrong.

I use privately defined DEFER/ALLOW macros that do their own reference
counting in the debugging version and turn to the normal ones for non-debug.

	- Tel