summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-01-30 14:55:36 +0000
committerLennart Poettering <lennart@poettering.net>2006-01-30 14:55:36 +0000
commita175f7e7e86c8540e74e679eeecd18f036f20a8c (patch)
treefc6338d5e0de20c05c63fd6e5fa371849007d02c
parent122888da8fc979af8d10392b83f6a69d313d187a (diff)
Move AvahiPoll structure into read-only memory
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1116 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r--avahi-qt/qt-watch.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/avahi-qt/qt-watch.cpp b/avahi-qt/qt-watch.cpp
index 5b49845..f29b517 100644
--- a/avahi-qt/qt-watch.cpp
+++ b/avahi-qt/qt-watch.cpp
@@ -177,19 +177,19 @@ static void q_timeout_free(AvahiTimeout *t)
delete t;
}
-static AvahiPoll qt_poll;
-
const AvahiPoll* avahi_qt_poll_get(void)
{
- qt_poll.userdata=0;
- qt_poll.watch_new = q_watch_new;
- qt_poll.watch_free = q_watch_free;
- qt_poll.watch_update = q_watch_update;
- qt_poll.watch_get_events = q_watch_get_events;
-
- qt_poll.timeout_new = q_timeout_new;
- qt_poll.timeout_free = q_timeout_free;
- qt_poll.timeout_update = q_timeout_update;
+ static const AvahiPoll qt_poll = {
+ NULL,
+ q_watch_new,
+ q_watch_update,
+ q_watch_get_events,
+ q_watch_free,
+ q_timeout_new,
+ q_timeout_update,
+ q_timeout_free
+ };
+
return &qt_poll;
}