thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Geyer" <jensge...@hotmail.com>
Subject Re: some questions about commit f509df9c969f71d360e7c1394d0d73cb6ab9955c
Date Wed, 24 Jul 2013 11:05:23 GMT
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: 石孝川 ; user@thrift.apache.org
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: jensg@apache.org
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 


Mime
View raw message