mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
headers: define GS_HAS_DECLARED_PROPERTIES macro
To keep compatibility with compilers prior to Objective-C 2.0 support (added in the GCC 4.6 series), we are unable to always declare @property attributes in classes. However, compatibility with dot-syntax applications require us to define properties if we can. We already had some checks for the GS_HAS_DECLARED_PROPERTIES macro to see whether we could or could not declare properties (or whether we should fall back to manual getter/setter defining). However, it seems this macro never got defined. This commit adds this macro, checking whether we possess either GCC >= 4.6 or Clang.
This commit is contained in:
parent
ef4929b2c2
commit
1e8c1d3855
1 changed files with 8 additions and 0 deletions
|
@ -446,4 +446,12 @@ static inline void gs_consumed(id NS_CONSUMED GS_UNUSED_ARG o) { return; }
|
|||
# define GS_PROTOCOLS_HAVE_OPTIONAL 0
|
||||
#endif
|
||||
|
||||
/* Check if compiler supports declared properties
|
||||
*/
|
||||
#if defined(__clang__) || GS_GCC_MINREQ(4,6)
|
||||
# define GS_HAS_DECLARED_PROPERTIES 1
|
||||
#else
|
||||
# define GS_HAS_DECLARED_PROPERTIES 0
|
||||
#endif
|
||||
|
||||
#endif /* __GNUSTEP_GSVERSIONMACROS_H_INCLUDED_ */
|
||||
|
|
Loading…
Reference in a new issue