diff options
| author | Philipp Stephani | 2017-06-05 10:19:59 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-06-05 10:19:59 +0200 |
| commit | 13e9493ea36df04e2c6b69e9b316d40c072ee88b (patch) | |
| tree | 18e96bba89602d9b3a337bdd7f5182a7e1b16168 /src | |
| parent | 98e107ff0ca39027420a2ea100037402d23a0ea0 (diff) | |
| download | emacs-13e9493ea36df04e2c6b69e9b316d40c072ee88b.tar.gz emacs-13e9493ea36df04e2c6b69e9b316d40c072ee88b.zip | |
Inline module_has_cleanup
This constant is only used once, and we fail compilation anyway if
it's false.
* src/emacs-module.c (MODULE_SETJMP_1): Inline __has_attribute.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 8ddf157b39f..71e04d869e9 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -37,12 +37,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 37 | 37 | ||
| 38 | /* Feature tests. */ | 38 | /* Feature tests. */ |
| 39 | 39 | ||
| 40 | #if __has_attribute (cleanup) | ||
| 41 | enum { module_has_cleanup = true }; | ||
| 42 | #else | ||
| 43 | enum { module_has_cleanup = false }; | ||
| 44 | #endif | ||
| 45 | |||
| 46 | #ifdef WINDOWSNT | 40 | #ifdef WINDOWSNT |
| 47 | #include <windows.h> | 41 | #include <windows.h> |
| 48 | #include "w32term.h" | 42 | #include "w32term.h" |
| @@ -168,7 +162,7 @@ static emacs_value const module_nil = 0; | |||
| 168 | module_out_of_memory (env); \ | 162 | module_out_of_memory (env); \ |
| 169 | return retval; \ | 163 | return retval; \ |
| 170 | } \ | 164 | } \ |
| 171 | verify (module_has_cleanup); \ | 165 | verify (__has_attribute (cleanup)); \ |
| 172 | struct handler *c __attribute__ ((cleanup (module_reset_handlerlist))) \ | 166 | struct handler *c __attribute__ ((cleanup (module_reset_handlerlist))) \ |
| 173 | = c0; \ | 167 | = c0; \ |
| 174 | if (sys_setjmp (c->jmp)) \ | 168 | if (sys_setjmp (c->jmp)) \ |