[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Dirk Herrmann
Subject: Re: SCM_ASSYNT
Date: Mon, 12 Mar 2001 15:46:47 +0100 (MET)

On Mon, 5 Mar 2001, Dirk Herrmann wrote:

> [...]  My preferred solution
> when keeping SCM_ASSYNT would be to define SCM_ASSYNT as:
> #define SCM_ASSYNT(cond, arg, msg, subr) \
>   if (!(cond)) scm_misc_error (subr, msg, SCM_EOL)
> It is then easy to replace scm_misc_error with scm_syntax_error.  Note
> that the arg argument is not used.  In the current situation it is not
> used either, since the message strings that are used don't hold a ~A or ~S
> placeholder.  Probably it would be better to leave out the arg argument
> anyway, since in the case of syntax errors there is no argument that it
> makes sense to pass.

I have as a first step changed the definition of SCM_ASSYNT as shown
above.  As a next step I would like to change it to:

  #define SCM_ASSYNT(cond, msg, subr) \
    if (!(cond)) scm_misc_error (subr, msg, SCM_EOL)

i. e. removing the unused 'arg' argument from the interface.  This will be
an incompatible change.  However, for syntax errors there is not much
sense in passing an argument, and it is misleading if all calls to
SCM_ASSYNT take one but it is not used.  I doubt that this macro is used
in user code and thus don't expect problems due to the changed number of
parameters.  If somebody disagrees, please tell me, otherwise I am going
to apply that change within the next couple of days.

Best regards,
Dirk Herrmann

reply via email to

[Prev in Thread] Current Thread [Next in Thread]