unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-6-75-g9c246c0
       [not found] <E1NSBM6-00076R-0m@cvs.savannah.gnu.org>
@ 2010-01-05 17:57 ` Ludovic Courtès
  2010-01-06 10:13   ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2010-01-05 17:57 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Hi Andy!

"Andy Wingo" <wingo@pobox.com> writes:

> commit 9fdf9fd3ea7130fd85eaf0a333a965ac4d2b07c3
> Author: Andy Wingo <wingo@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!).

> +/* 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’.

> +/* 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.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Guile-commits] GNU Guile branch, master, updated. release_1-9-6-75-g9c246c0
  2010-01-05 17:57 ` [Guile-commits] GNU Guile branch, master, updated. release_1-9-6-75-g9c246c0 Ludovic Courtès
@ 2010-01-06 10:13   ` Andy Wingo
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Wingo @ 2010-01-06 10:13 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

Heya,

On Tue 05 Jan 2010 18:57, ludo@gnu.org (Ludovic Courtès) writes:

>> commit 9fdf9fd3ea7130fd85eaf0a333a965ac4d2b07c3
>> Author: Andy Wingo <wingo@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/




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-06 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1NSBM6-00076R-0m@cvs.savannah.gnu.org>
2010-01-05 17:57 ` [Guile-commits] GNU Guile branch, master, updated. release_1-9-6-75-g9c246c0 Ludovic Courtès
2010-01-06 10:13   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).