ObjFW  Diff

Differences From Artifact [f01ba7a135]:

To 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]


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
 */







|






|







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
 */
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;

/*!
 * @brief Terminates the application with the specified status.
 *
 * @param status The status with which the application will terminate
 */
- (void)terminateWithStatus: (int)status;
@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_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