guile-devel
[Top][All Lists]
Advanced

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

incoming parameter validation (float/double deprecated)


From: Aleix Conchillo Flaqué
Subject: incoming parameter validation (float/double deprecated)
Date: Sat, 11 Aug 2012 08:45:33 -0700

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



reply via email to

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