diff src/observer.h @ 125:1c1f28c124c9

Postponding free request when a subject is in subject_notify
author Thinker K.F. Li <thinker@branda.to>
date Tue, 16 Sep 2008 15:31:49 +0800
parents 9e2316dc6ecb
children 6ce68c1f7405
line wrap: on
line diff
--- a/src/observer.h	Tue Sep 16 14:55:24 2008 +0800
+++ b/src/observer.h	Tue Sep 16 15:31:49 2008 +0800
@@ -32,13 +32,15 @@
  * \see http://en.wikipedia.org/wiki/Observer_pattern
  */
 struct _subject {
-    int obj_type;		/*!< type of object (a.k.a. OBJT_*). */
-    void *obj;			/*!< the object this subject for. */
+    int obj_type;		/*!< \brief type of object (a.k.a. OBJT_*). */
+    void *obj;			/*!< \brief the object this subject for. */
     int flags;
     STAILQ(observer_t) observers;
 };
 /*! \brief Flag that make a subject to propagate events to parents. */
 #define SUBF_STOP_PROPAGATE 0x1
+#define SUBF_BUSY 0x2		/*!< \brief in subject_notify() */
+#define SUBF_FREE 0x4		/*!< \brief in postponding subject_free() */
 
 enum {OBJT_GEO, OBJT_COORD, OBJT_KB, OBJT_PROGM};