str: New function ss_realloc().
[pspp-builds.git] / src / libpspp / str.c
index 7b677225b94b218eab09a096d2b0d6c1da23f82e..25e2cfd54872d2b1e232b8673cf8075fb6465bf4 100644 (file)
@@ -341,6 +341,12 @@ ss_alloc_uninit (struct substring *new, size_t cnt)
   new->length = cnt;
 }
 
+void
+ss_realloc (struct substring *ss, size_t size)
+{
+  ss->string = xrealloc (ss->string, size);
+}
+
 /* Makes a pool_alloc_unaligned()'d copy of the contents of OLD
    in POOL, and stores it in NEW. */
 void