diff options
Diffstat (limited to 'glib/src/thread.hg')
-rw-r--r-- | glib/src/thread.hg | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/glib/src/thread.hg b/glib/src/thread.hg index fb6f19b7..b5efa43b 100644 --- a/glib/src/thread.hg +++ b/glib/src/thread.hg @@ -21,23 +21,16 @@ _CONFIGINCLUDE(glibmmconfig.h) _IS_DEPRECATED // This whole file is deprecated. #m4 _PUSH(SECTION_CC_PRE_INCLUDES) -// Must be included in the .cc file before the generated #ifndef GLIBMM_DISABLE_DEPRECATED, -// or else "configure --disable-deprecated-api" + "make" will fail. -#include <glibmmconfig.h> +//Stop the compiler warnings about using the deprecated API; +#define GLIB_DISABLE_DEPRECATION_WARNINGS 1 #m4 _POP() // We use GThreadFunctions in the (deprecated) API, so we must temporarily undef G_DISABLE_DEPRECATED. // Temporarily undef G_DISABLE_DEPRECATED, redefining it later if appropriate. #if defined(G_DISABLE_DEPRECATED) && !defined(GLIBMM_G_DISABLE_DEPRECATED_UNDEFED) - //Stop the deprecation ifdef guards around the API declarations: #undef G_DISABLE_DEPRECATED - -//Stop the compiler warnings about using the deprecated API; -#define GLIB_DISABLE_DEPRECATION_WARNINGS 1 - #define GLIBMM_G_DISABLE_DEPRECATED_UNDEFED 1 - #endif #include <glib.h> @@ -45,7 +38,6 @@ _IS_DEPRECATED // This whole file is deprecated. // Redefine G_DISABLE_DEPRECATED if it was defined before we temporarily undefed it: #if defined(GLIBMM_G_DISABLE_DEPRECATED_UNDEFED) #define G_DISABLE_DEPRECATED 1 -#undef GLIB_DISABLE_DEPRECATION_WARNINGS #undef GLIBMM_G_DISABLE_DEPRECATED_UNDEFED #endif @@ -114,7 +106,7 @@ _WRAP_ENUM(ThreadPriority, GThreadPriority, NO_GTYPE) /** Initializes the GLib thread system. * @deprecated Calling thread_init() is no longer necessary and no longer has any effect. */ -void thread_init(GThreadFunctions* vtable = 0); +void thread_init(GThreadFunctions* vtable = nullptr); /** Returns whether the thread system is initialized. * @return @c true, if the thread system is initialized. @@ -638,7 +630,7 @@ private: * @code * Glib::Cond data_cond; * Glib::Mutex data_mutex; - * void* current_data = 0; + * void* current_data = nullptr; * * void push_data(void* data) * { @@ -656,7 +648,7 @@ private: * data_cond.wait(data_mutex); * * void *const data = current_data; - * current_data = 0; + * current_data = nullptr; * * return data; * } |