"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "util/ByteBuffer.cpp" between
muscle8.20.zip and muscle8.30.zip

About: MUSCLE (Multi User Server Client Linking Environment) is a messaging server and networking API. The included server program ("muscled") lets its clients message each other, and/or store information in its serverside hierarchical database.

ByteBuffer.cpp  (muscle8.20):ByteBuffer.cpp  (muscle8.30)
skipping to change at line 168 skipping to change at line 168
memcpy(ret.GetBuffer(), lhs.GetBuffer(), lhs.GetNumBytes()); memcpy(ret.GetBuffer(), lhs.GetBuffer(), lhs.GetNumBytes());
memcpy(ret.GetBuffer()+lhs.GetNumBytes(), rhs.GetBuffer(), rhs.GetNumBytes ()); memcpy(ret.GetBuffer()+lhs.GetNumBytes(), rhs.GetBuffer(), rhs.GetNumBytes ());
} }
return ret; return ret;
} }
static ByteBufferRef::ItemPool _bufferPool; static ByteBufferRef::ItemPool _bufferPool;
ByteBufferRef::ItemPool * GetByteBufferPool() {return &_bufferPool;} ByteBufferRef::ItemPool * GetByteBufferPool() {return &_bufferPool;}
const ByteBuffer & GetEmptyByteBuffer() {return _bufferPool.GetDefaultObject();} const ByteBuffer & GetEmptyByteBuffer() {return _bufferPool.GetDefaultObject();}
static const ConstByteBufferRef _emptyBufRef(&_bufferPool.GetDefaultObject(), fa lse); static const DummyConstByteBufferRef _emptyBufRef(_bufferPool.GetDefaultObject() );
ConstByteBufferRef GetEmptyByteBufferRef() {return _emptyBufRef;} ConstByteBufferRef GetEmptyByteBufferRef() {return _emptyBufRef;}
ByteBufferRef GetByteBufferFromPool(uint32 numBytes, const uint8 * optBuffer) {r eturn GetByteBufferFromPool(_bufferPool, numBytes, optBuffer);} ByteBufferRef GetByteBufferFromPool(uint32 numBytes, const uint8 * optBuffer) {r eturn GetByteBufferFromPool(_bufferPool, numBytes, optBuffer);}
ByteBufferRef GetByteBufferFromPool(ObjectPool<ByteBuffer> & pool, uint32 numByt es, const uint8 * optBuffer) ByteBufferRef GetByteBufferFromPool(ObjectPool<ByteBuffer> & pool, uint32 numByt es, const uint8 * optBuffer)
{ {
ByteBufferRef ref(pool.ObtainObject()); ByteBufferRef ref(pool.ObtainObject());
if ((ref())&&(ref()->SetBuffer(numBytes, optBuffer).IsError())) ref.Reset(); // return NULL ref on out-of-memory if ((ref())&&(ref()->SetBuffer(numBytes, optBuffer).IsError())) ref.Reset(); // return NULL ref on out-of-memory
return ref; return ref;
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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