summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-10-02 14:34:51 +0200
committerLudovic Courtès <ludo@gnu.org>2009-10-02 14:45:11 +0200
commit743b8872907996e717b4bfef360b25122e80d637 (patch)
treecb503480546640394af47469bf9aa250ef5683db
parent5b2f2c75527c5899648eec46c7eca0f57420ff3b (diff)
downloadguile-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.h11
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}