ObjFW  Check-in [96b35d19c5]

Overview
Comment:Only use objc_direct(_members) with Apple runtime

This first needs to be enabled in Clang for the ObjFW runtime.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 96b35d19c51de0c9a137501cbd4b6292c476702260253bd67e6f120bcdca02f6
User & Date: js on 2020-06-28 15:19:16
Other Links: manifest | tags
Context
2020-06-28
15:39
Remove OF_DIRECT(_MEMBERS) where it was too much check-in: 812a46b8f6 user: js tags: trunk
15:19
Only use objc_direct(_members) with Apple runtime check-in: 96b35d19c5 user: js tags: trunk
15:03
Use OF_DIRECT(_MEMBERS) where appropriate check-in: b6cb3addd0 user: js tags: trunk
Changes

Modified src/macros.h from [f608bdd307] to [3627a6abf3].

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324

#if __has_attribute(__swift_name__)
# define OF_SWIFT_NAME(name) __attribute__((__swift_name__(name)))
#else
# define OF_SWIFT_NAME(name)
#endif

#if __has_attribute(__objc_direct__)
# define OF_DIRECT __attribute__((__objc_direct__))
#else
# define OF_DIRECT
#endif
#if __has_attribute(__objc_direct_members__)
# define OF_DIRECT_MEMBERS __attribute__((__objc_direct_members__))
#else
# define OF_DIRECT_MEMBERS
#endif

#ifdef __GNUC__
# ifdef OF_X86_64







|




|







305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324

#if __has_attribute(__swift_name__)
# define OF_SWIFT_NAME(name) __attribute__((__swift_name__(name)))
#else
# define OF_SWIFT_NAME(name)
#endif

#if __has_attribute(__objc_direct__) && defined(OF_APPLE_RUNTIME)
# define OF_DIRECT __attribute__((__objc_direct__))
#else
# define OF_DIRECT
#endif
#if __has_attribute(__objc_direct_members__) && defined(OF_APPLE_RUNTIME)
# define OF_DIRECT_MEMBERS __attribute__((__objc_direct_members__))
#else
# define OF_DIRECT_MEMBERS
#endif

#ifdef __GNUC__
# ifdef OF_X86_64