ext/common/EventedBufferedInput.h in passenger-4.0.20 vs ext/common/EventedBufferedInput.h in passenger-4.0.21

- old
+ new

@@ -60,11 +60,11 @@ * the number of bytes that it has actually consumed. If not everything has been * consumed, then the handler will be called with the remaining data in the next * tick. */ template<size_t bufferSize = 1024 * 8> -class EventedBufferedInput: public enable_shared_from_this< EventedBufferedInput<bufferSize> > { +class EventedBufferedInput: public boost::enable_shared_from_this< EventedBufferedInput<bufferSize> > { private: enum State { LIVE, /** * @invariant @@ -139,11 +139,11 @@ userData = NULL; } void onReadable(ev::io &watcher, int revents) { // Keep 'this' alive until function exit. - shared_ptr< EventedBufferedInput<bufferSize> > self = EventedBufferedInput<bufferSize>::shared_from_this(); + boost::shared_ptr< EventedBufferedInput<bufferSize> > self = EventedBufferedInput<bufferSize>::shared_from_this(); EBI_TRACE("onReadable"); verifyInvariants(); assert(!nextTickInstalled); @@ -199,20 +199,20 @@ void processBufferInNextTick() { if (!nextTickInstalled) { nextTickInstalled = true; libev->runLater(boost::bind( realProcessBufferInNextTick, - weak_ptr< EventedBufferedInput<bufferSize> >(this->shared_from_this()), + boost::weak_ptr< EventedBufferedInput<bufferSize> >(this->shared_from_this()), generation )); } } - static void realProcessBufferInNextTick(weak_ptr< EventedBufferedInput<bufferSize> > wself, + static void realProcessBufferInNextTick(boost::weak_ptr< EventedBufferedInput<bufferSize> > wself, unsigned int generation) { - shared_ptr< EventedBufferedInput<bufferSize> > self = wself.lock(); + boost::shared_ptr< EventedBufferedInput<bufferSize> > self = wself.lock(); if (self != NULL && generation == self->generation) { self->verifyInvariants(); self->nextTickInstalled = false; self->processBuffer(); self->verifyInvariants(); @@ -320,12 +320,12 @@ virtual void afterProcessingBuffer() { // Do nothing. To be overridden in unit tests. } public: - typedef size_t (*DataCallback)(const shared_ptr< EventedBufferedInput<bufferSize> > &source, const StaticString &data); - typedef void (*ErrorCallback)(const shared_ptr< EventedBufferedInput<bufferSize> > &source, const char *message, int errnoCode); + typedef size_t (*DataCallback)(const boost::shared_ptr< EventedBufferedInput<bufferSize> > &source, const StaticString &data); + typedef void (*ErrorCallback)(const boost::shared_ptr< EventedBufferedInput<bufferSize> > &source, const char *message, int errnoCode); DataCallback onData; ErrorCallback onError; void *userData; @@ -449,10 +449,10 @@ return result.str(); } }; -typedef shared_ptr< EventedBufferedInput<> > EventedBufferedInputPtr; +typedef boost::shared_ptr< EventedBufferedInput<> > EventedBufferedInputPtr; } // namespace Passenger #endif /* _EVENTED_BUFFERED_INPUT_H_ */