ObjFW  Diff

Differences From Artifact [5030168140]:

To Artifact [81d5aa4cdd]:

  • File src/OFThread.h — part of check-in [b7097a67b6] at 2015-06-14 10:45:10 on branch trunk — Add OF_NONNULL / OF_NULLABLE and use that instead

    Using __nonnull directly doesn't work on systems using glibc, as glibc
    defines __nonnull as a parameterized define. While this does not fix the
    problem of Clang introducing __nonnull even though it conflicts with
    glibc, this at least means it's possible again to compile things with
    versions of Clang that don't support __nonnull on systems with glibc. (user: js, size: 6007) [annotate] [blame] [check-ins using]


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

#if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS)
/*!
 * @brief A block to be executed in a new thread.
 *
 * @return The object which should be returned when the thread is joined
 */
typedef __nullable id (^of_thread_block_t)(void);
#endif

/*!
 * @class OFThread OFThread.h ObjFW/OFThread.h
 *
 * @brief A class which provides portable threads.
 *







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

#if defined(OF_HAVE_THREADS) && defined(OF_HAVE_BLOCKS)
/*!
 * @brief A block to be executed in a new thread.
 *
 * @return The object which should be returned when the thread is joined
 */
typedef id OF_NULLABLE (^of_thread_block_t)(void);
#endif

/*!
 * @class OFThread OFThread.h ObjFW/OFThread.h
 *
 * @brief A class which provides portable threads.
 *