mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
common: Add znew/znew_n() macros
This commit is contained in:
parent
da57483961
commit
a54d378e6c
26 changed files with 47 additions and 47 deletions
|
|
@ -79,7 +79,7 @@ menu_get_by_id(const char *id)
|
|||
static struct menuitem *
|
||||
item_create(struct menu *menu, const char *text, bool show_arrow)
|
||||
{
|
||||
struct menuitem *menuitem = xzalloc(sizeof(struct menuitem));
|
||||
struct menuitem *menuitem = znew(*menuitem);
|
||||
menuitem->parent = menu;
|
||||
menuitem->selectable = true;
|
||||
struct server *server = menu->server;
|
||||
|
|
@ -160,7 +160,7 @@ item_create(struct menu *menu, const char *text, bool show_arrow)
|
|||
static struct menuitem *
|
||||
separator_create(struct menu *menu, const char *label)
|
||||
{
|
||||
struct menuitem *menuitem = xzalloc(sizeof(struct menuitem));
|
||||
struct menuitem *menuitem = znew(*menuitem);
|
||||
menuitem->parent = menu;
|
||||
menuitem->selectable = false;
|
||||
struct server *server = menu->server;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue