mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
g_steal_pointer: make it C++ clean
We have a test that #includes our headers from a C++ program to make sure we don't throw any errors or warnings as a result of that. The new inline implementation of g_steal_pointer() does an implicit conversion from (void *), which is not valid in C++. Add a cast to avoid the problem. Thanks to Ignacio Casal Quinteiro for the report.
This commit is contained in:
parent
aa68b3d6d6
commit
0110f2a810
@ -183,7 +183,7 @@ gpointer g_try_realloc_n (gpointer mem,
|
||||
static inline gpointer
|
||||
(g_steal_pointer) (gpointer pp)
|
||||
{
|
||||
gpointer *ptr = pp;
|
||||
gpointer *ptr = (gpointer *) pp;
|
||||
gpointer ref;
|
||||
|
||||
ref = *ptr;
|
||||
|
Loading…
Reference in New Issue
Block a user