[PATCH 6 of 8 faster-obsmarkers] getbefloat64: drop unnecessary memcpy

Julien Cristau julien.cristau at logilab.fr
Tue Feb 3 10:22:58 CST 2015


On Tue, Feb  3, 2015 at 10:56:05 -0500, Augie Fackler wrote:

> On Tue, Feb 3, 2015 at 9:12 AM, Julien Cristau
> <julien.cristau at logilab.fr> wrote:
> > -fno-strict-aliasing can't guarantee correct alignment, though, so
> > unless you're sure the const char * is always 8-byte aligned you can't
> > just cast it.  IOW, the union is probably safest.
> 
> 
> I'm confused how the char* relates to the caast of the uint64_t to double?
> 
I think my brain somehow confused t and d.

Cheers,
Julien
-- 
Julien Cristau          <julien.cristau at logilab.fr>
Logilab		        http://www.logilab.fr/
Informatique scientifique & gestion de connaissances


More information about the Mercurial-devel mailing list