summaryrefslogtreecommitdiff
path: root/lib/dynamic-string.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-12-16 11:28:13 -0800
committerBen Pfaff <blp@nicira.com>2009-12-16 11:28:13 -0800
commit5f98eed4eb5b75ab02422de1b5dbd5276ad5593d (patch)
tree76894db27ce3b572120ffa2c539cf1bfc5295e74 /lib/dynamic-string.c
parentffed42ab7320e8804dbc8cac9530397fc65a2c3c (diff)
downloadopenvswitch-5f98eed4eb5b75ab02422de1b5dbd5276ad5593d.tar.gz
dynamic-string: New function ds_cstr_ro().
Diffstat (limited to 'lib/dynamic-string.c')
-rw-r--r--lib/dynamic-string.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/dynamic-string.c b/lib/dynamic-string.c
index 527dee8ab..7f5e3fbaa 100644
--- a/lib/dynamic-string.c
+++ b/lib/dynamic-string.c
@@ -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'. */