Heya, On Tue 05 Jan 2010 18:57, l...@gnu.org (Ludovic Courtès) writes:
>> commit 9fdf9fd3ea7130fd85eaf0a333a965ac4d2b07c3 >> Author: Andy Wingo <wi...@pobox.com> >> Date: Tue Jan 5 16:15:14 2010 +0100 >> >> move subr implementation details to gsubr.[ch] >> >> * libguile/procs.h: Move subr macros to gsubr.h. >> * libguile/procs.c (scm_c_make_subr, scm_c_make_subr_with_generic) >> (scm_c_define_subr, scm_c_define_subr_with_generic): Remove these, >> because they deal in subr types, and now there is only one subr type. > > This is slightly scary, because these were really-public functions, but > I guess there’s no other choice anyway (and fundamentally I think this > change is going in the Right Direction!). Yeah, agreed in both sentiments. >> +/* Deprecated 2010-01-05, use SCM_PRIMITIVE_P instead */ >> +#define scm_subr_p(x) (SCM_PRIMITIVE_P (x)) > > Can you change it so it generates a link-time and run-time warning? > See, e.g., ‘scm_mask_ints’. Done (locally). >> +/* Return the most suitable subr type for a subr with REQ required >> arguments, >> + OPT optional arguments, and REST (0 or 1) arguments. This has to be in >> + sync with `create_gsubr ()'. */ >> +#define SCM_SUBR_ARITY_TO_TYPE(req, opt, rest) >> \ >> + (scm_tc7_gsubr | (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U)) > > “Most suitable” and the second sentence can be removed now. I hope to remove the whole thing. I have a bytecode-subrs branch that doesn't quite work yet, but hopefully will work today. Cheers, Andy -- http://wingolog.org/