Patchwork [34/34] error, qerror: drop QDict member

login
register
mail settings
Submitter Luiz Capitulino
Date Aug. 2, 2012, 1:02 a.m.
Message ID <1343869374-23417-35-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/174647/
State New
Headers show

Comments

Luiz Capitulino - Aug. 2, 2012, 1:02 a.m.
Used to store error information, but it's unused now.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 error.c  | 4 ----
 qerror.c | 4 ----
 qerror.h | 1 -
 3 files changed, 9 deletions(-)

Patch

diff --git a/error.c b/error.c
index 5c6c90f..b07ffa0 100644
--- a/error.c
+++ b/error.c
@@ -19,7 +19,6 @@ 
 
 struct Error
 {
-    QDict *obj;
     char *msg;
     ErrorClass err_class;
 };
@@ -53,8 +52,6 @@  Error *error_copy(const Error *err)
     err_new = g_malloc0(sizeof(*err));
     err_new->msg = g_strdup(err->msg);
     err_new->err_class = err->err_class;
-    err_new->obj = err->obj;
-    QINCREF(err_new->obj);
 
     return err_new;
 }
@@ -77,7 +74,6 @@  ErrorClass error_get_class(const Error *err)
 void error_free(Error *err)
 {
     if (err) {
-        QDECREF(err->obj);
         g_free(err->msg);
         g_free(err);
     }
diff --git a/qerror.c b/qerror.c
index e1606d3..6d924fb 100644
--- a/qerror.c
+++ b/qerror.c
@@ -102,7 +102,6 @@  void qerror_report(ErrorClass eclass, const char *fmt, ...)
 /* Evil... */
 struct Error
 {
-    QDict *obj;
     char *msg;
     ErrorClass err_class;
 };
@@ -113,8 +112,6 @@  void qerror_report_err(Error *err)
 
     qerr = qerror_new();
     loc_save(&qerr->loc);
-    QINCREF(err->obj);
-    qerr->error = err->obj;
     qerr->err_msg = g_strdup(err->msg);
     qerr->err_class = err->err_class;
 
@@ -156,7 +153,6 @@  static void qerror_destroy_obj(QObject *obj)
     assert(obj != NULL);
     qerr = qobject_to_qerror(obj);
 
-    QDECREF(qerr->error);
     g_free(qerr->err_msg);
     g_free(qerr);
 }
diff --git a/qerror.h b/qerror.h
index 2299e00..3f17c52 100644
--- a/qerror.h
+++ b/qerror.h
@@ -21,7 +21,6 @@ 
 
 typedef struct QError {
     QObject_HEAD;
-    QDict *error;
     Location loc;
     char *err_msg;
     ErrorClass err_class;