Luiz Capitulino wrote:
> Signed-off-by: Luiz Capitulino
Didn't care if we copy/incref the dictionaries as Paolo suggests.
Both work for me.
Later, Juan.
On 02/15/2012 02:05 PM, Luiz Capitulino wrote:
>> > QDicts should be constant once they've
>> > been built.
> I think you meant QErrors?
I meant QDicts included in Errors.
> > (Also, I would refcount Errors rather than copy them, but
> > that's a personal preference and I do not really object t
On Wed, 15 Feb 2012 10:04:50 +0100
Paolo Bonzini wrote:
> On 02/10/2012 08:31 PM, Luiz Capitulino wrote:
> > +err_new = g_malloc0(sizeof(*err));
> > +err_new->obj = qdict_copy(err->obj);
> > +err_new->msg = g_strdup(err->msg);
> > +err_new->fmt = err->fmt;
> > +
> > +return er
On 02/10/2012 08:31 PM, Luiz Capitulino wrote:
> +err_new = g_malloc0(sizeof(*err));
> +err_new->obj = qdict_copy(err->obj);
> +err_new->msg = g_strdup(err->msg);
> +err_new->fmt = err->fmt;
> +
> +return err_new;
> +}
Why isn't an incref sufficient? QDicts should be constant
Signed-off-by: Luiz Capitulino
---
error.c | 12
error.h |5 +
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/error.c b/error.c
index 990050f..d85e136 100644
--- a/error.c
+++ b/error.c
@@ -43,6 +43,18 @@ void error_set(Error **errp, const char *fmt, ...)