ObjFW  History of src/OFMapTable.m of ed3b07591c9711c5

History of the file that is called src/OFMapTable.m at check-in ed3b07591c9711c5

2024-02-18
13:53
OFMapTable: Improve enumeration mutation detection file: [77fd4c4f10] check-in: [ab14af79d2] user: js, branch: trunk, size: 16962 [annotate] [blame] [check-ins using] [diff]
2024-02-12
19:55
OFMapTable: Fix type mismatch on OFHashSeed file: [3e827255d3] check-in: [26ea8fefec] user: js, branch: trunk, size: 16963 [annotate] [blame] [check-ins using] [diff]
2024-01-02
17:17
Update copyright file: [810b88a011] check-in: [26ddd2e4e4] user: js, branch: trunk, size: 16958 [annotate] [blame] [check-ins using] [diff]
2023-07-19
21:00
OFMapTable: Change the rotation when resizing file: [00903dc5ce] check-in: [cdc49aa375] user: js, branch: trunk, size: 16958 [annotate] [blame] [check-ins using] [diff]
2023-01-06
09:04
Update copyright file: [fd0add4a94] check-in: [8939cbdb52] user: js, branch: trunk, size: 16601 [annotate] [blame] [check-ins using] [diff]
2022-11-16
01:27
Add OFAssert()

This uses the same format as OFEnsure(). file: [2885d27493] check-in: [c86b8f10f0] user: js, branch: trunk, size: 16601 [annotate] [blame] [check-ins using] [diff]

2022-09-12
14:34
Either restrict subclassing or reserve ivars file: [61602c79fe] check-in: [c40a295629] user: js, branch: trunk, size: 16622 [annotate] [blame] [check-ins using] [diff]
2022-02-12
07:46
Update copyright file: [155910f8b1] check-in: [1a86b8175b] user: js, branch: trunk, size: 16598 [annotate] [blame] [check-ins using] [diff]
2021-12-24
11:06
OFMapTable: Fix rotating with the wrong size

This essentially made it a shift rather than a rotate, sometimes
shifting most or even all of the bits out and making all hashes collide. file: [0eba9a13be] check-in: [ae4879fe0d] user: js, branch: trunk, size: 16598 [annotate] [blame] [check-ins using] [diff]

2021-04-30
21:23
Make OFHashSeed private file: [37fa19bf82] check-in: [39863b3503] user: js, branch: trunk, size: 16659 [annotate] [blame] [check-ins using] [diff]
2021-04-25
11:05
A few last renames file: [6075b5b12b] check-in: [27103855c2] user: js, branch: new-naming-convention, size: 16625 [annotate] [blame] [check-ins using] [diff]
2021-04-19
21:07
Rename all struct of_* file: [963c916eb5] check-in: [c81086beeb] user: js, branch: new-naming-convention, size: 16451 [annotate] [blame] [check-ins using] [diff]
2021-04-18
15:55
Rename all functions in macros.h file: [8cb89e6a68] check-in: [7392685ffc] user: js, branch: new-naming-convention, size: 16469 [annotate] [blame] [check-ins using] [diff]
13:24
Rename remaining functions in OFObject.h file: [a5b94365d5] check-in: [d9f8960fc5] user: js, branch: new-naming-convention, size: 16437 [annotate] [blame] [check-ins using] [diff]
2021-04-17
22:45
Rename of_(re)alloc and add OFFreeMemory file: [717a250a20] check-in: [498074dab9] user: js, branch: new-naming-convention, size: 16443 [annotate] [blame] [check-ins using] [diff]
14:21
of_map_table_functions_t -> OFMapTableFunctions file: [878b273561] check-in: [943d9bd388] user: js, branch: new-naming-convention, size: 16362 [annotate] [blame] [check-ins using] [diff]
03:21
Rename all blocks file: [69ee51ce08] check-in: [c4e0e56fa3] user: js, branch: new-naming-convention, size: 16426 [annotate] [blame] [check-ins using] [diff]
02:43
Rename of_fast_enumeration_state_t file: [f62fe0ab1f] check-in: [ed3b07591c] user: js, branch: new-naming-convention, size: 16442 [annotate] [blame] [check-ins using] [diff]
2021-03-08
00:04
Make GCC happy again file: [8788cb21e4] check-in: [eb328735f2] user: js, branch: trunk, size: 16447 [annotate] [blame] [check-ins using] [diff]
2021-03-07
20:25
*.m: Fold methods into one line where it fits file: [79fa6ef127] check-in: [1b82d3bf4f] user: js, branch: trunk, size: 16447 [annotate] [blame] [check-ins using] [diff]
02:36
Style change: Allow more than 1 argument per line

