From 518b25f881c6c15626487fc768895d66cbb13a75 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Wed, 20 May 2020 19:56:58 +0200 Subject: [PATCH 1/2] Officially deprecate C_pair in favor of C_a_pair It has been marked as deprecated for 10 years in the runtime.c file, but this was never "official" in any way, and the manual even had C_pair() but not C_a_pair() in the "C interface" chapter. --- DEPRECATED | 2 ++ NEWS | 2 ++ chicken.h | 12 ++++++------ manual/C interface | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/DEPRECATED b/DEPRECATED index 8f25faa8..7d9cffe7 100644 --- a/DEPRECATED +++ b/DEPRECATED @@ -6,6 +6,8 @@ Deprecated functions and variables C_a_i_current_milliseconds have been deprecated in favor of current-process_milliseconds, C_current_process_milliseconds and C_a_i_current_process_milliseconds +- C_pair() is now officially deprecated in favor of C_a_pair(), which + should also be faster. 5.1.1 diff --git a/NEWS b/NEWS index 67b81974..95fbb159 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,8 @@ - Deprecated C_(a_i_current_)milliseconds in favor of C_(a_i_)current_process_milliseconds to match the Scheme-level deprecation of current-milliseconds. + - Officially deprecated C_pair() in favor of C_a_pair(); it has + been deprecated for years. - Build system - Auto-configure at build time on most platforms. Cross-compilation diff --git a/chicken.h b/chicken.h index b3ba54f0..d75fe04f 100644 --- a/chicken.h +++ b/chicken.h @@ -3370,7 +3370,7 @@ inline static C_word C_a_i_list2(C_word **a, int n, C_word x1, C_word x2) inline static C_word C_a_i_list3(C_word **a, int n, C_word x1, C_word x2, C_word x3) { - C_word x = C_pair(a, x3, C_SCHEME_END_OF_LIST); + C_word x = C_a_pair(a, x3, C_SCHEME_END_OF_LIST); x = C_a_pair(a, x2, x); return C_a_pair(a, x1, x); @@ -3379,7 +3379,7 @@ inline static C_word C_a_i_list3(C_word **a, int n, C_word x1, C_word x2, C_word inline static C_word C_a_i_list4(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4) { - C_word x = C_pair(a, x4, C_SCHEME_END_OF_LIST); + C_word x = C_a_pair(a, x4, C_SCHEME_END_OF_LIST); x = C_a_pair(a, x3, x); x = C_a_pair(a, x2, x); @@ -3390,7 +3390,7 @@ inline static C_word C_a_i_list4(C_word **a, int n, C_word x1, C_word x2, C_word inline static C_word C_a_i_list5(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4, C_word x5) { - C_word x = C_pair(a, x5, C_SCHEME_END_OF_LIST); + C_word x = C_a_pair(a, x5, C_SCHEME_END_OF_LIST); x = C_a_pair(a, x4, x); x = C_a_pair(a, x3, x); @@ -3402,7 +3402,7 @@ inline static C_word C_a_i_list5(C_word **a, int n, C_word x1, C_word x2, C_word inline static C_word C_a_i_list6(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4, C_word x5, C_word x6) { - C_word x = C_pair(a, x6, C_SCHEME_END_OF_LIST); + C_word x = C_a_pair(a, x6, C_SCHEME_END_OF_LIST); x = C_a_pair(a, x5, x); x = C_a_pair(a, x4, x); @@ -3415,7 +3415,7 @@ inline static C_word C_a_i_list6(C_word **a, int n, C_word x1, C_word x2, C_word inline static C_word C_a_i_list7(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4, C_word x5, C_word x6, C_word x7) { - C_word x = C_pair(a, x7, C_SCHEME_END_OF_LIST); + C_word x = C_a_pair(a, x7, C_SCHEME_END_OF_LIST); x = C_a_pair(a, x6, x); x = C_a_pair(a, x5, x); @@ -3429,7 +3429,7 @@ inline static C_word C_a_i_list7(C_word **a, int n, C_word x1, C_word x2, C_word inline static C_word C_a_i_list8(C_word **a, int n, C_word x1, C_word x2, C_word x3, C_word x4, C_word x5, C_word x6, C_word x7, C_word x8) { - C_word x = C_pair(a, x8, C_SCHEME_END_OF_LIST); + C_word x = C_a_pair(a, x8, C_SCHEME_END_OF_LIST); x = C_a_pair(a, x7, x); x = C_a_pair(a, x6, x); diff --git a/manual/C interface b/manual/C interface index 0114e631..f8c07d4b 100644 --- a/manual/C interface +++ b/manual/C interface @@ -373,9 +373,9 @@ accessor macros instead). [C function] C_word C_intern3 (C_word **ptr, char *zero_terminated_string, C_word initial_value) -===== C_pair +===== C_a_pair - [C function] C_word C_pair (C_word **ptr, C_word car, C_word cdr) + [C function] C_word C_a_pair (C_word **ptr, C_word car, C_word cdr) ===== C_flonum -- 2.20.1