ObjFW  Diff

Differences From Artifact [22a218a9f1]:

To Artifact [d5a6457c6c]:


60
61
62
63
64
65
66
67

68
69
70
71
72
73
74
75
76
77
+ newWithClass: (Class)class_
{
	return [[self alloc] initWithClass: class_];
}

- initWithClass: (Class)class_
{
	if ((self = [super init])) {

		class = class_;
		string = NULL;
	}

	return self;
}

- free
{
	if (string != NULL)







|
>
|
|
<







60
61
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
+ newWithClass: (Class)class_
{
	return [[self alloc] initWithClass: class_];
}

- initWithClass: (Class)class_
{
	self = [super init];

	class = class_;
	string = NULL;


	return self;
}

- free
{
	if (string != NULL)
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113
	return [[self alloc] initWithClass: class_
				   andSize: size];
}

- initWithClass: (Class)class_
	andSize: (size_t)size
{
	if ((self = [super initWithClass: class_]))

		req_size = size;

	return self;
}

- (const char*)cString
{
	if (string != NULL)







|
>
|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
	return [[self alloc] initWithClass: class_
				   andSize: size];
}

- initWithClass: (Class)class_
	andSize: (size_t)size
{
	self = [super initWithClass: class_];

	req_size = size;

	return self;
}

- (const char*)cString
{
	if (string != NULL)
132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
	return [[self alloc] initWithClass: class_
				andPointer: ptr];
}

- initWithClass: (Class)class_
     andPointer: (void*)ptr
{
	if ((self = [super initWithClass: class_]))

		pointer = ptr;

	return self;
}

- (const char*)cString
{
	if (string != NULL)







|
>
|







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
	return [[self alloc] initWithClass: class_
				andPointer: ptr];
}

- initWithClass: (Class)class_
     andPointer: (void*)ptr
{
	self = [super initWithClass: class_];

	pointer = ptr;

	return self;
}

- (const char*)cString
{
	if (string != NULL)
168
169
170
171
172
173
174
175

176
177
178
179
180
181
182
183
	return [[self alloc] initWithClass: class_
			       andSelector: selector_];
}

- initWithClass: (Class)class_
    andSelector: (SEL)selector_
{
	if ((self = [super initWithClass: class_]))

		selector = selector_;

	return self;
}

- (const char*)cString
{
	if (string != NULL)







|
>
|







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
	return [[self alloc] initWithClass: class_
			       andSelector: selector_];
}

- initWithClass: (Class)class_
    andSelector: (SEL)selector_
{
	self = [super initWithClass: class_];

	selector = selector_;

	return self;
}

- (const char*)cString
{
	if (string != NULL)
209
210
211
212
213
214
215
216

217
218
219
220
221
222
223
224
	return [[self alloc] initWithClass: class_
			       andSelector: selector_];
}

- initWithClass: (Class)class_
    andSelector: (SEL)selector_
{
	if ((self = [super initWithClass: class_]))

		selector = selector_;

	return self;
}

- (const char*)cString
{
	if (string != NULL)







|
>
|







212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
	return [[self alloc] initWithClass: class_
			       andSelector: selector_];
}

- initWithClass: (Class)class_
    andSelector: (SEL)selector_
{
	self = [super initWithClass: class_];

	selector = selector_;

	return self;
}

- (const char*)cString
{
	if (string != NULL)
278
279
280
281
282
283
284
285

286
287
288
289
290
291
292
293
294
295
296
				   andMode: mode_];
}

- initWithClass: (Class)class_
	andPath: (const char*)path_
	andMode: (const char*)mode_
{
	if ((self = [super initWithClass: class_])) {

		path = (path_ != NULL ? strdup(path_) : NULL);
		mode = (mode_ != NULL ? strdup(mode_) : NULL);
		err = GET_ERR;
	}

	return self;
}

- free
{
	if (path != NULL)







|
>
|
|
|
<







282
283
284
285
286
287
288
289
290
291
292
293

294
295
296
297
298
299
300
				   andMode: mode_];
}

- initWithClass: (Class)class_
	andPath: (const char*)path_
	andMode: (const char*)mode_
{
	self = [super initWithClass: class_];

	path = (path_ != NULL ? strdup(path_) : NULL);
	mode = (mode_ != NULL ? strdup(mode_) : NULL);
	err = GET_ERR;


	return self;
}

- free
{
	if (path != NULL)
345
346
347
348
349
350
351
352

353
354
355
356
357
358
359
360
361
362
363
364
365

366
367
368
369
370
371
372
373
374
375
376
377
				   andSize: size];
}

- initWithClass: (Class)class_
	andSize: (size_t)size
      andNItems: (size_t)nitems
{
	if ((self = [super initWithClass: class_])) {

		req_size = size;
		req_items = nitems;
		has_items = YES;
		err = GET_ERR;
	}

	return self;
}

- initWithClass: (Class)class_
	andSize: (size_t)size
{
	if ((self = [super initWithClass: class_])) {

		req_size = size;
		req_items = 0;
		has_items = NO;
		err = GET_ERR;
	}

	return self;
}