This is only migrating some places, others will be migrated as they are
touched. file: [9ddf5a7d27] check-in: [a0fd103a0b] user: js, branch: trunk, size: 16291 [annotate] [blame] [check-ins using] [diff]

2021-01-02
22:04
Update copyright file: [b3889238ba] check-in: [374e1a1bfa] user: js, branch: trunk, size: 16309 [annotate] [blame] [check-ins using] [diff]
2020-11-14
12:23
Rename of_malloc and of_calloc

The new names should be more accurate. file: [6adf8ae2bb] check-in: [627511b032] user: js, branch: trunk, size: 16398 [annotate] [blame] [check-ins using] [diff]

2020-11-05
02:27
Further reduce usage of -[allocMemoryWithSize:] file: [bb1c57067e] check-in: [da1fb6b21c] user: js, branch: trunk, size: 16387 [annotate] [blame] [check-ins using] [diff]
2020-10-10
14:27
OFObject: Change type of -[hash] to unsigned long

The internal hash is still 32 bit in most places, but this way, it is at
least not baked into the API and ABI and can be upgraded later, should
that ever be necessary. file: [8775708778] check-in: [aeb403a1ed] user: js, branch: trunk, size: 16545 [annotate] [blame] [check-ins using] [diff]

2020-07-12
10:35
Split of_random() into of_random{16,32,64}() file: [ec26b7463a] check-in: [14f05841a3] user: js, branch: trunk, size: 16442 [annotate] [blame] [check-ins using] [diff]
2020-06-28
15:03
Use OF_DIRECT(_MEMBERS) where appropriate file: [8ca8ae429a] check-in: [b6cb3addd0] user: js, branch: trunk, size: 16438 [annotate] [blame] [check-ins using] [diff]
2020-01-02
01:51
Update copyright file: [df5b78cbf7] check-in: [c7f0229795] user: js, branch: trunk, size: 16392 [annotate] [blame] [check-ins using] [diff]
2019-06-19
00:45
OFEnumerator: Remove -[reset]

It's not very useful and is a problem for the Foundation bridge, as
NSEnumerator does not have it. file: [889ef07313] check-in: [7214a2c7af] user: js, branch: trunk, size: 16389 [annotate] [blame] [check-ins using] [diff]

2019-06-17
02:33
Remove underscores from class names file: [916c94f96d] check-in: [17d57e01ff] user: js, branch: trunk, size: 16719 [annotate] [blame] [check-ins using] [diff]
2019-01-03
19:13
Update copyright file: [566bcf99cb] check-in: [0509d7a844] user: js, branch: trunk, size: 16720 [annotate] [blame] [check-ins using] [diff]
2018-07-28
16:48
macros.h: Add of_random()

This does *NOT* provide cryptographically secure randomness! file: [021ca59238] check-in: [a2a06d372a] user: js, branch: trunk, size: 16714 [annotate] [blame] [check-ins using] [diff]

2018-06-03
23:31
Add -[OFObject allocZeroedMemoryWithSize:(count:)] file: [bcee3b5d39] check-in: [aacb5897a0] user: js, branch: trunk, size: 16960 [annotate] [blame] [check-ins using] [diff]
2018-01-03
19:49
Update copyright notice file: [bdc38c2ac6] check-in: [7e5c81e186] user: js, branch: trunk, size: 17056 [annotate] [blame] [check-ins using] [diff]
2017-11-11
23:27
Small optimization for -[isEqual:] file: [1089d5714e] check-in: [526feacebc] user: js, branch: trunk, size: 17033 [annotate] [blame] [check-ins using] [diff]
2017-10-17
00:33
Do not use implicit method return types

Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. file: [18b269539e] check-in: [2f4e0df8be] user: js, branch: trunk, size: 16996 [annotate] [blame] [check-ins using] [diff]

