Dirk Herrmann <address@hidden> writes:
I wouldn't prefer any of the two solutions, but I am currently not
sure what you actually suggest - especially since in the example
given below you don't pass any argument to scm_begin_frame.
The first variant (with scm_prevent_rewind) would be more elegant from
an implementational point of view. The latter (with
SCM_F_REWINDABLE_FRAME) leads to a more desirable default behavior. I
think people should explicitely allow rewinding when they have unwind
handlers.
It is a nice coincidence that 'free' matches the void (*func) (void
*) signature, especially since free will probably be one of the most
frequently used functions with scm_on_unwind. fclose, however, does
not match and is another candidate that may be commonly
used. Unfortunately it wouldn't be standard conforming to just cast
fclose to match the signature.
Is that a theoretical problem or do indeed platforms exist where you
can't cast fclose to (void (*)(void *))?
If it is only theoretical, I'm inclined not to worry about it...