g_steal_pointer: make it C++ clean
authorRyan Lortie <desrt@desrt.ca>
Fri, 6 Feb 2015 16:00:01 +0000 (17:00 +0100)
committerRyan Lortie <desrt@desrt.ca>
Fri, 6 Feb 2015 16:01:56 +0000 (17:01 +0100)
commit0110f2a810cfd638a0a6525deb69aeec7a0f0cab
tree8a72eb0b93294c18c05b46f9e3bb0d648d434d1b
parentaa68b3d6d6f6d6c51e753b26b0fdc67b0eeefa17
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.
glib/gmem.h