jscript: Added NAN definition (1/10)
Alexandre Julliard
julliard at winehq.org
Wed Jun 3 03:47:05 CDT 2009
Piotr Caban <piotr.caban at gmail.com> writes:
> Some functions needs to return NAN. The other possibility of
> implementing it is following:
>
> static inline DOUBLE ret_nan(void)
> {
> VARIANT v;
> num_set_nan(&v);
> return V_R8(&v);
> }
>
> or
>
> #ifdef NAN
> static inline DOUBLE ret_nan(void)
> {
> return NAN;
> }
> #else
> static inline DOUBLE ret_nan(void)
> {
> VARIANT v;
> num_set_nan(&v);
> return V_R8(&v);
> }
> #endif
>
> But both of these methods are probably even uglier. Do you have any
> suggestions how should I implement it?
The first one is fine.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list