On 06/06/11 18:07, bivab wrote:

>  static double pypy__longlong2float(long long x) {
> +    int i;
> +    double dd;
>      char *p = (char*)&x;
> -    return *((double*)p);
> +    char *d = (char*)ⅆ
> +    for(i = 0; i < 8; i++) {
> +        d[i] = p[i];
> +    }
> +    return dd;

speaking of portability, what about using sizeof(double)/sizeof(char) instead
of hardcoding 8?

ciao,
Anto
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to