* incoming parameter validation (float/double deprecated)
@ 2012-08-11 15:45 Aleix Conchillo Flaqué
2012-11-05 18:05 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Aleix Conchillo Flaqué @ 2012-08-11 15:45 UTC (permalink / raw)
To: guile-devel
Hi,
I have started using SCM_VALIDATE_XXX_COPY to check incoming parameters.
I have seen that for most of the types, for example uint, this is
equivalent to scm_to_uint which is what I was doing before.
I have also found that SCM_VALIDATE_FLOAT_COPY and
SCM_VALIDATE_DOUBLE_COPY use deprecated functions scm_num2float and
scm_num2double respectively.
So...
- Should SCM_VALIDATE_(FLOAT|DOUBLE)_COPY use scm_to_double?
- Are SCM_VALIDATE_XXX_COPY the way to go? Because it is ignoring the
pos argument. It seems, simply calling scm_to_int, etc. would be
enough. But that might change in the future, so I guess the macro is
fine.
Thanks in advance,
Aleix
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: incoming parameter validation (float/double deprecated)
2012-08-11 15:45 incoming parameter validation (float/double deprecated) Aleix Conchillo Flaqué
@ 2012-11-05 18:05 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2012-11-05 18:05 UTC (permalink / raw)
To: guile-devel
Hi,
Sorry for the delay.
Aleix Conchillo Flaqué <aconchillo@gmail.com> skribis:
> - Should SCM_VALIDATE_(FLOAT|DOUBLE)_COPY use scm_to_double?
Yes. I’ve just fixed it, thanks!
> - Are SCM_VALIDATE_XXX_COPY the way to go? Because it is ignoring the
> pos argument. It seems, simply calling scm_to_int, etc. would be
> enough. But that might change in the future, so I guess the macro is
> fine.
Right. Ideally they wouldn’t ignore it, but we’ll live with it for now.
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-05 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-11 15:45 incoming parameter validation (float/double deprecated) Aleix Conchillo Flaqué
2012-11-05 18:05 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).