summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecStr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/vec/vecStr.h')
-rw-r--r--src/misc/vec/vecStr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/misc/vec/vecStr.h b/src/misc/vec/vecStr.h
index 5f04615c..4198ac82 100644
--- a/src/misc/vec/vecStr.h
+++ b/src/misc/vec/vecStr.h
@@ -80,6 +80,16 @@ static inline Vec_Str_t * Vec_StrAlloc( int nCap )
p->pArray = p->nCap? ABC_ALLOC( char, p->nCap ) : NULL;
return p;
}
+static inline Vec_Str_t * Vec_StrAllocExact( int nCap )
+{
+ Vec_Str_t * p;
+ assert( nCap >= 0 );
+ p = ABC_ALLOC( Vec_Str_t, 1 );
+ p->nSize = 0;
+ p->nCap = nCap;
+ p->pArray = p->nCap? ABC_ALLOC( char, p->nCap ) : NULL;
+ return p;
+}
/**Function*************************************************************