diff options
| author | Paul Eggert | 2015-11-19 20:09:11 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-11-19 20:09:59 -0800 |
| commit | aa7dac899804727875cdb8fe267d37adcbe9705a (patch) | |
| tree | 7418cf4365ac5a647fe7d91cc818852671ac770b /src/emacs-module.c | |
| parent | de67fa4258293e18d8aacd6e0c3298f70dbafe32 (diff) | |
| download | emacs-aa7dac899804727875cdb8fe267d37adcbe9705a.tar.gz emacs-aa7dac899804727875cdb8fe267d37adcbe9705a.zip | |
Simplify push_handler and profile its malloc
* src/lisp.h (PUSH_HANDLER): Remove.
All callers changed to use push_handler directly.
* src/eval.c (internal_condition_case)
(internal_condition_case_1, internal_condition_case_2)
(internal_condition_case_n):
Use same pattern as for other invokers of push_handler.
(push_handler, push_handler_nosignal): Use call-by-value
instead of call-by-reference. All uses changed.
(push_handler): Simplify by rewriting in terms of
push_handler_nosignal.
(push_handler_nosignal): Profile any newly allocated memory.
Diffstat (limited to 'src/emacs-module.c')
| -rw-r--r-- | src/emacs-module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index f611c8ba600..e885af5de8f 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -194,8 +194,8 @@ static void module_wrong_type (emacs_env *, Lisp_Object, Lisp_Object); | |||
| 194 | #define MODULE_SETJMP_1(handlertype, handlerfunc, retval, c, dummy) \ | 194 | #define MODULE_SETJMP_1(handlertype, handlerfunc, retval, c, dummy) \ |
| 195 | do { \ | 195 | do { \ |
| 196 | eassert (module_non_local_exit_check (env) == emacs_funcall_exit_return); \ | 196 | eassert (module_non_local_exit_check (env) == emacs_funcall_exit_return); \ |
| 197 | struct handler *c; \ | 197 | struct handler *c = push_handler_nosignal (Qt, handlertype); \ |
| 198 | if (!push_handler_nosignal (&c, Qt, handlertype)) \ | 198 | if (!c) \ |
| 199 | { \ | 199 | { \ |
| 200 | module_out_of_memory (env); \ | 200 | module_out_of_memory (env); \ |
| 201 | return retval; \ | 201 | return retval; \ |