aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert2013-07-17 10:24:54 -0700
committerPaul Eggert2013-07-17 10:24:54 -0700
commita0931322f6c257bb4a4a678f62dcb4ae3b253221 (patch)
tree2c597df44098b26fb66026354ef17738ee922635 /src/lisp.h
parent5dc8a629877b040a5dd5904815ed885949614948 (diff)
downloademacs-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.h14
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
2747LISP_INLINE void
2748set_unwind_protect_ptr (ptrdiff_t count, void *arg)
2749{
2750 specpdl[count].unwind_ptr.arg = arg;
2751}
2752
2753LISP_INLINE void
2754set_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);
3755extern void record_unwind_protect_int (void (*) (int), int); 3743extern void record_unwind_protect_int (void (*) (int), int);
3756extern void record_unwind_protect_ptr (void (*) (void *), void *); 3744extern void record_unwind_protect_ptr (void (*) (void *), void *);
3757extern void record_unwind_protect_void (void (*) (void)); 3745extern void record_unwind_protect_void (void (*) (void));
3746extern void clear_unwind_protect (ptrdiff_t);
3747extern void set_unwind_protect_ptr (ptrdiff_t, void (*) (void *), void *);
3758extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); 3748extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object);
3759extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); 3749extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2);
3760extern _Noreturn void verror (const char *, va_list) 3750extern _Noreturn void verror (const char *, va_list)