diff options
| author | Paul Eggert | 2018-08-13 15:45:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-08-13 15:55:53 -0700 |
| commit | 76101698a770d389f22b547c331ec78473040c47 (patch) | |
| tree | 411115b04cec15dcc216e67818080221dbdaecf5 /src/lisp.h | |
| parent | eb787d749f28583906428269b926fa83aef092b9 (diff) | |
| download | emacs-76101698a770d389f22b547c331ec78473040c47.tar.gz emacs-76101698a770d389f22b547c331ec78473040c47.zip | |
Fix check for unsafe watch descriptor
* src/lisp.h (make_pointer_integer_unsafe): New function.
(make_pointer_integer): Use it.
* src/gfilenotify.c (dir_monitor_callback): Omit redundant eassert.
(Fgfile_add_watch): Signal an error instead of failing an
assertion if the pointer does not work.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h index b7ef8dc63a0..18d53537cca 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1189,9 +1189,15 @@ XFIXNUMPTR (Lisp_Object a) | |||
| 1189 | } | 1189 | } |
| 1190 | 1190 | ||
| 1191 | INLINE Lisp_Object | 1191 | INLINE Lisp_Object |
| 1192 | make_pointer_integer_unsafe (void *p) | ||
| 1193 | { | ||
| 1194 | return TAG_PTR (Lisp_Int0, p); | ||
| 1195 | } | ||
| 1196 | |||
| 1197 | INLINE Lisp_Object | ||
| 1192 | make_pointer_integer (void *p) | 1198 | make_pointer_integer (void *p) |
| 1193 | { | 1199 | { |
| 1194 | Lisp_Object a = TAG_PTR (Lisp_Int0, p); | 1200 | Lisp_Object a = make_pointer_integer_unsafe (p); |
| 1195 | eassert (FIXNUMP (a) && XFIXNUMPTR (a) == p); | 1201 | eassert (FIXNUMP (a) && XFIXNUMPTR (a) == p); |
| 1196 | return a; | 1202 | return a; |
| 1197 | } | 1203 | } |