diff options
| author | Paul Eggert | 2013-07-17 10:24:54 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-17 10:24:54 -0700 |
| commit | a0931322f6c257bb4a4a678f62dcb4ae3b253221 (patch) | |
| tree | 2c597df44098b26fb66026354ef17738ee922635 /src/lisp.h | |
| parent | 5dc8a629877b040a5dd5904815ed885949614948 (diff) | |
| download | emacs-a0931322f6c257bb4a4a678f62dcb4ae3b253221.tar.gz emacs-a0931322f6c257bb4a4a678f62dcb4ae3b253221.zip | |
* lread.c: Fix file descriptor leaks and errno issues.
(Fload): Close some races that leaked fds or streams when 'load'
was interrupted.
(Fload, openp): Report error number of last nontrivial failure to open.
ENOENT counts as trivial.
* eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
New functions.
* fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
now that the function is always called with a nonnegative arg.
* lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
All uses replaced with ...
(clear_unwind_protect, set_unwind_protect_ptr): New decls.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/lisp.h b/src/lisp.h index 26e9e18ec9a..231dbee2d21 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2744,18 +2744,6 @@ SPECPDL_INDEX (void) | |||
| 2744 | return specpdl_ptr - specpdl; | 2744 | return specpdl_ptr - specpdl; |
| 2745 | } | 2745 | } |
| 2746 | 2746 | ||
| 2747 | LISP_INLINE void | ||
| 2748 | set_unwind_protect_ptr (ptrdiff_t count, void *arg) | ||
| 2749 | { | ||
| 2750 | specpdl[count].unwind_ptr.arg = arg; | ||
| 2751 | } | ||
| 2752 | |||
| 2753 | LISP_INLINE void | ||
| 2754 | set_unwind_protect_int (ptrdiff_t count, int arg) | ||
| 2755 | { | ||
| 2756 | specpdl[count].unwind_int.arg = arg; | ||
| 2757 | } | ||
| 2758 | |||
| 2759 | /* Everything needed to describe an active condition case. | 2747 | /* Everything needed to describe an active condition case. |
| 2760 | 2748 | ||
| 2761 | Members are volatile if their values need to survive _longjmp when | 2749 | Members are volatile if their values need to survive _longjmp when |
| @@ -3755,6 +3743,8 @@ extern void record_unwind_protect (void (*) (Lisp_Object), Lisp_Object); | |||
| 3755 | extern void record_unwind_protect_int (void (*) (int), int); | 3743 | extern void record_unwind_protect_int (void (*) (int), int); |
| 3756 | extern void record_unwind_protect_ptr (void (*) (void *), void *); | 3744 | extern void record_unwind_protect_ptr (void (*) (void *), void *); |
| 3757 | extern void record_unwind_protect_void (void (*) (void)); | 3745 | extern void record_unwind_protect_void (void (*) (void)); |
| 3746 | extern void clear_unwind_protect (ptrdiff_t); | ||
| 3747 | extern void set_unwind_protect_ptr (ptrdiff_t, void (*) (void *), void *); | ||
| 3758 | extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); | 3748 | extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); |
| 3759 | extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); | 3749 | extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); |
| 3760 | extern _Noreturn void verror (const char *, va_list) | 3750 | extern _Noreturn void verror (const char *, va_list) |