soylent r276 - trunk/libsoylent



Author: svenp
Date: Mon Aug 11 21:55:03 2008
New Revision: 276
URL: http://svn.gnome.org/viewvc/soylent?rev=276&view=rev

Log:
solved mutual inclusion problem

Added:
   trunk/libsoylent/sl-mutual-inclusion.h
Modified:
   trunk/libsoylent/Makefile.am
   trunk/libsoylent/sl-group.c
   trunk/libsoylent/sl-group.h
   trunk/libsoylent/soylent.c
   trunk/libsoylent/soylent.h

Modified: trunk/libsoylent/Makefile.am
==============================================================================
--- trunk/libsoylent/Makefile.am	(original)
+++ trunk/libsoylent/Makefile.am	Mon Aug 11 21:55:03 2008
@@ -8,6 +8,7 @@
 
 libsoylent_la_SOURCES = \
 	soylent.h \
+  sl-mutual-inclusion.h \
 	sl-entity.h \
   sl-entity-eds.h \
   sl-attribute.h \

Modified: trunk/libsoylent/sl-group.c
==============================================================================
--- trunk/libsoylent/sl-group.c	(original)
+++ trunk/libsoylent/sl-group.c	Mon Aug 11 21:55:03 2008
@@ -62,7 +62,7 @@
   
   if (type == 0)
     {
-      type = g_type_register_static (SL_ENTITY_TYPE, "SlGroup", &info, 0);
+      type = g_type_register_static (G_TYPE_OBJECT, "SlGroup", &info, 0);
     }
   return type;
 }
@@ -85,14 +85,14 @@
   SlGroup *self = SL_GROUP (instance);
   SlGroupPriv *priv = g_new (SlGroupPriv, 1);
   self->priv = priv;
-  SL_ENTITY (self)->disposed = FALSE;
+  //SL_ENTITY (self)->disposed = FALSE;
 }
 
 static void
 sl_group_dispose (GObject *object)
 {
   SlGroup *self = SL_GROUP (object);
-  g_return_if_fail (!SL_ENTITY (self)->disposed);
+  //g_return_if_fail (!SL_ENTITY (self)->disposed);
   
   g_free (self->priv);
   

Modified: trunk/libsoylent/sl-group.h
==============================================================================
--- trunk/libsoylent/sl-group.h	(original)
+++ trunk/libsoylent/sl-group.h	Mon Aug 11 21:55:03 2008
@@ -26,7 +26,7 @@
 #ifndef SL_GROUP_H
 #define SL_GROUP_H
 
-#include "sl-entity-eds.h"
+#include "sl-group.h"
 
 #include <glib.h>
 #include <glib-object.h>
@@ -47,13 +47,13 @@
 
 struct _SlGroup
 {
-  SlEntity parent;
+  GObject parent;
   SlGroupPriv *priv;
 };
 
 struct _SlGroupClass
 {
-  SlEntityClass parent;
+  GObjectClass parent;
 };
 
 GType sl_group_get_type (void);

Added: trunk/libsoylent/sl-mutual-inclusion.h
==============================================================================
--- (empty file)
+++ trunk/libsoylent/sl-mutual-inclusion.h	Mon Aug 11 21:55:03 2008
@@ -0,0 +1,37 @@
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef SL_MUTUAL_INCLUSION_H
+#define SL_MUTUAL_INCLUSION_H
+
+typedef struct _SlEntity    SlEntity;
+typedef struct _SlAttribute SlAttribute;
+typedef struct _SlBook      SlBook;
+typedef struct _SlPerson    SlPerson;
+
+#include "sl-entity-eds.h"
+#include "sl-person.h"
+#include "sl-attribute-eds.h"
+#include "sl-book.h"
+
+#endif

Modified: trunk/libsoylent/soylent.c
==============================================================================
--- trunk/libsoylent/soylent.c	(original)
+++ trunk/libsoylent/soylent.c	Mon Aug 11 21:55:03 2008
@@ -21,7 +21,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "config.h"
 #include "soylent.h"
 
 #include <glib-object.h>

Modified: trunk/libsoylent/soylent.h
==============================================================================
--- trunk/libsoylent/soylent.h	(original)
+++ trunk/libsoylent/soylent.h	Mon Aug 11 21:55:03 2008
@@ -37,42 +37,13 @@
 #ifndef SOYLENT_H
 #define SOYLENT_H
 
-#define SL_ENABLE_DEBUG_ALL
-
-#define sl_debug(unit, format, ...) g_printerr ("dbg[%s]: ", unit); \
-                                    g_printerr (format, __VA_ARGS__); \
-                                    g_printerr ("\n")
-
-#ifdef SL_ENABLE_DEBUG_ALL
-  #define SL_ENABLE_DEBUG_BOOK
-  #define SL_ENABLE_DEBUG_ENTITY
-  #define SL_ENABLE_DEBUG_ATTRIBUTE
-#endif
-
-#ifdef SL_ENABLE_DEBUG_BOOK
-  #define sl_debug_book(format, ...) sl_debug ("Book", format, __VA_ARGS__)
-#else
-  #define sl_debug_book(format, ...)
-#endif
-#ifdef SL_ENABLE_DEBUG_ENTITY
-  #define sl_debug_entity(format, ...) sl_debug ("Entity", format, __VA_ARGS__)
-#else
-  #define sl_debug_entity(format, ...)
-#endif
-#ifdef SL_ENABLE_DEBUG_ATTRIBUTE
-  #define sl_debug_attribute(format, ...) sl_debug ("Attribute", format, __VA_ARGS__)
-#else
-  #define sl_debug_attribute(format, ...)
-#endif
-
+#include "config.h"
+#include "sl-marshal.h"
+#include "sl-mutual-inclusion.h"
 #include "sl-entity.h"
-#include "sl-entity-eds.h"
 #include "sl-attribute.h"
-#include "sl-attribute-eds.h"
 #include "sl-attributes.h"
-#include "sl-person.h"
 #include "sl-group.h"
-#include "sl-book.h"
 
 gboolean sl_init (GError **error);
 void sl_cleanup (void);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]