- (int)errNo
{
	return err;







|
>
|
|
|
|
<







|
>
|
|
|
|
<







349
350
351
352
353
354
355
356
357
358
359
360
361

362
363
364
365
366
367
368
369
370
371
372
373
374

375
376
377
378
379
380
381
				   andSize: size];
}

- initWithClass: (Class)class_
	andSize: (size_t)size
      andNItems: (size_t)nitems
{
	self = [super initWithClass: class_];

	req_size = size;
	req_items = nitems;
	has_items = YES;
	err = GET_ERR;


	return self;
}

- initWithClass: (Class)class_
	andSize: (size_t)size
{
	self = [super initWithClass: class_];

	req_size = size;
	req_items = 0;
	has_items = NO;
	err = GET_ERR;


	return self;
}

- (int)errNo
{
	return err;
492
493
494
495
496
497
498
499

500
501
502
503
504
505
506
507
508
509
510
		       andService: service_];
}

- initWithClass: (Class)class_
	andNode: (const char*)node_
     andService: (const char*)service_
{
	if ((self = [super initWithClass: class_])) {

		node = (node_ != NULL ? strdup(node_) : NULL);
		service = (service_ != NULL ? strdup(service_) : NULL);
		err = GET_SOCK_ERR;
	}

	return self;
}

- free
{
	if (node != NULL)







|
>
|
|
|
<







496
497
498
499
500
501
502
503
504
505
506
507

508
509
510
511
512
513
514
		       andService: service_];
}

- initWithClass: (Class)class_
	andNode: (const char*)node_
     andService: (const char*)service_
{
	self = [super initWithClass: class_];

	node = (node_ != NULL ? strdup(node_) : NULL);
	service = (service_ != NULL ? strdup(service_) : NULL);
	err = GET_SOCK_ERR;


	return self;
}

- free
{
	if (node != NULL)
556
557
558
559
560
561
562
563

564
565
566
567
568
569
570
571
572
573
574
			  andPort: port_];
}

- initWithClass: (Class)class_
	andHost: (const char*)host_
	andPort: (uint16_t)port_
{
	if ((self = [super initWithClass: class_])) {

		host = (host_ != NULL ? strdup(host_) : NULL);
		port = port_;
		err = GET_SOCK_ERR;
	}

	return self;
}

- free
{
	if (host != NULL)







|
>
|
|
|
<







560
561
562
563
564
565
566
567
568
569
570
571

572
573
574
575
576
577
578
			  andPort: port_];
}

- initWithClass: (Class)class_
	andHost: (const char*)host_
	andPort: (uint16_t)port_
{
	self = [super initWithClass: class_];

	host = (host_ != NULL ? strdup(host_) : NULL);
	port = port_;
	err = GET_SOCK_ERR;


	return self;
}

- free
{
	if (host != NULL)
617
618
619
620
621
622
623
624

625
626
627
628
629
630
631
632
633
634
635
636
}

- initWithClass: (Class)class_
	andHost: (const char*)host_
	andPort: (uint16_t)port_
      andFamily: (int)family_
{
	if ((self = [super initWithClass: class_])) {

		host = (host_ != NULL ? strdup(host_) : NULL);
		port = port_;
		family = family_;
		err = GET_SOCK_ERR;
	}

	return self;
}

- free
{
	if (host != NULL)







|
>
|
|
|
|
<







621
622
623
624
625
626
627
628
629
630
631
632
633

634
635
636
637
638
639
640
}

- initWithClass: (Class)class_
	andHost: (const char*)host_
	andPort: (uint16_t)port_
      andFamily: (int)family_
{
	self = [super initWithClass: class_];

	host = (host_ != NULL ? strdup(host_) : NULL);
	port = port_;
	family = family_;
	err = GET_SOCK_ERR;


	return self;
}

- free
{
	if (host != NULL)
678
679
680
681
682
683
684
685

686
687
688
689
690
691
692
693
694
695
	return [[self alloc] initWithClass: class_
				andBackLog: backlog_];
}

- initWithClass: (Class)class_
     andBackLog: (int)backlog_
{
	if ((self = [super initWithClass: class_])) {

		backlog = backlog_;
		err = GET_SOCK_ERR;
	}

	return self;
}

- (const char*)cString
{
	if (string != NULL)







|
>
|
|
<







682
683
684
685
686
687
688
689
690
691
692

693
694
695
696
697
698
699
	return [[self alloc] initWithClass: class_
				andBackLog: backlog_];
}

- initWithClass: (Class)class_
     andBackLog: (int)backlog_
{
	self = [super initWithClass: class_];

	backlog = backlog_;
	err = GET_SOCK_ERR;


	return self;
}

- (const char*)cString
{
	if (string != NULL)
711
712
713
714
715
716
717
718

719
720
721
722
723
724
725
726
	return backlog;
}
@end

@implementation OFAcceptFailedException
- initWithClass: (Class)class_
{
	if ((self = [super initWithClass: class_]))

		err = GET_SOCK_ERR;

	return self;
}

- (const char*)cString
{
	if (string != NULL)







|
>
|







715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
	return backlog;
}
@end

@implementation OFAcceptFailedException
- initWithClass: (Class)class_
{
	self = [super initWithClass: class_];

	err = GET_SOCK_ERR;

	return self;
}

- (const char*)cString
{
	if (string != NULL)