Skip to content

Commit 8fd1baf

Browse files
author
Max Krogius
committed
Merge branch 'macmason-master'
2 parents bca3a8d + 76a8442 commit 8fd1baf

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

common/zarray.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -226,26 +226,6 @@ inline static void zarray_truncate(zarray_t *za, int sz)
226226
za->size = sz;
227227
}
228228

229-
/**
230-
* Copies the memory array used internally by zarray to store its owned
231-
* elements to the address pointed by 'buffer'. It is the caller's responsibility
232-
* to allocate zarray_size()*el_sz bytes for the copy to be stored and
233-
* to free the memory when no longer needed. The memory allocated at 'buffer'
234-
* and the internal zarray storage must not overlap. 'buffer_bytes' should be
235-
* the size of the 'buffer' memory space, in bytes, and must be at least
236-
* zarray_size()*el_sz.
237-
*
238-
* Returns the number of bytes copied into 'buffer'.
239-
*/
240-
static inline size_t zarray_copy_data(const zarray_t *za, void *buffer, size_t buffer_bytes)
241-
{
242-
assert(za != NULL);
243-
assert(buffer != NULL);
244-
assert(buffer_bytes >= za->el_sz * za->size);
245-
memcpy(buffer, za->data, za->el_sz * za->size);
246-
return za->el_sz * za->size;
247-
}
248-
249229
/**
250230
* Removes the entry at index 'idx'.
251231
* If shuffle is true, the last element in the array will be placed in

0 commit comments

Comments
 (0)