mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 20:33:08 +02:00
Merge branch 'gwin32-com-free-cpp-fix' into 'main'
gwin32.h: Avoid including unknwn.h Closes #3613 See merge request GNOME/glib!4502
This commit is contained in:
commit
01289dd242
@ -43,11 +43,6 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
|
||||||
/* needed include for C++ builds; including this in C mode will cause havoc of type conflicts */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include <unknwn.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To get prototypes for the following POSIXish functions, you have to
|
* To get prototypes for the following POSIXish functions, you have to
|
||||||
* include the indicated non-POSIX headers. The functions are defined
|
* include the indicated non-POSIX headers. The functions are defined
|
||||||
@ -184,12 +179,10 @@ template <typename com_interface>
|
|||||||
static inline void
|
static inline void
|
||||||
g_win32_clear_com (com_interface **com_obj)
|
g_win32_clear_com (com_interface **com_obj)
|
||||||
{
|
{
|
||||||
IUnknown **unknown_com_obj = reinterpret_cast<IUnknown **>(com_obj);
|
if (*com_obj != NULL)
|
||||||
|
|
||||||
if (*unknown_com_obj != NULL)
|
|
||||||
{
|
{
|
||||||
(*unknown_com_obj)->Release ();
|
(*com_obj)->Release ();
|
||||||
*unknown_com_obj = NULL;
|
*com_obj = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user