trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #560: JIRA 2086 Support for largeint unsign...
Date Tue, 28 Jun 2016 22:08:46 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/560#discussion_r68853267
  
    --- Diff: core/sql/common/ComSysUtils.h ---
    @@ -129,6 +129,27 @@ inline Int64 reversebytes( Int64 xx )
     
         return sink.xx;
     }
    +
    +inline UInt64 reversebytes( UInt64 xx )
    +{
    +    union {
    +        UInt64 xx;
    +        char c[8];
    +    } source;
    +
    +    union {
    +        UInt64 xx;
    +        char c[8];
    +    } sink;
    +
    +    source.xx = xx;
    +
    +    for (Int32 i=0; i<8; i++)
    +        sink.c[i] = source.c[7-i];
    +
    +    return sink.xx;
    +}
    --- End diff --
    
    Endianness issues sometimes give me a sinking feeling too. :-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message