2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-27 15:18:06 +00:00

dynamic-string: New function ds_cstr_ro().

This commit is contained in:
Ben Pfaff
2009-12-16 11:28:13 -08:00
parent ffed42ab73
commit 5f98eed4eb
2 changed files with 7 additions and 0 deletions

View File

@@ -219,6 +219,12 @@ ds_cstr(struct ds *ds)
return ds->string;
}
const char *
ds_cstr_ro(const struct ds *ds)
{
return ds_cstr((struct ds *) ds);
}
/* Returns a null-terminated string representing the current contents of 'ds',
* which the caller is expected to free with free(), then clears the contents
* of 'ds'. */