"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/common/classes/ClumpletReader.cpp" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

ClumpletReader.cpp  (Firebird-3.0.2.32703-0.tar.bz2):ClumpletReader.cpp  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 705 skipping to change at line 705
const UCHAR* ClumpletReader::getBytes() const const UCHAR* ClumpletReader::getBytes() const
{ {
return getBuffer() + cur_offset + getClumpletSize(true, true, false); return getBuffer() + cur_offset + getClumpletSize(true, true, false);
} }
SINT64 ClumpletReader::fromVaxInteger(const UCHAR* ptr, FB_SIZE_T length) SINT64 ClumpletReader::fromVaxInteger(const UCHAR* ptr, FB_SIZE_T length)
{ {
// We can't handle numbers bigger than int64. Some cases use length == 0. // We can't handle numbers bigger than int64. Some cases use length == 0.
fb_assert(ptr && length >= 0 && length < 9); fb_assert(ptr && length >= 0 && length < 9);
// This code is taken from gds__vax_integer
// This code is taken from isc_portable_integer()
// Be ready to parse buffer made by hand instead of ClumpletWriter
if (!ptr || length <= 0 || length > 8)
return 0;
SINT64 value = 0; SINT64 value = 0;
int shift = 0; int shift = 0;
while (length > 0)
while (--length > 0)
{ {
--length;
value += ((SINT64) *ptr++) << shift; value += ((SINT64) *ptr++) << shift;
shift += 8; shift += 8;
} }
value += ((SINT64)(SCHAR)*ptr) << shift;
return value; return value;
} }
SLONG ClumpletReader::getInt() const SLONG ClumpletReader::getInt() const
{ {
const FB_SIZE_T length = getClumpLength(); const FB_SIZE_T length = getClumpLength();
if (length > 4) if (length > 4)
{ {
 End of changes. 4 change blocks. 
3 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)