Example #1
0
static size_t write_callback(char* buffer, size_t size, size_t nitems, void* instream)
{
    CallbackHandle* handle = (CallbackHandle*)instream;
    return (size_t)(handle->writeCallback((uint8_t*)buffer, size, nitems, handle->writeUserPointer));
}
Example #2
0
static size_t write_callback(char* buffer, size_t size, size_t nitems, void* instream)
{
    CallbackHandle* handle = static_cast<CallbackHandle*>(instream);
    return static_cast<size_t>(
        handle->writeCallback(reinterpret_cast<uint8_t*>(buffer), size, nitems, handle->writeUserPointer));
}