summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2016-12-27 16:39:02 +0100
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2016-12-27 16:39:02 +0100
commitd62c755d7803af4cbc700bcdb2e29458581679ef (patch)
tree6d3140b63da9328c07e9a0dd52fdadac08cdf662
parentf8e1885a493c76c1d03bac408fb3286858efb968 (diff)
downloadglibmm-d62c755d7803af4cbc700bcdb2e29458581679ef.tar.gz
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>.
-rw-r--r--glib/glibmm/refptr.h15
-rw-r--r--glib/glibmm/utility.h54
-rw-r--r--glib/src/value_basictypes.cc.m43
-rw-r--r--glib/src/value_basictypes.h.m44
4 files changed, 0 insertions, 76 deletions
diff --git a/glib/glibmm/refptr.h b/glib/glibmm/refptr.h
index 892b6a67..ed3df911 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 096b9fe3..3cbca146 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 ec37c61e..f2448dcf 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 91a3a4bf..e4b58851 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)