Mercurial > MadButterfly
diff src/observer.c @ 77:a6763f080da5
-
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 20 Aug 2008 00:32:11 +0800 |
parents | 3e3e074120a7 |
children | 1c1f28c124c9 |
line wrap: on
line diff
--- a/src/observer.c Tue Aug 19 19:14:01 2008 +0800 +++ b/src/observer.c Wed Aug 20 00:32:11 2008 +0800 @@ -32,7 +32,9 @@ void subject_notify(ob_factory_t *factory, subject_t *subject, event_t *evt) { observer_t *observer; + evt->tgt = subject; while(subject) { + evt->cur_tgt = subject->obj; for(observer = STAILQ_HEAD(subject->observers); observer != NULL; observer = STAILQ_NEXT(observer_t, next, observer)) {