Skip to content

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

Marc-André Lureau requested to merge malureau/glib:g-struct-new into main

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