ObjFW  Diff

Differences From Artifact [8ea4251805]:

To Artifact [da30bcc8d4]:


14
15
16
17
18
19
20

21
22
23
24
25
26
27
28
29
#include <string.h>

#import "OFMutableDictionary.h"
#import "OFExceptions.h"
#import "OFMacros.h"

@implementation OFMutableDictionary

- set: (OFObject <OFCopying>*)key
   to: (OFObject*)obj
{
	uint32_t hash;
	of_list_object_t *iter, *key_obj;

	if (key == nil || obj == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						    andSelector: _cmd];







>
|
<







14
15
16
17
18
19
20
21
22

23
24
25
26
27
28
29
#include <string.h>

#import "OFMutableDictionary.h"
#import "OFExceptions.h"
#import "OFMacros.h"

@implementation OFMutableDictionary
- setObject: (OFObject*)obj
     forKey: (OFObject <OFCopying>*)key

{
	uint32_t hash;
	of_list_object_t *iter, *key_obj;

	if (key == nil || obj == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						    andSelector: _cmd];
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
		[data[hash] remove: key_obj];
		@throw e;
	}

	return self;
}

- remove: (OFObject*)key
{
	uint32_t hash;
	of_list_object_t *iter;

	if (key == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						    andSelector: _cmd];







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
		[data[hash] remove: key_obj];
		@throw e;
	}

	return self;
}

- removeObjectForKey: (OFObject*)key
{
	uint32_t hash;
	of_list_object_t *iter;

	if (key == nil)
		@throw [OFInvalidArgumentException newWithClass: isa
						    andSelector: _cmd];