]> git.mdlowis.com Git - proto/labwc.git/commitdiff
common: Expand comment for znew/znew_n()
authorJohn Lindgren <john@jlindgren.net>
Sun, 18 Sep 2022 21:30:12 +0000 (17:30 -0400)
committerJohn Lindgren <john@jlindgren.net>
Sun, 18 Sep 2022 21:30:53 +0000 (17:30 -0400)
include/common/mem.h

index 577970d1b1a9bd3ac28a3685710471d3d40f4494..a38f7fdec3e8dead901e18b51a82bf21b843b936 100644 (file)
@@ -13,7 +13,11 @@ void *xzalloc(size_t size);
 
 /*
  * Type-safe macros in the style of C++ new/new[].
- * <expr> may be either a type name or value expression.
+ * Both allocate zero-filled memory for object(s) the same size as
+ * <expr>, which may be either a type name or value expression.
+ *
+ * znew() allocates space for one object.
+ * znew_n() allocates space for an array of <n> objects.
  *
  * Examples:
  *   struct wlr_box *box = znew(*box);