Function Macro
GLibGNUC_ALLOC_SIZE2
since: 2.18
Declaration [src]
#define G_GNUC_ALLOC_SIZE2 (
x,
y
)
Description [src]
Expands to the GNU C alloc_size function attribute if the compiler is a
new enough gcc. This attribute tells the compiler that the function returns
a pointer to memory of a size that is specified by the product of two
function parameters.
Place the attribute after the function declaration, just before the semicolon.
gpointerg_malloc_n(gsizen_blocks, gsizen_block_bytes)G_GNUC_MALLOCG_GNUC_ALLOC_SIZE2(1,2);
See the GNU C documentation for more details.
Available since: 2.18
This function is not directly available to language bindings.
Parameters
x-
Type:
-The index of the argument specifying one factor of the allocation size.
y-
Type:
-The index of the argument specifying the second factor of the allocation size.