This is the mail archive of the guile@sourceware.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]

Non-R5RS behaviour of guile functions.


Hi!

The following functions show a behaviour that is not defined according to
R5RS:

* arguments for string may only be characters.  Guile also allows strings
  and symbols.
* the argument for string-length, string-ref, substring and string-append
  has to be a string, but guile also allows symbols.

I assume that this is considered as a bug?

Further, I realized that besides SCM_DEFER_INTS and SCM_ALLOW_INTS there
are macros SCM_REDEFER_INTS and SCM_REALLOW_INTS.  This surprised me,
since I assumed that SCM_DEFER_INTS and SCM_ALLOW_INT could safely be
nested.  A look into __scm.h showed that this is not the case and that you
would have to use the ...RE... version in order to guarantee safe nesting.

Can anybody explain the reason of this to me?  Shouldn't users that use
guile to extend C applications be informed to only use the
...RE... versions, or wouldn't it even be better to make SCM_DEFER_INTS
and SCM_ALLOW_INTS use the safer version?

Best regards,
Dirk Herrmann


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