diff options
| author | Paul Eggert | 2012-09-12 14:34:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-12 14:34:24 -0700 |
| commit | 40bce90baad677cd631c27819b32cca9c5d3a1ab (patch) | |
| tree | 7c096868112d49bbe3066739bdf007c67a1919e3 /src/eval.c | |
| parent | a9f9d9de77e246af750ce5304320b0f66a085ea9 (diff) | |
| download | emacs-40bce90baad677cd631c27819b32cca9c5d3a1ab.tar.gz emacs-40bce90baad677cd631c27819b32cca9c5d3a1ab.zip | |
More fixes for 'volatile' and setjmp/longjmp.
* eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
* image.c (struct png_load_context) [HAVE_PNG]: New type.
(png_load_body) [HAVE_PNG]:
(jpeg_load_body) [HAVE_JPEG]:
New function, with most of the old parent function's body.
(png_load) [HAVE_PNG]:
(jpeg_load) [HAVE_JPEG]:
Invoke the new function, to avoid longjmp munging our locals.
(struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
(my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
longjmp is passed 2, as the C standard doesn't guarantee this.
Instead, store the failure code into mgr->failure_code.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c index 8a8a507a1b6..3c0c65e9366 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -707,7 +707,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) | |||
| 707 | else | 707 | else |
| 708 | { /* Check if there is really a global binding rather than just a let | 708 | { /* Check if there is really a global binding rather than just a let |
| 709 | binding that shadows the global unboundness of the var. */ | 709 | binding that shadows the global unboundness of the var. */ |
| 710 | volatile struct specbinding *pdl = specpdl_ptr; | 710 | struct specbinding *pdl = specpdl_ptr; |
| 711 | while (pdl > specpdl) | 711 | while (pdl > specpdl) |
| 712 | { | 712 | { |
| 713 | if (EQ ((--pdl)->symbol, sym) && !pdl->func | 713 | if (EQ ((--pdl)->symbol, sym) && !pdl->func |
| @@ -1204,12 +1204,9 @@ See also the function `signal' for more info. | |||
| 1204 | usage: (condition-case VAR BODYFORM &rest HANDLERS) */) | 1204 | usage: (condition-case VAR BODYFORM &rest HANDLERS) */) |
| 1205 | (Lisp_Object args) | 1205 | (Lisp_Object args) |
| 1206 | { | 1206 | { |
| 1207 | register Lisp_Object bodyform, handlers; | 1207 | Lisp_Object var = Fcar (args); |
| 1208 | volatile Lisp_Object var; | 1208 | Lisp_Object bodyform = Fcar (Fcdr (args)); |
| 1209 | 1209 | Lisp_Object handlers = Fcdr (Fcdr (args)); | |
| 1210 | var = Fcar (args); | ||
| 1211 | bodyform = Fcar (Fcdr (args)); | ||
| 1212 | handlers = Fcdr (Fcdr (args)); | ||
| 1213 | 1210 | ||
| 1214 | return internal_lisp_condition_case (var, bodyform, handlers); | 1211 | return internal_lisp_condition_case (var, bodyform, handlers); |
| 1215 | } | 1212 | } |