[glib] Deprecate G_CONST_RETURN
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Deprecate G_CONST_RETURN
- Date: Tue, 15 Mar 2011 05:33:24 +0000 (UTC)
commit a7fc7909dad9b88e8b2d1c6cde801e8888bdfc36
Author: Ryan Lortie <desrt desrt ca>
Date: Sat Mar 12 22:04:53 2011 -0500
Deprecate G_CONST_RETURN
docs/reference/glib/tmpl/macros.sgml | 5 +++--
glib/gmacros.h | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/glib/tmpl/macros.sgml b/docs/reference/glib/tmpl/macros.sgml
index 7f40eb3..cf411ee 100644
--- a/docs/reference/glib/tmpl/macros.sgml
+++ b/docs/reference/glib/tmpl/macros.sgml
@@ -227,5 +227,6 @@ turn it off. This macro should only be used for return values and for
<emphasis>in</emphasis> parameters.
</para>
-
-
+ Deprecated: 2.30: API providers should replace all existing uses with
+ <literal>const</literal> and API consumers should adjust their code
+ accordingly.
diff --git a/glib/gmacros.h b/glib/gmacros.h
index 9f9c25d..538ded6 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -250,11 +250,13 @@
* (usually char*) are const or not. Don't try using this feature for
* functions with C++ linkage.
*/
+#ifndef G_DISABLE_DEPRECATED
#ifdef G_DISABLE_CONST_RETURNS
#define G_CONST_RETURN
#else
#define G_CONST_RETURN const
#endif
+#endif
/*
* The G_LIKELY and G_UNLIKELY macros let the programmer give hints to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]