ObjFW  Check-in [18caed047e]

Overview
Comment:Use OFLog() for OFEnsure()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 18caed047ed9caf9f4b8373a68b5de1d9daae5a1a16a69e1ab559c733566ba79
User & Date: js on 2022-11-15 23:04:52
Other Links: manifest | tags
Context
2022-11-16
01:27
Add OFAssert() check-in: c86b8f10f0 user: js tags: trunk
2022-11-15
23:09
Merge trunk into branch "amiga-library" check-in: a151c9797b user: js tags: amiga-library
23:04
Use OFLog() for OFEnsure() check-in: 18caed047e user: js tags: trunk
20:17
Restore GitHub Actions for Nintendo (3)DS check-in: da3f193b81 user: js tags: trunk
Changes

Modified src/OFCondition.m from [6291bb097b] to [28f8553bac].

15
16
17
18
19
20
21

22
23
24
25
26
27
28
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+








#include "config.h"

#include <errno.h>

#import "OFCondition.h"
#import "OFDate.h"
#import "OFString.h"

#import "OFBroadcastConditionFailedException.h"
#import "OFConditionStillWaitingException.h"
#import "OFInitializationFailedException.h"
#import "OFSignalConditionFailedException.h"
#import "OFWaitForConditionFailedException.h"

Modified src/macros.h from [4ca2ebbb7b] to [8379d699e4].

355
356
357
358
359
360
361


362
363
364
365
366


367
368
369
370
371
372
373
374
355
356
357
358
359
360
361
362
363
364
365
366


367
368

369
370
371
372
373
374
375







+
+



-
-
+
+
-







	do {								\
		if OF_UNLIKELY (!(cond))				\
			objc_error("ObjFWRT @ " __FILE__ ":"		\
			    OF_STRINGIFY(__LINE__),			\
			    "Failed to ensure condition:\n" #cond);	\
	} while(0)
#else
@class OFConstantString;
extern void OFLog(OFConstantString *_Nonnull, ...);
# define OFEnsure(cond)							\
	do {								\
		if OF_UNLIKELY (!(cond)) {				\
			fprintf(stderr, "Failed to ensure condition "	\
			    "in " __FILE__ ":%d:\n" #cond "\n",		\
			OFLog(@"Failed to ensure condition in "		\
			    @__FILE__ ":%d: " @#cond, __LINE__);	\
			    __LINE__);					\
			abort();					\
		}							\
	} while (0)
#endif

#define OF_UNRECOGNIZED_SELECTOR OFMethodNotFound(self, _cmd);
#if __has_feature(objc_arc)

Modified src/platform/AmigaOS/OFPlainThread.m from [70ea6c25e9] to [c57285f4e8].

16
17
18
19
20
21
22

23
24
25
26
27
28
29
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30







+







#include "config.h"

#include <assert.h>
#include <errno.h>

#import "OFPlainThread.h"
#import "OFData.h"
#import "OFString.h"
#import "OFTLSKey.h"

#include <dos/dostags.h>
#include <proto/dos.h>
#include <proto/exec.h>

#ifndef OF_MORPHOS