guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: snarfer guard macro name decision: SCM_MAGIC_SNARFER


From: Marius Vollmer
Subject: Re: snarfer guard macro name decision: SCM_MAGIC_SNARFER
Date: 15 Mar 2002 22:19:37 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Thien-Thi Nguyen <address@hidden> writes:

>    From: Thien-Thi Nguyen <address@hidden>
>    Date: Thu, 14 Mar 2002 20:26:23 -0800
> 
>    i'll replace it with detection of the deprecated macros, which for
>    1.6 would result in a warning, and 1.8 would result in an error.

That's a very good thing to do, in my opinion.

I think it would be even better when the list of deprecated snarfer
macros are taken from snarf.h itself.  Like, we could change the
SCM_VCELL definition to

    #define SCM_VCELL(c_name, scheme_name) \
    SCM_SNARF_HERE(static SCM c_name) \
    SCM_SNARF_INIT_DEPRECATED(c_name = \
      scm_permanent_object (scm_sysintern (scheme_name, SCM_BOOL_F));)

with

    # define SCM_SNARF_INIT_DEPRECATED(X) ^^deprecated X

guile-snarf could then detect the ^^deprecated marker and do its
thing.

Or, simpler, we could explicitely include calls to
scm_c_issue_deprecation_warning into the INIT code for deprecated snaf
macros.  Like

    #define SCM_VCELL(c_name, scheme_name) \
    SCM_SNARF_HERE(static SCM c_name) \
    SCM_SNARF_INIT(scm_c_issue_deprecation_warning \
     ("SCM_VCELL is deprecated.  Use SCM_VARIABLE instead."); \
     c_name = scm_permanent_object (scm_sysintern (scheme_name, SCM_BOOL_F));)


I even wonder if it would be good to enable the "-d" behavior by
default?

What do you think?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]