chiark / gitweb /
Remove redundant initialization of `sub'.
[mLib] / man / dstr.3
index 998e3f3260a3a69a8ffd04996fe91cbb66365c87..959a7aa756da5d29e5c928d7fcabc8b931dd592a 100644 (file)
@@ -103,6 +103,7 @@ typedef struct dstr {
   char *buf;           /* Pointer to string buffer */
   size_t sz;           /* Size of the buffer */
   size_t len;          /* Length of the string */
+  arena *a;            /* Pointer to arena */
 } dstr;
 .VE
 The
@@ -159,6 +160,14 @@ element is zero) and the nonexistent string (a null pointer).  Any
 whose
 .B len
 is zero is an empty string.
+.PP
+The
+.I a
+member refers to the arena from which the string's buffer has been
+allocated.  Immediately after creation, this is set to be
+.BR arena_stdlib (3);
+you can set it to point to any other arena of your choice before the
+buffer is allocated.
 .SS "Creation and destruction"
 The caller is responsible for allocating the
 .B dstr