diff options
| author | Paul Eggert | 2017-11-13 08:51:41 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-11-13 10:16:52 -0800 |
| commit | d14956099d0daf0faa132b20e0fb0d46cae001be (patch) | |
| tree | 6e495f1c4f9ea10377941679b0fb2f26c8283246 /src | |
| parent | b1573a97e17b518723ab3f906eb6d521caed196d (diff) | |
| download | emacs-d14956099d0daf0faa132b20e0fb0d46cae001be.tar.gz emacs-d14956099d0daf0faa132b20e0fb0d46cae001be.zip | |
Simplify by removing HAVE_STRUCT_ATTRIBUTE_ALIGNED
* configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Remove. No longer
needed, since we no longer rely on __attribute__ ((aligned (8))).
All uses removed.
* src/emacs-module.c (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Remove.
(lisp_to_value): Simplify now that we no longer need to worry
whether HAVE_STRUCT_ATTRIBUTE_ALIGNED is false.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs-module.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 6bc91a7e06a..b351515c3bd 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c | |||
| @@ -998,10 +998,6 @@ lisp_to_value_bits (Lisp_Object o) | |||
| 998 | return (emacs_value) p; | 998 | return (emacs_value) p; |
| 999 | } | 999 | } |
| 1000 | 1000 | ||
| 1001 | #ifndef HAVE_STRUCT_ATTRIBUTE_ALIGNED | ||
| 1002 | enum { HAVE_STRUCT_ATTRIBUTE_ALIGNED = 0 }; | ||
| 1003 | #endif | ||
| 1004 | |||
| 1005 | /* Convert O to an emacs_value. Allocate storage if needed; this can | 1001 | /* Convert O to an emacs_value. Allocate storage if needed; this can |
| 1006 | signal if memory is exhausted. Must be an injective function. */ | 1002 | signal if memory is exhausted. Must be an injective function. */ |
| 1007 | static emacs_value | 1003 | static emacs_value |
| @@ -1029,19 +1025,6 @@ lisp_to_value (emacs_env *env, Lisp_Object o) | |||
| 1029 | /* Package the incompressible object pointer inside a pair | 1025 | /* Package the incompressible object pointer inside a pair |
| 1030 | that is compressible. */ | 1026 | that is compressible. */ |
| 1031 | Lisp_Object pair = Fcons (o, ltv_mark); | 1027 | Lisp_Object pair = Fcons (o, ltv_mark); |
| 1032 | |||
| 1033 | if (! HAVE_STRUCT_ATTRIBUTE_ALIGNED) | ||
| 1034 | { | ||
| 1035 | /* Keep calling Fcons until it returns a compressible pair. | ||
| 1036 | This shouldn't take long. */ | ||
| 1037 | while ((intptr_t) XCONS (pair) & (GCALIGNMENT - 1)) | ||
| 1038 | pair = Fcons (o, pair); | ||
| 1039 | |||
| 1040 | /* Plant the mark. The garbage collector will eventually | ||
| 1041 | reclaim any just-allocated incompressible pairs. */ | ||
| 1042 | XSETCDR (pair, ltv_mark); | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | v = (emacs_value) ((intptr_t) XCONS (pair) + Lisp_Cons); | 1028 | v = (emacs_value) ((intptr_t) XCONS (pair) + Lisp_Cons); |
| 1046 | } | 1029 | } |
| 1047 | 1030 | ||