---
 src/libpspp/str.c |    6 ++++++
 src/libpspp/str.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/libpspp/str.c b/src/libpspp/str.c
index 7b67722..25e2cfd 100644
--- a/src/libpspp/str.c
+++ b/src/libpspp/str.c
@@ -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
diff --git a/src/libpspp/str.h b/src/libpspp/str.h
index ddfd2f8..c691f9f 100644
--- a/src/libpspp/str.h
+++ b/src/libpspp/str.h
@@ -85,6 +85,7 @@ struct substring ss_tail (struct substring, size_t);
 struct pool;
 void ss_alloc_substring (struct substring *, struct substring);
 void ss_alloc_uninit (struct substring *, size_t);
+void ss_realloc (struct substring *, size_t);
 void ss_alloc_substring_pool (struct substring *, struct substring,
                               struct pool *);
 void ss_alloc_uninit_pool (struct substring *, size_t, struct pool *);
-- 
1.7.2.3


_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to