Hi,
I am using thrift 0.9.0 windows version [...] So I think current
thrift.exe is not included your changes, right?
Version 0.9.0 is correct, of course. Sorry.
If so, how can I build it on windows?
You don't have to. The download should do.
What is the binary type in thrift? I was not found it in thrift base
types. Could you tell me more details?
It's mentioned at http://thrift.apache.org/docs/types/ under "special types"
and it is exactly that: an array of bytes. Some more info can be found here
http://stackoverflow.com/questions/13876233/best-way-to-send-binary-data-with-thrift
In our project, we need transport model which included "byte[]" type field
to Server, so in thrift I defined list<byte> type.
Try using binary.
Best regards,
Jens
-----Ursprüngliche Nachricht-----
From: 石孝川
Sent: Thursday, July 25, 2013 5:11 AM
To: Jens Geyer ; [email protected]
Subject: RE: some questions about commit
f509df9c969f71d360e7c1394d0d73cb6ab9955c
Thank you for your reply.
I am using thrift 0.9.0 windows version which download from
http://thrift.apache.org/download/. This version released on 2012-10-15,
your submitted that commit in this year. So I think current thrift.exe is
not included your changes, right? If so, how can I build it on windows? I
followed the README_Windows.txt to build it, but it can`t build successes, I
try to solve the errors, but finally I am give up...
What is the binary type in thrift? I was not found it in thrift base types.
Could you tell me more details?
In our project, we need transport model which included "byte[]" type field
to Server, so in thrift I defined list<byte> type.
Thanks,
Xiaochuan
-----Original Message-----
From: Jens Geyer [mailto:[email protected]]
Sent: 2013年7月24日 19:05
To: 石孝川; [email protected]
Subject: Re: some questions about commit
f509df9c969f71d360e7c1394d0d73cb6ab9955c
Hi,
But in my scenario I have to define list<byte> type for a property in
thrift file.
List of bytes => could the binary type be make a better fit to your use
case?
Or what exactly do you want to achieve? Can you shed some light on the
problem you want to solve?
Thanks,
Jens
-----Ursprüngliche Nachricht-----
From: Jens Geyer
Sent: Wednesday, July 24, 2013 11:07 AM
To: 石孝川 ; [email protected]
Subject: AW: some questions about commit
f509df9c969f71d360e7c1394d0d73cb6ab9955c
Hi,
there's one simple reason: all integers in Thrift are signed by design.
Therefore byte was inconsistent and wrong, sbyte is correct.
I can't reproduce any problems with the generated code. If you refer to
existing program code of yours that is going to be linked against newly
generated code now which uses sbyte: Yes, I'm fully aware of the fact that
it is a breaking fix, but nevertheless it is a fix of wrong behaviour.
What exactly means "I have to"? I hardly can't imagine something like that.
Of you are under time pressure and just need a quick change of sth.,
implement the change using the 0.9 stable version.
If not, I would recommend to review your code and implement a solution that
is compatible. Finally, sooner or later you will need access to your servers
and/or clients from other languages, then you are facing the exact same
issue again.
Jens
________________________________
Von: 石孝川
Gesendet: 24.07.2013 09:58
An: [email protected]
Betreff: some questions about commit
f509df9c969f71d360e7c1394d0d73cb6ab9955c
Hi Jens,
This is XiaoChuan Shi, a thrift user from China. I am very
sorry for trouble you. I have a question about you commit
https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=commit;h=f509df9c969f71d360e7c1394d0d73cb6ab9955c.
Please give me a few minutes :) Thanks a lot.
I saw you have replaced byte with sbyte in this commit. But
in my scenario I have to define list<byte> type for a property in thrift
file. After generated, the solution can`t build successed, because the byte
type in generated code can`t convert to sbyte. So I want to know why you
replaced byte with sbyte? If I convert back(TProtocol file and related
derived class), Is there any problems?
Thanks
Xiaochuan