diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-10-02 14:34:51 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-10-02 14:45:11 +0200 |
commit | 743b8872907996e717b4bfef360b25122e80d637 (patch) | |
tree | cb503480546640394af47469bf9aa250ef5683db | |
parent | 5b2f2c75527c5899648eec46c7eca0f57420ff3b (diff) | |
download | guile-743b8872907996e717b4bfef360b25122e80d637.tar.gz |
Add `SCM_DEPRECATED' macro to declare deprecated C functions/variables.
* libguile/__scm.h (SCM_DEPRECATED): New macro.
-rw-r--r-- | libguile/__scm.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libguile/__scm.h b/libguile/__scm.h index 791150d46..a1f3b342d 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -104,6 +104,17 @@ * and then SCM_API marks them for export. */ #define SCM_INTERNAL extern +/* The SCM_DEPRECATED macro is used in declarations of deprecated functions + * or variables. Defining `SCM_BUILDING_DEPRECATED_CODE' allows deprecated + * functions to be implemented in terms of deprecated functions, and allows + * deprecated functions to be referred to by `scm_c_define_gsubr ()'. */ +#if !defined (SCM_BUILDING_DEPRECATED_CODE) \ + && defined (__GNUC__) && (__GNUC__ >= 3) +# define SCM_DEPRECATED SCM_API __attribute__ ((__deprecated__)) +#else +# define SCM_DEPRECATED SCM_API +#endif + /* {Supported Options} |