ObjFW  Check-in [7d1275cb49]

Overview
Comment:Remove nullable in .m files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7d1275cb490acbda3210c054d11d485a06304711b76fd50921fe97f2c2ff807b
User & Date: js on 2024-10-27 18:38:35
Other Links: manifest | tags
Context
2024-10-27
22:27
Allow strings to contain \0 check-in: 6fbc3b18c7 user: js tags: trunk
18:38
Remove nullable in .m files check-in: 7d1275cb49 user: js tags: trunk
18:10
OFTCPSocket: Rework blocks-based API check-in: 9611851a89 user: js tags: trunk
Changes

Modified src/OFBlock.m from [22b6fb4345] to [0f8e080ee9].

43
44
45
46
47
48
49
50
51


52
53
54
55
56
57
58
43
44
45
46
47
48
49


50
51
52
53
54
55
56
57
58







-
-
+
+







	Class isa;
	int flags;
	int reserved;
	void (*invoke)(void *block, ...);
	struct {
		unsigned long reserved;
		unsigned long size;
		void (*_Nullable copyHelper)(void *dest, void *src);
		void (*_Nullable disposeHelper)(void *src);
		void (*copyHelper)(void *dest, void *src);
		void (*disposeHelper)(void *src);
		const char *signature;
	} *descriptor;
};

struct Byref {
	Class isa;
	struct Byref *forwarding;

Modified src/OFList.m from [753180d6a2] to [13156323aa].

33
34
35
36
37
38
39
40
41


42
43
44
45
46
47
48
49
33
34
35
36
37
38
39


40
41

42
43
44
45
46
47
48







-
-
+
+
-







	id object;
};

OF_DIRECT_MEMBERS
@interface OFListEnumerator: OFEnumerator
{
	OFList *_list;
	OFListItem _Nullable _current;
	unsigned long _mutations;
	OFListItem _current;
	unsigned long _mutations, *_mutationsPtr;
	unsigned long *_Nullable _mutationsPtr;
}

- (instancetype)initWithList: (OFList *)list
	    mutationsPointer: (unsigned long *)mutationsPtr;
@end

OFListItem

Modified src/OFNotificationCenter.m from [eb7640502b] to [b65ff0742d].

330
331
332
333
334
335
336
337

338
339
340
341
342
343
344


345
346
347
348
349
350
351
330
331
332
333
334
335
336

337
338
339
340
341
342


343
344
345
346
347
348
349
350
351







-
+





-
-
+
+







#endif
	}

	objc_autoreleasePoolPop(pool);
}

- (void)postNotificationName: (OFNotificationName)name
		      object: (nullable id)object
		      object: (id)object
{
	[self postNotificationName: name object: object userInfo: nil];
}

- (void)postNotificationName: (OFNotificationName)name
		      object: (nullable id)object
		    userInfo: (nullable OFDictionary *)userInfo
		      object: (id)object
		    userInfo: (OFDictionary *)userInfo
{
	void *pool = objc_autoreleasePoolPush();

	[self postNotification:
	    [OFNotification notificationWithName: name
					  object: object
					userInfo: userInfo]];

Modified src/OFObject.m from [8a5a49c0ca] to [936405dd93].

70
71
72
73
74
75
76
77

78
79
80
81
82
83
84
70
71
72
73
74
75
76

77
78
79
80
81
82
83
84







-
+







#ifdef OF_AMIGAOS
# define Class IntuitionClass
# include <proto/exec.h>
# undef Class
#endif

#ifdef OF_APPLE_RUNTIME
extern id _Nullable _objc_rootAutorelease(id _Nullable object);
extern id _objc_rootAutorelease(id object);
#endif
#if defined(OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR)
extern id OFForward(id, SEL, ...);
extern struct Stret OFForward_stret(id, SEL, ...);
#else
# define OFForward OFMethodNotFound
# define OFForward_stret OFMethodNotFound_stret

Modified src/OFSocket.m from [7f6fdd5754] to [a8a6d0c3aa].

1048
1049
1050
1051
1052
1053
1054
1055

1056
1057
1058
1059
1060
1061
1062
1048
1049
1050
1051
1052
1053
1054

1055
1056
1057
1058
1059
1060
1061
1062







-
+







		return OFFromBigEndian16(address->sockaddr.in6.sin6_port);
	default:
		@throw [OFInvalidArgumentException exception];
	}
}

OFString *
OFSocketAddressUNIXPath(const OFSocketAddress *_Nonnull address)
OFSocketAddressUNIXPath(const OFSocketAddress *address)
{
	socklen_t length;

	if (address->family != OFSocketAddressFamilyUNIX)
		@throw [OFInvalidArgumentException exception];

	length =

Modified src/exceptions/OFBindIPXSocketFailedException.m from [ad1ef2c59d] to [af8fc53dbd].

31
32
33
34
35
36
37
38

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
31
32
33
34
35
36
37

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66







-
+




















-
+







+ (instancetype)exceptionWithSocket: (id)sock errNo: (int)errNo
{
	OF_UNRECOGNIZED_SELECTOR
}

+ (instancetype)
    exceptionWithNetwork: (uint32_t)network
		    node: (const unsigned char [_Nonnull IPX_NODE_LEN])node
		    node: (const unsigned char [IPX_NODE_LEN])node
		    port: (uint16_t)port
	      packetType: (uint8_t)packetType
		  socket: (id)sock
		   errNo: (int)errNo
{
	return [[[self alloc] initWithNetwork: network
					 node: node
					 port: port
				   packetType: packetType
				       socket: sock
					errNo: errNo] autorelease];
}

- (instancetype)initWithSocket: (id)sock errNo: (int)errNo
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)
    initWithNetwork: (uint32_t)network
	       node: (const unsigned char [_Nonnull IPX_NODE_LEN])node
	       node: (const unsigned char [IPX_NODE_LEN])node
	       port: (uint16_t)port
	 packetType: (uint8_t)packetType
	     socket: (id)sock
	      errNo: (int)errNo
{
	self = [super initWithSocket: sock errNo: errNo];

Modified src/tls/OFOpenSSLTLSStream.m from [b63cbb4514] to [ca917e4347].

318
319
320
321
322
323
324
325

326
327
328
329
330
331
332
318
319
320
321
322
323
324

325
326
327
328
329
330
331
332







-
+








	objc_autoreleasePoolPop(pool);
}

-      (bool)stream: (OFStream *)stream
  didReadIntoBuffer: (void *)buffer
	     length: (size_t)length
	  exception: (nullable id)exception
	  exception: (id)exception
{
	if (exception == nil) {
		static const OFTLSStreamErrorCode unknownErrorCode =
		    OFTLSStreamErrorCodeUnknown;
		int status;

		OFEnsure(length <= INT_MAX);

Modified src/tls/OFSecureTransportTLSStream.m from [7db0fcb232] to [cc272524b9].

255
256
257
258
259
260
261
262

263
264
265
266
267
268
269
255
256
257
258
259
260
261

262
263
264
265
266
267
268
269







-
+








	objc_autoreleasePoolPop(pool);
}

-      (bool)stream: (OFStream *)stream
  didReadIntoBuffer: (void *)buffer
	     length: (size_t)length
	  exception: (nullable id)exception
	  exception: (id)exception
{
	if (exception == nil) {
		OSStatus status = SSLHandshake(_context);

		if (status == errSSLWouldBlock)
			return true;