2017-10-11
20:59
Fix shadowed variables and enable -Wshadow file: [1517e60617] check-in: [836314f39a] user: js, branch: 0.90, size: 16849 [annotate] [blame] [check-ins using] [diff]
20:53
Fix shadowed variables and enable -Wshadow file: [2c59c12f0d] check-in: [00476e4430] user: js, branch: trunk, size: 16922 [annotate] [blame] [check-ins using] [diff]
2017-09-28
23:02
Enable -Wnullable-to-nonnull-conversion and adjust file: [73724a7b07] check-in: [2de9660312] user: js, branch: trunk, size: 16914 [annotate] [blame] [check-ins using] [diff]
2017-05-21
21:28
Prefix private methods with of_ instead of OF_

This matches Apple's style. file: [9a08c57256] check-in: [6b77a5dd8b] user: js, branch: trunk, size: 16841 [annotate] [blame] [check-ins using] [diff]

2017-05-08
21:37
Add OF_DESIGNATED_INITIALIZER & OF_METHOD_FAMILY file: [654a4184b9] check-in: [469a496cd2] user: js, branch: trunk, size: 16841 [annotate] [blame] [check-ins using] [diff]
2017-05-07
20:10
Small code style change

Casts are now written like types in variable declarations. file: [0faf59214b] check-in: [4af49a13c3] user: js, branch: trunk, size: 16814 [annotate] [blame] [check-ins using] [diff]

2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [69937f5d0f] check-in: [44f45c2e35] user: js, branch: trunk, size: 16788 [annotate] [blame] [check-ins using] [diff]

2016-06-04
18:49
OFMapTable: Rename valueForKey to objectForKey

The reason for this is that -[valueForKey:] could be confused with
Key Value Coding. file: [f6af531a58] check-in: [1ba9c051a6] user: js, branch: trunk, size: 16782 [annotate] [blame] [check-ins using] [diff]

2016-02-21
15:37
Make use of C99-style for loops file: [d08b0754f8] check-in: [e0b9167693] user: js, branch: trunk, size: 16668 [annotate] [blame] [check-ins using] [diff]
2016-01-03
00:43
Update copyright

While at it, also update the mail address. file: [32a1b1967d] check-in: [cec0f072f8] user: js, branch: 0.8, size: 16797 [annotate] [blame] [check-ins using] [diff]

00:41
Update copyright

While at it, also update the mail address. file: [0f58c455bb] check-in: [2a27cf3000] user: js, branch: trunk, size: 16694 [annotate] [blame] [check-ins using] [diff]

2015-11-29
14:23
Clean up class extensions

Now that we can require GCC >= 4.6, we no longer need to fall back to
using a category on old compilers. file: [a593ea3dae] check-in: [2aca549d60] user: js, branch: trunk, size: 16690 [annotate] [blame] [check-ins using] [diff]

11:43
Make properties a requirement and clean up code

This increases the required GCC version from 4.0 to 4.6 (exception:
Apple GCC, which already supports this with >= 4.0 starting with OS X
10.5). Since even GCC 4.6 is really old by now, there is no point in
still supporting something even older and making the code ugly because
of that. While some hardware and OS support was dropped from GCC 4.6
compared to GCC 4.0, there is nothing in there that would be an
interesting target with the exception of BeOS maybe - but a port to BeOS
can also be achieved using the Haiku support. The other dropped OSes are
mostly old versions of OSes while newer ones are still being supported
(and those newer versions of those OSes still support the same
hardware). file: [1fa0a57947] check-in: [48980f2297] user: js, branch: trunk, size: 16728 [annotate] [blame] [check-ins using] [diff]

2015-06-28
16:16
Extremely minor API inconsistency fix file: [ccd71cdedf] check-in: [1b1db13483] user: js, branch: trunk, size: 16793 [annotate] [blame] [check-ins using] [diff]
2015-04-11
12:56
OFMapTable.m: Fix a missing include file: [101f595560] check-in: [dc43cd0d1b] user: js, branch: trunk, size: 16797 [annotate] [blame] [check-ins using] [diff]
2015-01-03
20:57
Update copyright file: [b0de075c30] check-in: [cfd374b906] user: js, branch: trunk, size: 16777 [annotate] [blame] [check-ins using] [diff]
2014-06-21
21:43
Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. file: [bf79826698] check-in: [13ee56edf3] user: js, branch: trunk, size: 16771 [annotate] [blame] [check-ins using] [diff]

2014-05-15
04:06
Remove usage of empty initializer extension file: [05916c8969] check-in: [f178d11592] user: js, branch: trunk, size: 16791 [annotate] [blame] [check-ins using] [diff]
01:50
Don't define _*_SOURCE

