Github user jbapple-cloudera commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1214#discussion_r106794729
  
    --- Diff: lib/c_glib/src/thrift/c_glib/protocol/thrift_compact_protocol.c 
---
    @@ -120,7 +120,11 @@ thrift_bitwise_cast_gdouble (const guint64 v)
     static guint64
     i64_to_zigzag (const gint64 l)
     {
    -  return (l << 1) ^ (l >> 63);
    --- End diff --
    
    Negative input is expected:
    
    
https://github.com/apache/thrift/blob/796667b29f91682871cec310571e66b1259fffb0/lib/cpp/src/thrift/protocol/TCompactProtocol.tcc#L385
    
    Also, changing the input to unsigned would actually break this, because the 
right shift depends on being an arithmetic shift, not a logical one.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to