~ chicken-core (chicken-5) d095c9c20d68e3f85a78155113c8278a0711eac6
commit d095c9c20d68e3f85a78155113c8278a0711eac6 Author: Peter Bex <peter.bex@xs4all.nl> AuthorDate: Thu Oct 3 20:05:03 2013 +0200 Commit: Peter Bex <peter.bex@xs4all.nl> CommitDate: Thu Oct 3 20:05:03 2013 +0200 Use HAVE_STATEMENT_EXPRESSIONS for determining how to define C_a_i() as well. Also move it to chicken.h so that we can decide to use a different compiler at any time without running into trouble that the C_a_i function does not exist in libchicken. Also, inline is faster if it's available. diff --git a/chicken.h b/chicken.h index e02fba66..dc0af17c 100644 --- a/chicken.h +++ b/chicken.h @@ -1879,11 +1879,6 @@ C_fctexport void C_ccall C_copy_closure(C_word c, C_word closure, C_word k, C_wo C_fctexport void C_ccall C_dump_heap_state(C_word x, C_word closure, C_word k) C_noret; C_fctexport void C_ccall C_filter_heap_objects(C_word x, C_word closure, C_word k, C_word func, C_word vector, C_word userarg) C_noret; - -#ifndef HAVE_STATEMENT_EXPRESSIONS -C_fctexport C_word *C_a_i(C_word **a, int n); -#endif - C_fctexport time_t C_fcall C_seconds(C_long *ms) C_regparm; C_fctexport C_word C_a_i_list(C_word **a, int c, ...); C_fctexport C_word C_a_i_string(C_word **a, int c, ...); @@ -2049,6 +2044,18 @@ C_fctexport void C_default_5fstub_toplevel(C_word c,C_word d,C_word k) C_noret; /* Inline functions: */ +#ifndef HAVE_STATEMENT_EXPRESSIONS + +C_inline C_word *C_a_i(C_word **a, int n) +{ + C_word *p = *a; + + *a += n; + return p; +} + +#endif + C_inline C_word C_mutate2(C_word *slot, C_word val) { diff --git a/runtime.c b/runtime.c index 9bef9400..ab61a0de 100644 --- a/runtime.c +++ b/runtime.c @@ -4613,19 +4613,6 @@ C_regparm C_word C_fcall C_i_string_ci_equal_p(C_word x, C_word y) } -#if !defined(__GNUC__) && !defined(__INTEL_COMPILER) - -C_word *C_a_i(C_word **a, int n) -{ - C_word *p = *a; - - *a += n; - return p; -} - -#endif - - C_word C_a_i_list(C_word **a, int c, ...) { va_list v;Trap