thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John R. Frank" <...@mit.edu>
Subject updating to longer ints
Date Thu, 14 Mar 2013 10:46:52 GMT
Thrift Experts,

Is there any way to make a thrift message with a longer integer read an 
older message definition with a smaller integer?

struct Thing_original {
   1:  i16 idx,
}

struct Thing_newer {
   1:  i32 idx,
}


I'd like to be able to have Thing_newer read *both* kinds of idx.  Simple 
tests show that this does not work.

Is there a way to tell Thing_newer to fallback to looking for (idx, i16) 
if it cannot find (idx, i32)?


JOhn

Mime
View raw message