Mercurial > hg > xemacs-beta
comparison src/fns.c @ 5521:3310f36295a0
Correct a couple of comments, remove a superfluous gcpro1, fns.c
2011-06-19 Aidan Kehoe <kehoea@parhasard.net>
* fns.c:
* fns.c (list_delete_duplicates_from_end):
Correct a couple of comments in this file.
* fns.c (sublis):
Remove a superfluous gcpro1.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 19 Jun 2011 16:53:03 +0100 |
parents | 5e128eda1d1f |
children | 58b38d5b32d0 |
comparison
equal
deleted
inserted
replaced
5520:05c1ad4f7a7b | 5521:3310f36295a0 |
---|---|
716 if_, if_not, key, | 716 if_, if_not, key, |
717 test_not_unboundp_out, test_func_out); | 717 test_not_unboundp_out, test_func_out); |
718 } | 718 } |
719 | 719 |
720 /* Given PREDICATE and KEY, return a C function pointer appropriate for use | 720 /* Given PREDICATE and KEY, return a C function pointer appropriate for use |
721 in deciding whether one given elements of a sequence is less than | 721 in deciding whether one given element of a sequence is less than |
722 another. */ | 722 another. */ |
723 | 723 |
724 static check_test_func_t | 724 static check_test_func_t |
725 get_merge_predicate (Lisp_Object predicate, Lisp_Object key) | 725 get_merge_predicate (Lisp_Object predicate, Lisp_Object key) |
726 { | 726 { |
2056 val = make_string (XSTRING_DATA (string) + bstart, blen); | 2056 val = make_string (XSTRING_DATA (string) + bstart, blen); |
2057 | 2057 |
2058 return val; | 2058 return val; |
2059 } | 2059 } |
2060 | 2060 |
2061 /* Split STRING into a list of substrings. The substrings are the | 2061 /* Split STRING into a list of substrings. The substrings are the parts of |
2062 parts of original STRING separated by SEPCHAR. | 2062 original STRING separated by SEPCHAR. |
2063 | 2063 |
2064 If UNESCAPE is non-zero, ESCAPECHAR specifies a character that will quote | 2064 If UNESCAPE is non-zero, ESCAPECHAR specifies a character that will quote |
2065 SEPCHAR, and cause it not to split STRING. A double ESCAPECHAR is | 2065 SEPCHAR, and cause it not to split STRING. A double ESCAPECHAR is |
2066 necessary for ESCAPECHAR to appear once in a substring. */ | 2066 necessary for ESCAPECHAR to appear once in a substring. */ |
2067 | 2067 |
3753 Elemcount ii = 0; | 3753 Elemcount ii = 0; |
3754 struct gcpro gcpro1; | 3754 struct gcpro gcpro1; |
3755 | 3755 |
3756 /* We can't delete (or remove) as we go, because that breaks START and | 3756 /* We can't delete (or remove) as we go, because that breaks START and |
3757 END. We could if END were nil, and that would change an ON(N + 2) | 3757 END. We could if END were nil, and that would change an ON(N + 2) |
3758 algorithm to an ON^2 algorithm; list_position_cons_before() would need to | 3758 algorithm to an ON^2 algorithm. Here and now it doesn't matter, though, |
3759 be modified to return the cons *before* the one containing the item for | 3759 #'delete-duplicates is relatively expensive no matter what. */ |
3760 that. Here and now it doesn't matter, though, #'delete-duplicates is | |
3761 relatively expensive no matter what. */ | |
3762 struct Lisp_Bit_Vector *deleting | 3760 struct Lisp_Bit_Vector *deleting |
3763 = (Lisp_Bit_Vector *) ALLOCA (sizeof (struct Lisp_Bit_Vector) | 3761 = (Lisp_Bit_Vector *) ALLOCA (sizeof (struct Lisp_Bit_Vector) |
3764 + (sizeof (long) | 3762 + (sizeof (long) |
3765 * (BIT_VECTOR_LONG_STORAGE (len) | 3763 * (BIT_VECTOR_LONG_STORAGE (len) |
3766 - 1))); | 3764 - 1))); |
9058 sublis (Lisp_Object alist, Lisp_Object tree, | 9056 sublis (Lisp_Object alist, Lisp_Object tree, |
9059 check_test_func_t check_test, Boolint test_not_unboundp, | 9057 check_test_func_t check_test, Boolint test_not_unboundp, |
9060 Lisp_Object test, Lisp_Object key, int depth) | 9058 Lisp_Object test, Lisp_Object key, int depth) |
9061 { | 9059 { |
9062 Lisp_Object keyed = KEY (key, tree), aa, dd; | 9060 Lisp_Object keyed = KEY (key, tree), aa, dd; |
9063 struct gcpro gcpro1; | |
9064 | 9061 |
9065 if (depth + lisp_eval_depth > max_lisp_eval_depth) | 9062 if (depth + lisp_eval_depth > max_lisp_eval_depth) |
9066 { | 9063 { |
9067 stack_overflow ("Stack overflow in sublis", tree); | 9064 stack_overflow ("Stack overflow in sublis", tree); |
9068 } | 9065 } |