Skip to content

RFC: Add some new macros to allocate and initialize a struct

Allocates and initializes a struct more easily:

GPollFD *p = g_new_struct (GPollFD, { .fd = 0, .events = G_IO_IN });

(see also doc and examples)

Taken originally from !3187 (merged)

Merge request reports

Loading