summary refs log tree commit diff stats
path: root/include/qapi/error-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/qapi/error-internal.h')
-rw-r--r--include/qapi/error-internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/qapi/error-internal.h b/include/qapi/error-internal.h
index d5c3904ade..1ec3ceb40f 100644
--- a/include/qapi/error-internal.h
+++ b/include/qapi/error-internal.h
@@ -18,7 +18,14 @@ struct Error
 {
     char *msg;
     ErrorClass err_class;
-    const char *src, *func;
+    const char *func;
+
+    /*
+     * src might be NUL-terminated or not.  If it is, src_len is negative.
+     * If it is not, src_len is the length.
+     */
+    const char *src;
+    int src_len;
     int line;
     GString *hint;
 };