comparison src/fns.c @ 5394:484b437fc7b4

Correct some nesting of GCPRO and UNGCPRO, thank you Mats' buildbot! 2011-04-04 Aidan Kehoe <kehoea@parhasard.net> * fns.c (FremoveX): * fns.c (sublis): Correct some nesting of GCPRO and UNGCPRO here, revealed by the the C++ build compiling core Lisp. Thank you Mats' buildbot!
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 04 Apr 2011 09:12:39 +0100
parents e99b473303e3
children ccf7e84fe265
comparison
equal deleted inserted replaced
5393:e99b473303e3 5394:484b437fc7b4
3656 GC_EXTERNAL_LIST_LOOP_3 (elt, sequence, tailing) 3656 GC_EXTERNAL_LIST_LOOP_3 (elt, sequence, tailing)
3657 { 3657 {
3658 if (EQ (tail, tailing)) 3658 if (EQ (tail, tailing))
3659 { 3659 {
3660 XUNGCPRO (elt); 3660 XUNGCPRO (elt);
3661 UNGCPRO;
3661 3662
3662 if (NILP (result)) 3663 if (NILP (result))
3663 { 3664 {
3664 return XCDR (tail); 3665 return XCDR (tail);
3665 } 3666 }
9145 END_GC_EXTERNAL_LIST_LOOP (elt); 9146 END_GC_EXTERNAL_LIST_LOOP (elt);
9146 } 9147 }
9147 9148
9148 if (!CONSP (tree)) 9149 if (!CONSP (tree))
9149 { 9150 {
9150 RETURN_UNGCPRO (tree); 9151 return tree;
9151 } 9152 }
9152 9153
9153 aa = sublis (alist, XCAR (tree), check_test, test_not_unboundp, test, key, 9154 aa = sublis (alist, XCAR (tree), check_test, test_not_unboundp, test, key,
9154 depth + 1); 9155 depth + 1);
9155 dd = sublis (alist, XCDR (tree), check_test, test_not_unboundp, test, key, 9156 dd = sublis (alist, XCDR (tree), check_test, test_not_unboundp, test, key,
9156 depth + 1); 9157 depth + 1);
9157 9158
9158 if (EQ (aa, XCAR (tree)) && EQ (dd, XCDR (tree))) 9159 if (EQ (aa, XCAR (tree)) && EQ (dd, XCDR (tree)))
9159 { 9160 {
9160 RETURN_UNGCPRO (tree); 9161 return tree;
9161 } 9162 }
9162 9163
9163 RETURN_UNGCPRO (Fcons (aa, dd)); 9164 return Fcons (aa, dd);
9164 } 9165 }
9165 9166
9166 DEFUN ("sublis", Fsublis, 2, MANY, 0, /* 9167 DEFUN ("sublis", Fsublis, 2, MANY, 0, /*
9167 Perform substitutions indicated by ALIST in TREE (non-destructively). 9168 Perform substitutions indicated by ALIST in TREE (non-destructively).
9168 Return a copy of TREE with all matching elements replaced. 9169 Return a copy of TREE with all matching elements replaced.