Instead, just define _GNU_SOURCE when __GLIBC__ is defined. After all,
that's the only libc that doesn't work properly without any defines. file: [3156715ede] check-in: [17be12b6e5] user: js, branch: trunk, size: 16788 [annotate] [blame] [check-ins using] [diff]

2014-04-06
14:40
runtime/hashtable.m: Add support for deletion file: [8840bb8cc2] check-in: [c2d9134d88] user: js, branch: trunk, size: 16809 [annotate] [blame] [check-ins using] [diff]
2014-02-13
23:26
Use -std=c11 instead of -std=gnu11

Not using -std=gnu11 means _GNU_SOURCE does not get defined anymore,
therefore this commit also adds the required feature defines for glibc.

Additionally, this adds of_strdup in macros.h, as strdup is an
extension. file: [dffae0d500] check-in: [2f5af58573] user: js, branch: trunk, size: 16742 [annotate] [blame] [check-ins using] [diff]

2014-01-04
00:24
Update copyright. file: [9d63848c2d] check-in: [3b97fc3cd9] user: js, branch: trunk, size: 16721 [annotate] [blame] [check-ins using] [diff]
2013-12-05
17:48
Make coding style consistent.

A file documenting the coding style will be written soon. This will
hopefully prevent conflicts in the future, such as whether static
functions are written in camelCase or_with_underscores, like was the
case here. file: [8882363f15] check-in: [fa6496efc7] user: js, branch: trunk, size: 16715 [annotate] [blame] [check-ins using] [diff]

2013-12-01
12:12
Make OFMapTableEnumeratorWrapper private. file: [7ccafaf30f] check-in: [d7b691c402] user: js, branch: trunk, size: 16727 [annotate] [blame] [check-ins using] [diff]
11:51
OFMapTable: More overflow checks. file: [484e7b21c8] check-in: [6085d4f6a4] user: js, branch: trunk, size: 16695 [annotate] [blame] [check-ins using] [diff]
2013-11-23
01:27
Add OF_UNRECOGNIZED_SELECTOR. file: [74b5d78ed2] check-in: [6e19bd47ee] user: js, branch: trunk, size: 16595 [annotate] [blame] [check-ins using] [diff]
01:12
Add OF_INVALID_INIT_METHOD. file: [3c5a2f693b] check-in: [35dafd5c57] user: js, branch: trunk, size: 16639 [annotate] [blame] [check-ins using] [diff]
2013-10-29
09:37
Add a missing (instancetype). file: [08236d7fb2] check-in: [52efbc4b8f] user: js, branch: trunk, size: 16815 [annotate] [blame] [check-ins using] [diff]
2013-08-15
19:00
Move private methods into private headers. file: [1f413086d9] check-in: [1d7a1cbca0] user: js, branch: trunk, size: 16801 [annotate] [blame] [check-ins using] [diff]
2013-08-13
10:39
Add a few more instancetypes. file: [162f4f232a] check-in: [73ae6fa60f] user: js, branch: trunk, size: 16415 [annotate] [blame] [check-ins using] [diff]
2013-08-10
23:12
Add -[OFMutableDictionary removeAllObjects]. file: [360a62d844] check-in: [aae02e7970] user: js, branch: trunk, size: 16401 [annotate] [blame] [check-ins using] [diff]
2013-06-22
12:12
Rework exceptions.

This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.

This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. file: [40dcf1c644] check-in: [3d16a30f41] user: js, branch: trunk, size: 15634 [annotate] [blame] [check-ins using] [diff]

2013-05-04
10:05
OFMapTable: Minor corrections. file: [e861c4b211] check-in: [8a194de51c] user: js, branch: trunk, size: 16124 [annotate] [blame] [check-ins using] [diff]
2013-03-30
20:07
Improve code readability. file: [9fc4f60d3b] check-in: [57a6e8ef79] user: js, branch: trunk, size: 16120 [annotate] [blame] [check-ins using] [diff]
2013-03-08
22:44
Document the block types.

This also removes "bool *stop" from some blocks where it does not make
sense. file: [7caa69a7b0] check-in: [e8473b9db8] user: js, branch: trunk, size: 16124 [annotate] [blame] [check-ins using] [diff]

2013-03-04
17:20
Replace BOOL with bool.

The only places where BOOL is left are those where they are required by
the ABI. file: [f2d7d60333] check-in: [c5ef582958] user: js, branch: trunk, size: 16136 [annotate] [blame] [check-ins using] [diff]

