- added Dyn2Cstring (convert to C string and free dyn string)

This commit is contained in:
zolliker
2012-06-19 06:53:08 +00:00
parent c8a492e2de
commit 23f539a449
2 changed files with 17 additions and 0 deletions

View File

@ -280,3 +280,16 @@ int DynStringBackspace(pDynString self)
}
return 1;
}
/*---------------------------------------------------------------------------*/
char *Dyn2Cstring(pDynString self) {
char *result;
assert(self);
assert(self->iMAGIC == DYNMAGIC);
result = self->pBuffer;
free(self);
return result;
}