ObjFW  Diff

Differences From Artifact [c2a0d12c52]:

To Artifact [8038342f92]:

  • File src/OFDictionary.h — part of check-in [24ecf55297] at 2009-06-29 12:33:59 on branch trunk — Changes to OFDictionary, OFIterator and OFList - see details.

    OFDictionary:
    * More optimized way to internally store the data.
    * Faster resizing of dictionaries (no rehashing anymore).

    OFIterator:
    * Return a key/object pair rather than first the key and then the
    object.

    OFList:
    * Support for list objects with a different size so you can have your
    own list object structs. (user: js, size: 3812) [annotate] [blame] [check-ins using]


10
11
12
13
14
15
16











17
18
19
20
21
22
23
 */

#include <stdarg.h>

#import "OFObject.h"
#import "OFList.h"
#import "OFArray.h"












/**
 * The OFDictionary class provides a class for using hash tables.
 */
@interface OFDictionary: OFObject
{
	OFList **data;







>
>
>
>
>
>
>
>
>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 */

#include <stdarg.h>

#import "OFObject.h"
#import "OFList.h"
#import "OFArray.h"

typedef struct __of_dictionary_list_object
{
	/* of_list_object_t */
	struct __of_dictionary_list_object *next;
	struct __of_dictionary_list_object *prev;
	id				   object;
	/* OFDictionary additions */
	id				   key;
	uint32_t			   hash;
} of_dictionary_list_object_t;

/**
 * The OFDictionary class provides a class for using hash tables.
 */
@interface OFDictionary: OFObject
{
	OFList **data;