Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Can't serialize more than 28 fields in a message when built with VS 2010 64 bit compile setup

Received: by 10.224.209.202 with SMTP id gh10mr3397818qab.2.1345847253885;
        Fri, 24 Aug 2012 15:27:33 -0700 (PDT)
X-BeenThere: protobuf@googlegroups.com
Received: by 10.224.76.142 with SMTP id c14ls3411382qak.7.gmail; Fri, 24 Aug
 2012 15:27:32 -0700 (PDT)
Received: by 10.224.181.75 with SMTP id bx11mr2856883qab.7.1345847251998;
        Fri, 24 Aug 2012 15:27:31 -0700 (PDT)
Received: by 10.224.180.16 with SMTP id bs16msqab;
        Fri, 24 Aug 2012 13:52:50 -0700 (PDT)
Received: by 10.236.186.34 with SMTP id v22mr518109yhm.9.1345841569905;
        Fri, 24 Aug 2012 13:52:49 -0700 (PDT)
Date: Fri, 24 Aug 2012 13:52:48 -0700 (PDT)
From: Dave <dmiss...@gmail.com>
To: protobuf@googlegroups.com
Message-Id: <221479f2-ca28-4725-9e4e-3f670b23556c@googlegroups.com>
Subject: Can't serialize more than 28 fields in a message when built with VS
 2010 64 bit compile setup
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1175_28709568.1345841568680"

------=_Part_1175_28709568.1345841568680
Content-Type: multipart/alternative; 
	boundary="----=_Part_1176_8987682.1345841568680"

------=_Part_1176_8987682.1345841568680
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

As you can see the 28th field has a bit mask setup in the generated code:
// optional int32 StateSequence = 28;
inline bool Order::has_statesequence() const {
  return (_has_bits_[0] & 0x88000000u) != 0;
}
inline void Order::set_has_statesequence() {
  _has_bits_[0] |= 0x88000000u;
}
inline void Order::clear_has_statesequence() {
  _has_bits_[0] &= ~0x88000000u;
}

The 29th field does not:
// optional .OXObjects.OrderStates OrderState = 29;
inline bool Order::has_orderstate() const {
  return (_has_bits_[0] & 0x00000000u) != 0;
}
inline void Order::set_has_orderstate() {
  _has_bits_[0] |= 0x00000000u;
}
inline void Order::clear_has_orderstate() {
  _has_bits_[0] &= ~0x00000000u;
}

Anyone have a fix for this in the protoc.exe code generator?

------=_Part_1176_8987682.1345841568680
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

As you can see the 28th field has a bit mask setup in the generated code:<d=
iv><div>// optional int32 StateSequence =3D 28;</div><div>inline bool Order=
::has_statesequence() const {</div><div>&nbsp; return (_has_bits_[0] &amp; =
0x88000000u) !=3D 0;</div><div>}</div><div>inline void Order::set_has_state=
sequence() {</div><div>&nbsp; _has_bits_[0] |=3D 0x88000000u;</div><div>}</=
div><div>inline void Order::clear_has_statesequence() {</div><div>&nbsp; _h=
as_bits_[0] &amp;=3D ~0x88000000u;</div><div>}</div></div><div><br></div><d=
iv>The 29th field does not:</div><div><div>// optional .OXObjects.OrderStat=
es OrderState =3D 29;</div><div>inline bool Order::has_orderstate() const {=
</div><div>&nbsp; return (_has_bits_[0] &amp; 0x00000000u) !=3D 0;</div><di=
v>}</div><div>inline void Order::set_has_orderstate() {</div><div>&nbsp; _h=
as_bits_[0] |=3D 0x00000000u;</div><div>}</div><div>inline void Order::clea=
r_has_orderstate() {</div><div>&nbsp; _has_bits_[0] &amp;=3D ~0x00000000u;<=
/div><div>}</div></div><div><br></div><div>Anyone have a fix for this in th=
e protoc.exe code generator?</div>
------=_Part_1176_8987682.1345841568680--

------=_Part_1175_28709568.1345841568680--