SENF Extensible Network Framework
Go to the documentation of this file. 17 #ifndef HH_SENF_Utils_Buffer_ 18 #define HH_SENF_Utils_Buffer_ 1 21 #include <senf/config.hh> 26 #if defined(SENF_BUFFER_USE_LOCALS) 28 # define SENF_SCOPED_BUFFER(type, sym, size) \ 31 #elif defined(SENF_BUFFER_USE_ALLOCA) 34 # define SENF_SCOPED_BUFFER(type, sym, size) \ 35 type * sym (static_cast<type *>(alloca(size*sizeof(type)))); 37 #elif defined(SENF_BUFFER_USE_NEW) 39 # include <boost/scoped_array.hpp> 70 # define SENF_SCOPED_BUFFER(type, sym, size) \ 71 boost::scoped_array<type> _senf_scoped_buffer__ ## sym ## __ ## __LINE__ (new type[size]); \ 72 type * sym (_senf_scoped_buffer__ ## sym ## __ ## __LINE__.get());