Overview
Comment: | Split OFDictionary into OFDictionary and OFMutableDictionary. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
71abb030af44fd408499cba41c2cbfb0 |
User & Date: | js on 2009-05-18 20:53:42 |
Other Links: | manifest | tags |
Context
2009-05-18
| ||
22:09 | Fix error handling in init methods in OFArray. check-in: cc6d2d3987 user: js tags: trunk | |
20:53 | Split OFDictionary into OFDictionary and OFMutableDictionary. check-in: 71abb030af user: js tags: trunk | |
20:41 | Add one more convenience method to OFArray. check-in: 7107bd9906 user: js tags: trunk | |
Changes
Modified src/Makefile from [74096cf5ac] to [df14000352].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | + | OFDictionary.m \ OFExceptions.m \ OFFile.m \ OFHashes.m \ OFIterator.m \ OFList.m \ OFMutableArray.m \ OFMutableDictionary.m \ OFMutableString.m \ OFNumber.m \ OFObject.m \ ${OFPLUGIN_M} \ OFSocket.m \ OFStream.m \ OFString.m \ |
︙ |
Modified src/OFDictionary.h from [aa683549c8] to [e068e112c6].
︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | + + + + + + + + + + + + + - - - - - - - - - - - - - + | * Initializes an already allocated OFDictionary with a hash of N bits. * * \param bits The size of the hash to use * \return An initialized OFDictionary */ - initWithHashSize: (int)hashsize; /** * \return The average number of items in a used bucket. Buckets that are * completely empty are not in the calculation. If this value is >= 2.0, * you should resize the dictionary, in most cases even earlier! */ - (float)averageItemsPerBucket; /** * \param key The key whose object should be returned * \return The object for the given key or nil if the key was not found */ - (id)get: (OFObject*)key; /** * Sets a key to an object. A key can be any object. * * \param key The key to set * \param obj The object to set the key to */ - set: (OFObject <OFCopying>*)key to: (OFObject*)obj; |
Modified src/OFDictionary.m from [22afc84d9d] to [c51c9bd24f].
︙ | |||
12 13 14 15 16 17 18 | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - + - + | #import "config.h" #include <string.h> #import "OFDictionary.h" #import "OFIterator.h" #import "OFExceptions.h" |
︙ | |||
84 85 86 87 88 89 90 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + - + - - - - + - - - + - - - + - - - + - - - - - - - + - - + - - - - - - + - - - - - - - - - - - - - - - - + | @throw e; } memset(data, 0, size * sizeof(OFList*)); return self; } |
︙ | |||
157 158 159 160 161 162 163 164 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + - - - - + + - - - - + + + - - - - - - - - - + + - - - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + | for (iter = [data[hash] first]; iter != NULL; iter = iter->next->next) if ([iter->object isEqual: key]) return iter->next->object; return nil; } |
Added src/OFMutableDictionary.h version [457d6af9f3].
|
Added src/OFMutableDictionary.m version [e1b66eccc2].