[glib] Disable refcounting type propagation with C++
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Disable refcounting type propagation with C++
- Date: Sat, 9 Dec 2017 00:58:35 +0000 (UTC)
commit 1a6f6487b7c7767ff3b950697e4130f922d1b3a4
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Dec 8 15:44:37 2017 +0000
Disable refcounting type propagation with C++
The type propagation breaks the GRefPtr.h class in WebKitGTK, and in
any case existing C++ code calling the C API will need to perform an
explicit cast, as there's no automatic promotion of pointer types to
and from void*.
Tested-by: GNOME Continuous
https://bugzilla.gnome.org/show_bug.cgi?id=790697
gobject/gobject.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gobject.h b/gobject/gobject.h
index 490d926..eaefe92 100644
--- a/gobject/gobject.h
+++ b/gobject/gobject.h
@@ -508,7 +508,7 @@ GLIB_AVAILABLE_IN_ALL
void g_object_remove_weak_pointer (GObject *object,
gpointer *weak_pointer_location);
-#if defined(__GNUC__) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56
+#if defined(__GNUC__) && !defined(__cplusplus) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56
/* Make reference APIs type safe with macros */
#define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj))
#define g_object_ref_sink(Obj) ((__typeof__(Obj)) (g_object_ref_sink) (Obj))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]