summaryrefslogtreecommitdiffstats
path: root/src/misc/vec/vecInt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/vec/vecInt.h')
-rw-r--r--src/misc/vec/vecInt.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/misc/vec/vecInt.h b/src/misc/vec/vecInt.h
index a0527ab9..dd478a1c 100644
--- a/src/misc/vec/vecInt.h
+++ b/src/misc/vec/vecInt.h
@@ -327,6 +327,13 @@ static inline int * Vec_IntReleaseArray( Vec_Int_t * p )
p->pArray = NULL;
return pArray;
}
+static inline int * Vec_IntReleaseNewArray( Vec_Int_t * p )
+{
+ int * pArray = ABC_ALLOC( int, p->nSize+1 );
+ pArray[0] = p->nSize+1;
+ memcpy( pArray+1, p->pArray, sizeof(int)*p->nSize );
+ return pArray;
+}
/**Function*************************************************************