diff options
| author | Lars Ingebrigtsen | 2021-10-25 02:19:39 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-10-25 02:19:44 +0200 |
| commit | 83f1e4b3bcb9e651267adba79fed0a229263183e (patch) | |
| tree | 1f3ff790b3d05b5b70a577224d06e8560a1795a0 /src/eval.c | |
| parent | 057f45abeced1c81bd9bb2782ab6a8fe472f38c8 (diff) | |
| download | emacs-83f1e4b3bcb9e651267adba79fed0a229263183e.tar.gz emacs-83f1e4b3bcb9e651267adba79fed0a229263183e.zip | |
Fix issues with type casting in delayed message functions
* src/eval.c (with_delayed_message_display)
(with_delayed_message_cancel, Ffuncall_with_delayed_message): Fix
some type confusion.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c index 110b67b587f..94ad0607732 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1082,12 +1082,13 @@ usage: (while TEST BODY...) */) | |||
| 1082 | static void | 1082 | static void |
| 1083 | with_delayed_message_display (struct atimer *timer) | 1083 | with_delayed_message_display (struct atimer *timer) |
| 1084 | { | 1084 | { |
| 1085 | message3 (timer->client_data); | 1085 | message3 (build_string (timer->client_data)); |
| 1086 | } | 1086 | } |
| 1087 | 1087 | ||
| 1088 | static void | 1088 | static void |
| 1089 | with_delayed_message_cancel (void *timer) | 1089 | with_delayed_message_cancel (void *timer) |
| 1090 | { | 1090 | { |
| 1091 | xfree (((struct atimer *) timer)->client_data); | ||
| 1091 | cancel_atimer (timer); | 1092 | cancel_atimer (timer); |
| 1092 | } | 1093 | } |
| 1093 | 1094 | ||
| @@ -1111,13 +1112,11 @@ is not displayed. */) | |||
| 1111 | struct timespec interval = dtotimespec (XFLOATINT (timeout)); | 1112 | struct timespec interval = dtotimespec (XFLOATINT (timeout)); |
| 1112 | struct atimer *timer = start_atimer (ATIMER_RELATIVE, interval, | 1113 | struct atimer *timer = start_atimer (ATIMER_RELATIVE, interval, |
| 1113 | with_delayed_message_display, | 1114 | with_delayed_message_display, |
| 1114 | message); | 1115 | xstrdup (SSDATA (message))); |
| 1115 | record_unwind_protect_ptr (with_delayed_message_cancel, timer); | 1116 | record_unwind_protect_ptr (with_delayed_message_cancel, timer); |
| 1116 | 1117 | ||
| 1117 | Lisp_Object result = CALLN (Ffuncall, function); | 1118 | Lisp_Object result = CALLN (Ffuncall, function); |
| 1118 | 1119 | ||
| 1119 | cancel_atimer (timer); | ||
| 1120 | |||
| 1121 | return unbind_to (count, result); | 1120 | return unbind_to (count, result); |
| 1122 | } | 1121 | } |
| 1123 | 1122 | ||