2013-02-18
11:07
Add -[OFMutableDictionary initWithCapacity:].

This was already implemented in OFDictionary_hashtable for internal
usage and is now publicly available. file: [1f61a324ed] check-in: [4fb0f4bf66] user: js, branch: trunk, size: 16106 [annotate] [blame] [check-ins using] [diff]

2013-02-12
18:22
Prefix all ivars with an underscore. file: [212223cd50] check-in: [e40729d406] user: js, branch: trunk, size: 16041 [annotate] [blame] [check-ins using] [diff]
2013-02-05
22:24
Move abort() to make old GCCs happy. file: [01662f5402] check-in: [737a82e1a4] user: js, branch: trunk, size: 15886 [annotate] [blame] [check-ins using] [diff]
2013-01-12
20:53
Clean up the feature #ifdef mess. file: [299f6d68b0] check-in: [b8ce2359f3] user: js, branch: trunk, size: 15886 [annotate] [blame] [check-ins using] [diff]
2013-01-09
22:24
Update copyright. file: [996b96d265] check-in: [813c00ccf0] user: js, branch: trunk, size: 15892 [annotate] [blame] [check-ins using] [diff]
2013-01-03
22:26
OFMapTable: Rotate hashes randomly.

This makes the map table use the full range of the hash and not only the
least significant bits, making it harder for an attacker to find
collisions. file: [3a2a927b76] check-in: [7cebeaa808] user: js, branch: trunk, size: 15886 [annotate] [blame] [check-ins using] [diff]

2012-12-22
15:37
Add -[doesNotRecognizeSelector:]. file: [1a1f8d234d] check-in: [917ce5754c] user: js, branch: trunk, size: 15595 [annotate] [blame] [check-ins using] [diff]
2012-12-07
13:57
Revert several OFHashMap related commits.

This reverts:
* "Add a per-hashtable seed."
(cd49c7fcb4b8dca62dccdbf6545d37d86b639eef)
* "OFMapTable: Reseed on resize."
(5b545165691cd9ad838c9125b02ff7c857bd4b99)
* "Add of_random()."
(9810f191b4e8c1612e7e55095c87e589660fbdba)
* "OFMapTable: Rotate hash by a random number of bits"
(3bef412217232d01f202794f7175c130afa1df8f)

It turned out that these were slowing down all classes based on
OFHashMap significantly. As there is still no proof that the seeded
one-at-a-time hash is vulnerable to DoS, these changes were overly
paranoid. While overly paranoid is usually ok, it is not if it severely
impacts performance. file: [458807374d] check-in: [6712442fad] user: js, branch: trunk, size: 15686 [annotate] [blame] [check-ins using] [diff]

2012-12-06
11:00
OFMapTable: Rotate hash by a random number of bits

By rotating the hash by a random number of bits, an attacker needs to
find collisions on the full 32 bits of the hash and not only on the
lower n bits that are actually used by the map table, as an attacker
can't know which bits are actually used for the map table. file: [fda4d04529] check-in: [4857107479] user: js, branch: trunk, size: 16362 [annotate] [blame] [check-ins using] [diff]

11:00
Add of_random(). file: [ecdbc341ea] check-in: [f675979cf0] user: js, branch: trunk, size: 16069 [annotate] [blame] [check-ins using] [diff]
2012-12-05
21:28
OFMapTable: Reseed on resize. file: [06127d91bb] check-in: [f7018aedf9] user: js, branch: trunk, size: 16307 [annotate] [blame] [check-ins using] [diff]
2012-12-04
09:59
Add a per-hashtable seed.

This should make it impossible to retrieve of_hash_seed by inserting
keys into a hashtable and then retrieving the hashtable. Without this
change, the order could be used to make guesses about of_hash_seed,
which could be a problem for long running processes. file: [fac29d9273] check-in: [590fa6ed79] user: js, branch: trunk, size: 16029 [annotate] [blame] [check-ins using] [diff]

2012-12-01
17:50
OFSet_hashtable: Store in OFMapTable. file: [c18a26ad1f] check-in: [ed438b979d] user: js, branch: trunk, size: 15781 [annotate] [blame] [check-ins using] [diff]
17:26
Added: Add OFMapTable. file: [e82f78e00b] check-in: [6f081c14f9] user: js, branch: trunk, size: 15016 [annotate] [blame] [check-ins using]