mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 16:36:14 +01:00
glib/gmacros.h: Check for __clang__ for g_autoptr
clang-cl does support __attribute__((cleanup)), which is what is used for the g_auto* macros, but neither it, nor clang.exe defines __GNUC__ when they are used in a MSVC cmd.exe environment. It does, however, define __clang__. So, check for the presence of the __clang__ macro to enable g_autoptr as well, so that we can build things with MSVC builds that make use of g_autoptr via pretending to be MSVC by using clang-cl.
This commit is contained in:
parent
2e39f4148e
commit
2bc73d7281
@ -1021,7 +1021,7 @@
|
||||
|
||||
#ifndef __GI_SCANNER__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined (__GNUC__) || defined (__clang__)
|
||||
|
||||
/* these macros are private */
|
||||
#define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName
|
||||
|
Loading…
Reference in New Issue
Block a user