this routine 'moves' data from src to dst by interchanging 'data', 'size' & 'alloc' between them and copying the rest of the fields from src to dst.
| 1001 | // 'size' & 'alloc' between them and copying the rest of the fields |
| 1002 | // from src to dst. |
| 1003 | void hb_buffer_swap_copy( hb_buffer_t *src, hb_buffer_t *dst ) |
| 1004 | { |
| 1005 | uint8_t *data = dst->data; |
| 1006 | int size = dst->size; |
| 1007 | int alloc = dst->alloc; |
| 1008 | |
| 1009 | *dst = *src; |
| 1010 | |
| 1011 | src->data = data; |
| 1012 | src->size = size; |
| 1013 | src->alloc = alloc; |
| 1014 | } |
| 1015 | |
| 1016 | static void free_buffer_resources(hb_buffer_t *b) |
| 1017 | { |