summary refs log tree commit diff stats
path: root/qobject/qstring.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-04-05 08:55:14 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-05 08:55:14 -0500
commit150a470b64c548b7539ea47526f345f15ebac355 (patch)
tree5695dfe2c53f2d958e7999fb8e9d48a8b67c38b2 /qobject/qstring.c
parentd05ef160453e98546a4197496dc8a3cb2defac53 (diff)
parent4bf0bb8014ac2ac61b1004f5d92b2a4594d48017 (diff)
downloadfocaccia-qemu-150a470b64c548b7539ea47526f345f15ebac355.tar.gz
focaccia-qemu-150a470b64c548b7539ea47526f345f15ebac355.zip
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Luiz Capitulino
# Via Luiz Capitulino
* luiz/queue/qmp:
  chardev: drop the Memory chardev driver
  hmp: human-monitor-command: stop using the Memory chardev driver
  Monitor: Make output buffer dynamic
  qstring: add qstring_get_length()
Diffstat (limited to 'qobject/qstring.c')
-rw-r--r--qobject/qstring.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/qobject/qstring.c b/qobject/qstring.c
index 5f7376c336..607b7a142c 100644
--- a/qobject/qstring.c
+++ b/qobject/qstring.c
@@ -32,6 +32,14 @@ QString *qstring_new(void)
 }
 
 /**
+ * qstring_get_length(): Get the length of a QString
+ */
+size_t qstring_get_length(const QString *qstring)
+{
+    return qstring->length;
+}
+
+/**
  * qstring_from_substr(): Create a new QString from a C string substring
  *
  * Return string reference