[glibmm] Glib: Remove some deprecated API
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Glib: Remove some deprecated API
- Date: Tue, 27 Dec 2016 15:41:30 +0000 (UTC)
commit d62c755d7803af4cbc700bcdb2e29458581679ef
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Tue Dec 27 16:39:02 2016 +0100
Glib: Remove some deprecated API
* glib/glibmm/refptr.h: Remove clear().
* glib/glibmm/utility.h: Remove GLIBMM_INITIALIZE_STRUCT and ScopedPtr.
* glib/src/value_basictypes.[cc|h].m4: Remove Value<char>.
glib/glibmm/refptr.h | 15 -----------
glib/glibmm/utility.h | 54 ---------------------------------------
glib/src/value_basictypes.cc.m4 | 3 --
glib/src/value_basictypes.h.m4 | 4 ---
4 files changed, 0 insertions(+), 76 deletions(-)
---
diff --git a/glib/glibmm/refptr.h b/glib/glibmm/refptr.h
index 892b6a6..ed3df91 100644
--- a/glib/glibmm/refptr.h
+++ b/glib/glibmm/refptr.h
@@ -167,12 +167,6 @@ public:
*/
inline explicit operator bool() const noexcept;
-#ifndef GLIBMM_DISABLE_DEPRECATED
- /// @deprecated Use reset() instead because this leads to confusion with clear() methods on the
- /// underlying class. For instance, people use .clear() when they mean ->clear().
- inline void clear() noexcept;
-#endif // GLIBMM_DISABLE_DEPRECATED
-
/** Set underlying instance to nullptr, decrementing reference count of existing instance
* appropriately.
* @newin{2,16}
@@ -402,15 +396,6 @@ inline RefPtr<T_CppObject>::operator bool() const noexcept
return (pCppObject_ != nullptr);
}
-#ifndef GLIBMM_DISABLE_DEPRECATED
-template <class T_CppObject>
-inline void
-RefPtr<T_CppObject>::clear() noexcept
-{
- reset();
-}
-#endif // GLIBMM_DISABLE_DEPRECATED
-
template <class T_CppObject>
inline void
RefPtr<T_CppObject>::reset() noexcept
diff --git a/glib/glibmm/utility.h b/glib/glibmm/utility.h
index 096b9fe..3cbca14 100644
--- a/glib/glibmm/utility.h
+++ b/glib/glibmm/utility.h
@@ -25,65 +25,11 @@
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-#ifndef GLIBMM_DISABLE_DEPRECATED
-/* Occasionally, a struct variable has to be initialized after its definition,
- * i.e. when using structs as class member data. For convenience, the macro
- * GLIBMM_INITIALIZE_STRUCT(Var, Type) is provided. It even avoids creating
- * a temporary if the compiler is GCC.
- *
- * @deprecated Use e.g. std::memset() instead.
- * It's not used any more in the code generated by _CLASS_BOXEDTYPE_STATIC.
- * It generates compiler warnings if __STRICT_ANSI__ is defined.
- */
-#if ((__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) && !defined(__STRICT_ANSI__)
-
-#define GLIBMM_INITIALIZE_STRUCT(Var, Type) __builtin_memset(&(Var), 0, sizeof(Type))
-
-#else
-
-// TODO: This causes warnings like this:
-//"missing initializer for member"
-#define GLIBMM_INITIALIZE_STRUCT(Var, Type) \
- G_STMT_START \
- { \
- Type const temp_initializer__ = { \
- 0, \
- }; \
- (Var) = temp_initializer__; \
- } \
- G_STMT_END
-
-#endif
-#endif // GLIBMM_DISABLE_DEPRECATED
-
namespace Glib
{
// These are used by gmmproc-generated type conversions:
-#ifndef GLIBMM_DISABLE_DEPRECATED
-/** Helper to deal with memory allocated
- * by GLib functions in an exception-safe manner.
- *
- * @deprecated Use make_unique_ptr_gfree() instead.
- */
-template <typename T>
-class ScopedPtr
-{
-private:
- T* ptr_;
- ScopedPtr(const ScopedPtr<T>&);
- ScopedPtr<T>& operator=(const ScopedPtr<T>&);
-
-public:
- ScopedPtr() : ptr_(nullptr) {}
- explicit ScopedPtr(T* ptr) : ptr_(ptr) {}
- ~ScopedPtr() noexcept { g_free(ptr_); }
- T* get() const { return ptr_; }
- T** addr() { return &ptr_; }
-};
-#endif // GLIBMM_DISABLE_DEPRECATED
-
/** Helper to deal with memory allocated
* by GLib functions in an exception-safe manner.
*
diff --git a/glib/src/value_basictypes.cc.m4 b/glib/src/value_basictypes.cc.m4
index ec37c61..f2448dc 100644
--- a/glib/src/value_basictypes.cc.m4
+++ b/glib/src/value_basictypes.cc.m4
@@ -78,9 +78,6 @@ G_GNUC_EXTENSION typedef long long long_long;
G_GNUC_EXTENSION typedef unsigned long long unsigned_long_long;
GLIB_VALUE_BASIC(bool, boolean)
-#ifndef GLIBMM_DISABLE_DEPRECATED
-GLIB_VALUE_BASIC(char, char, -128, 127)
-#endif // GLIBMM_DISABLE_DEPRECATED
GLIB_VALUE_BASIC(signed char, schar, -128, 127)
GLIB_VALUE_BASIC(unsigned char, uchar, 0, 255)
GLIB_VALUE_BASIC(int, int, G_MININT, G_MAXINT)
diff --git a/glib/src/value_basictypes.h.m4 b/glib/src/value_basictypes.h.m4
index 91a3a4b..e4b5885 100644
--- a/glib/src/value_basictypes.h.m4
+++ b/glib/src/value_basictypes.h.m4
@@ -67,10 +67,6 @@ divert[]dnl
namespace Glib
{
GLIB_VALUE_BASIC(bool, boolean)
-#ifndef GLIBMM_DISABLE_DEPRECATED
-/// @deprecated Use Value<signed char> instead.
-GLIB_VALUE_BASIC(char, char)
-#endif // GLIBMM_DISABLE_DEPRECATED
/// @newin{2,44}
GLIB_VALUE_BASIC(signed char, int8)
GLIB_VALUE_BASIC(unsigned char, uchar)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]