Port to clang 3.8.0
It does not allow a for-loop's control var to be an anonymous struct. * src/lisp.h (struct for_each_tail_internal): New type. (FOR_EACH_TAIL_INTERNAL): Use it.
This commit is contained in:
parent
c3ee4d2860
commit
d45dbccc5d
1 changed files with 9 additions and 3 deletions
12
src/lisp.h
12
src/lisp.h
|
@ -4603,6 +4603,14 @@ enum
|
|||
#define FOR_EACH_TAIL_SAFE(list) \
|
||||
FOR_EACH_TAIL_INTERNAL (list, (void) 0, (void) (li.tail = Qnil), false)
|
||||
|
||||
/* Iterator intended for use only within FOR_EACH_TAIL_INTERNAL. */
|
||||
struct for_each_tail_internal
|
||||
{
|
||||
Lisp_Object tail, tortoise;
|
||||
intptr_t max, n;
|
||||
unsigned short int q;
|
||||
};
|
||||
|
||||
/* Like FOR_EACH_TAIL (LIST), except evaluate DOTTED or CYCLE,
|
||||
respectively, if a dotted list or cycle is found, and check for
|
||||
quit if CHECK_QUIT. This is an internal macro intended for use
|
||||
|
@ -4619,9 +4627,7 @@ enum
|
|||
is little point to calling maybe_quit here. */
|
||||
|
||||
#define FOR_EACH_TAIL_INTERNAL(list, dotted, cycle, check_quit) \
|
||||
for (struct { Lisp_Object tail, tortoise; intptr_t max, n; \
|
||||
unsigned short int q; \
|
||||
} li = { list, list, 2, 0, 2 }; \
|
||||
for (struct for_each_tail_internal li = { list, list, 2, 0, 2 }; \
|
||||
CONSP (li.tail) || (dotted, false); \
|
||||
(li.tail = XCDR (li.tail), \
|
||||
((--li.q != 0 \
|
||||
|
|
Loading…
Add table
Reference in a new issue