Function Macro

GLibtry_renew

since: 2.8

Declaration [src]

#define g_try_renew (
  struct_type,
  mem,
  n_structs
)

Description [src]

Attempts to reallocate the memory pointed to by mem, so that it now has space for n_structs elements of type struct_type, and returns NULL on failure. Contrast with g_renew(), which aborts the program on failure. It returns the new address of the memory, which may have been moved. The function returns NULL if an overflow occurs.

Available since: 2.8

This function is not directly available to language bindings.

Parameters

struct_type

Type: -

The type of the elements to allocate.

mem

Type: -

The currently allocated memory.

n_structs

Type: -

The number of elements to allocate.