]> git.wincent.com - wikitext.git/commitdiff
Remove unused str_new_size function
authorWincent Colaiuta <win@wincent.com>
Mon, 11 May 2009 19:26:44 +0000 (21:26 +0200)
committerWincent Colaiuta <win@wincent.com>
Mon, 11 May 2009 19:26:44 +0000 (21:26 +0200)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/str.c
ext/str.h

index 0ee2c51f91b9c9a42ff86ccd7372ae3ee54f723f..322a9f3aefcf49eee3f6ce9619963cca91ff42b0 100644 (file)
--- a/ext/str.c
+++ b/ext/str.c
@@ -36,15 +36,6 @@ str_t *str_new(void)
     return str;
 }
 
-str_t *str_new_size(long len)
-{
-    str_t *str      = ALLOC_N(str_t, 1);
-    str->ptr        = ALLOC_N(char, len + STR_OVERALLOC);
-    str->len        = 0;
-    str->capacity   = len + STR_OVERALLOC;
-    return str;
-}
-
 str_t *str_new_copy(const char *src, long len)
 {
     str_t *str      = ALLOC_N(str_t, 1);
index ff0bb05d855f90173f48fefe2dda2b1a065407ab..ea681f50b37a6adcd1c129e6cb41cb7a12a48557 100644 (file)
--- a/ext/str.h
+++ b/ext/str.h
@@ -37,9 +37,6 @@ typedef struct
 // create a new, empty string struct
 str_t *str_new(void);
 
-// create a new, empty string struct with capacity len
-str_t *str_new_size(long len);
-
 // create a new string struct and initialize it with a copy of the buffer of length len pointed to by src
 str_t *str_new_copy(const char *src, long len);