ObjFW  Diff

Differences From Artifact [4b9b47fc09]:

  • File src/OFApplication.h — part of check-in [bac91ccede] at 2014-05-14 20:45:00 on branch trunk — Add C11 noreturn

    If it's unavailable, it's defined to __attribute__((noreturn)).

    Unfortunately, it cannot be used for ObjC methods, as noreturn is part
    of the return type while __attribute__((noreturn)) needs to be at the
    end for an ObjC method. To make matters worse, even GCC versions that
    accept noreturn don't allow it for an ObjC method. Thus, the only thing
    that can be done is to always use __attribute__((noreturn)) for ObjC
    methods using the OF_METHOD_NORETURN define. (user: js, size: 6510) [annotate] [blame] [check-ins using]

To Artifact [ce851e8072]:

  • File src/OFApplication.h — part of check-in [716b1fc2b3] at 2014-07-19 09:55:06 on branch trunk — Don't use C11's noreturn

    It causes just too much trouble: It breaks with some old versions of
    Clang, where noreturn does not work correctly, and OS X headers break if
    noreturn is defined, requiring an ugly and fragile workaround. It's just
    not worth the trouble it causes, as the same functionality is available
    through __attribute__((__noreturn__)). (user: js, size: 6486) [annotate] [blame] [check-ins using]


160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
 * @return The environment of the application
 */
+ (OFDictionary*)environment;

/*!
 * @brief Terminates the application.
 */
+ (void)terminate OF_METHOD_NORETURN;

/*!
 * @brief Terminates the application with the specified status.
 *
 * @param status The status with which the application will terminate
 */
+ (void)terminateWithStatus: (int)status OF_METHOD_NORETURN;

/*!
 * @brief Gets args and argv.
 *
 * @param argc A pointer where a pointer to argc should be stored
 * @param argv A pointer where a pointer to argv should be stored
 */







|






|







160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
 * @return The environment of the application
 */
+ (OFDictionary*)environment;

/*!
 * @brief Terminates the application.
 */
+ (void)terminate OF_NO_RETURN;

/*!
 * @brief Terminates the application with the specified status.
 *
 * @param status The status with which the application will terminate
 */
+ (void)terminateWithStatus: (int)status OF_NO_RETURN;

/*!
 * @brief Gets args and argv.
 *
 * @param argc A pointer where a pointer to argc should be stored
 * @param argv A pointer where a pointer to argv should be stored
 */
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
 * @param delegate The delegate for the application
 */
- (void)setDelegate: (id <OFApplicationDelegate>)delegate;

/*!
 * @brief Terminates the application.
 */
- (void)terminate OF_METHOD_NORETURN;

/*!
 * @brief Terminates the application with the specified status.
 *
 * @param status The status with which the application will terminate
 */
- (void)terminateWithStatus: (int)status OF_METHOD_NORETURN;
@end

@interface OFObject (OFApplicationDelegate) <OFApplicationDelegate>
@end

#ifdef __cplusplus
extern "C" {
#endif
extern int of_application_main(int*, char**[], Class);
#ifdef __cplusplus
}
#endif







|






|












216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
 * @param delegate The delegate for the application
 */
- (void)setDelegate: (id <OFApplicationDelegate>)delegate;

/*!
 * @brief Terminates the application.
 */
- (void)terminate OF_NO_RETURN;

/*!
 * @brief Terminates the application with the specified status.
 *
 * @param status The status with which the application will terminate
 */
- (void)terminateWithStatus: (int)status OF_NO_RETURN;
@end

@interface OFObject (OFApplicationDelegate) <OFApplicationDelegate>
@end

#ifdef __cplusplus
extern "C" {
#endif
extern int of_application_main(int*, char**[], Class);
#ifdef __cplusplus
}
#endif