memdup

Allocates byte_size bytes of memory, and copies byte_size bytes into it from mem. If mem is NULL it returns NULL.

More...
void*
memdup
(
const(void)* mem
,)

Parameters

mem const(void)*

the memory to copy

byteSize uint

the number of bytes to copy

Return Value

Type: void*

a pointer to the newly-allocated copy of the memory

Detailed Description

Deprecated: Use funcGLib.memdup2 instead, as it accepts a gsize argument for byte_size, avoiding the possibility of overflow in a gobject.types.size_tpango.types.ATTR_INDEX_TO_TEXT_END conversion