| 37 | namespace { |
| 38 | // Template function for write in memory/variable. |
| 39 | template<class T> size_t write_callback(void *contents, size_t size, size_t nmemb, void *userp) { |
| 40 | const size_t realsize = size*nmemb; |
| 41 | T *const stream = static_cast<T*>(userp); |
| 42 | stream->write(static_cast<const char *>(contents),realsize); |
| 43 | return realsize; |
| 44 | } |
| 45 | |
| 46 | // Default in-memory read callback. |
| 47 | size_t read_memory_callback(void *contents, size_t size, size_t nmemb, void *userp) { |
nothing calls this directly
no outgoing calls
no test coverage detected