diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/dbusbind.c | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a2bf1fe39cf..2b71a06ae4a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2011-04-30 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * dbusbind.c: Do not use XPNTR on a value that may be an integer. | ||
| 4 | Reported by Stefan Monnier in | ||
| 5 | <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>. | ||
| 6 | (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages): Use | ||
| 7 | SYMBOLP-guarded XSYMBOL, not XPNTR. | ||
| 8 | |||
| 1 | 2011-04-29 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2011-04-29 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 10 | ||
| 3 | * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t. | 11 | * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t. |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 06feec3e792..76035341540 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -892,7 +892,7 @@ xd_remove_watch (DBusWatch *watch, void *data) | |||
| 892 | return; | 892 | return; |
| 893 | 893 | ||
| 894 | /* Unset session environment. */ | 894 | /* Unset session environment. */ |
| 895 | if (data != NULL && data == (void *) XPNTR (QCdbus_session_bus)) | 895 | if (SYMBOLP (QCdbus_session_bus) && XSYMBOL (QCdbus_session_bus) == data) |
| 896 | { | 896 | { |
| 897 | XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); | 897 | XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); |
| 898 | unsetenv ("DBUS_SESSION_BUS_ADDRESS"); | 898 | unsetenv ("DBUS_SESSION_BUS_ADDRESS"); |
| @@ -920,6 +920,8 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0, | |||
| 920 | { | 920 | { |
| 921 | DBusConnection *connection; | 921 | DBusConnection *connection; |
| 922 | 922 | ||
| 923 | CHECK_SYMBOL (bus); | ||
| 924 | |||
| 923 | /* Open a connection to the bus. */ | 925 | /* Open a connection to the bus. */ |
| 924 | connection = xd_initialize (bus, TRUE); | 926 | connection = xd_initialize (bus, TRUE); |
| 925 | 927 | ||
| @@ -929,7 +931,7 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0, | |||
| 929 | xd_add_watch, | 931 | xd_add_watch, |
| 930 | xd_remove_watch, | 932 | xd_remove_watch, |
| 931 | xd_toggle_watch, | 933 | xd_toggle_watch, |
| 932 | (void *) XPNTR (bus), NULL)) | 934 | XSYMBOL (bus), NULL)) |
| 933 | XD_SIGNAL1 (build_string ("Cannot add watch functions")); | 935 | XD_SIGNAL1 (build_string ("Cannot add watch functions")); |
| 934 | 936 | ||
| 935 | /* Add bus to list of registered buses. */ | 937 | /* Add bus to list of registered buses. */ |
| @@ -1824,7 +1826,7 @@ xd_read_queued_messages (int fd, void *data, int for_read) | |||
| 1824 | if (data != NULL) | 1826 | if (data != NULL) |
| 1825 | while (!NILP (busp)) | 1827 | while (!NILP (busp)) |
| 1826 | { | 1828 | { |
| 1827 | if (data == (void *) XPNTR (CAR_SAFE (busp))) | 1829 | if (SYMBOLP (CAR_SAFE (busp)) && XSYMBOL (CAR_SAFE (busp)) == data) |
| 1828 | bus = CAR_SAFE (busp); | 1830 | bus = CAR_SAFE (busp); |
| 1829 | busp = CDR_SAFE (busp); | 1831 | busp = CDR_SAFE (busp); |
| 1830 | } | 1832 | } |