ObjFW  Check-in [cb2058b0d8]

Overview
Comment:Merge a few changesets from the default branch into the 0.3 branch.

Changesets:
* 4122c2fe2aaa
* 5280d39d0a1a
* 7dcedafb43a4
* 1a7bc2049db1
* 12cc1ee22047

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.3
Files: files | file ages | folders
SHA3-256: cb2058b0d8fddf950bb240efbc9ff143ea21272c743002e40c5a42623b2ca5e6
User & Date: js on 2010-06-17 20:17:04
Other Links: branch diff | manifest | tags
Context
2010-06-19
15:48
Update ChangeLog in 0.3 branch. check-in: d8bd978d81 user: js tags: 0.3
2010-06-17
20:17
Merge a few changesets from the default branch into the 0.3 branch. check-in: cb2058b0d8 user: js tags: 0.3
2010-05-09
14:47
Update ChangeLog in 0.3 branch. check-in: 81e7a2c276 user: js tags: 0.3, 0.3-release
Changes

Modified PLATFORMS from [8d9a4a948b] to [31b43e99c6].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

ObjFW is known to work on the following platforms, but should run on
many others as well:

 +-------------------------+--------------+----------------------+
 | OS                      | Architecture | Compiler             |
 +-------------------------+--------------+----------------------+
 | FreeBSD >= 8.0          | x86          |                      |
 +-------------------------+--------------+----------------------+
 | Linux                   | x86          | gcc 4.4.1            |
 | Linux                   | x86          | llvm/clang r83252    |
 | Linux                   | x86_64       | gcc 4.4.1            |
 +-------------------------+--------------+----------------------+
 | iPhone OS >= 2.2.1      | arm          | gcc 4.2              |
 | Mac OS X >= 10.5        | ppc          | gcc 4.0 + 4.2        |
 | Mac OS X >= 10.5        | ppc64        | gcc 4.0 + 4.2        |
 | Mac OS X >= 10.5        | x86          | gcc 4.0 + 4.2        |
 | Mac OS X >= 10.5        | x86_64       | gcc 4.0 + 4.2        |
 +-------------------------+--------------+----------------------+
 | MirBSD >= 10uAB         | x86          | gcc 4.4.2            |
 +-------------------------+--------------+----------------------+
 | NetBSD >= 4.0           | x86          | gcc 4.1.2 prerelease |
 +-------------------------+--------------+----------------------+
 | OpenBSD >= 4.6          | x86_64       | gcc 4.2.4            |
 +-------------------------+--------------+----------------------+
 | OpenSolaris >= 2009.06  | x86          |                      |
 | OpenSolaris >= 2009.06  | x86_64       |                      |
 +-------------------------+--------------+----------------------+
 | Windows >= XP / cygwin  | x86          |                      |
 | Windows >= XP / mingw32 | x86          |                      |
 +-------------------------+--------------+----------------------+

Basically, it should run on any POSIX system to which gcc4 has been
ported. If not, please send a bug report.




|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
>
1
2
3
4
5
6
7
8
9
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
ObjFW is known to work on the following platforms, but should run on
many others as well:

 +--------------------------+--------------+----------------------+---------+
 | OS                       | Architecture | Compiler             | Runtime |
 +--------------------------+--------------+----------------------+---------+
 | FreeBSD 8.0              | x86          |                      | GNU     |
 +--------------------------+--------------+----------------------+---------+
 | Linux 2.6.*              | x86          | gcc 4.4.1            | GNU     |
 | Linux 2.6.*              | x86          | llvm/clang r83252    | GNU     |
 | Linux 2.6.*              | x86_64       | gcc 4.4.1            | GNU     |
 +--------------------------+--------------+----------------------+---------+
 | iPhone OS 2.2.1 - 3.1.2  | arm          | gcc 4.2              | Apple   |
 | Mac OS X 10.5            | ppc          | gcc 4.0 + 4.2        | Apple   |
 | Mac OS X 10.5            | ppc64        | gcc 4.0 + 4.2        | Apple   |
 | Mac OS X 10.5 - 10.6     | x86          | gcc 4.0 + 4.2        | Apple   |
 | Mac OS X 10.5 - 10.6     | x86_64       | gcc 4.0 + 4.2        | Apple   |
 +--------------------------+--------------+----------------------+---------+
 | MirBSD 10uAB             | x86          | gcc 4.4.2            | GNU     |
 +--------------------------+--------------+----------------------+---------+
 | NetBSD 4.0               | x86          | gcc 4.1.2 prerelease | GNU     |
 +--------------------------+--------------+----------------------+---------+
 | OpenBSD 4.6              | x86_64       | gcc 4.2.4            | GNU     |
 +--------------------------+--------------+----------------------+---------+
 | OpenSolaris 2009.06      | x86          |                      | GNU     |
 | OpenSolaris 2009.06      | x86_64       |                      | GNU     |
 +--------------------------+--------------+----------------------+---------+
 | Windows XP - 7 / cygwin  | x86          |                      | GNU     |
 | Windows XP - 7 / mingw32 | x86          |                      | GNU     |
 +--------------------------+--------------+----------------------+---------+

Basically, it should run on any POSIX system to which gcc4 or a recent
clang version has been ported. If not, please send an e-mail with a bug
report.

Modified src/OFArray.m from [af5a656bb6] to [38df47daa4].

370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
- initWithDataArray: (OFDataArray*)array_
   mutationsPointer: (unsigned long*)mutationsPtr_;
{
	self = [super init];

	array = array_;
	count = [array_ count];
	mutations = *mutationsPtr_;
	mutationsPtr = mutationsPtr_;

	return self;
}

- (id)nextObject
{







|







370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
- initWithDataArray: (OFDataArray*)array_
   mutationsPointer: (unsigned long*)mutationsPtr_;
{
	self = [super init];

	array = array_;
	count = [array_ count];
	mutations = (mutationsPtr_ != NULL ? *mutationsPtr_ : 0);
	mutationsPtr = mutationsPtr_;

	return self;
}

- (id)nextObject
{

Modified src/OFDictionary.m from [0083ef4288] to [d6200e89ce].

686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
	      size: (uint32_t)size_
  mutationsPointer: (unsigned long*)mutationsPtr_
{
	self = [super init];

	data = data_;
	size = size_;
	mutations = *mutationsPtr_;
	mutationsPtr = mutationsPtr_;

	return self;
}

- (void)reset
{







|







686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
	      size: (uint32_t)size_
  mutationsPointer: (unsigned long*)mutationsPtr_
{
	self = [super init];

	data = data_;
	size = size_;
	mutations = (mutationsPtr_ != NULL ? *mutationsPtr_ : 0);
	mutationsPtr = mutationsPtr_;

	return self;
}

- (void)reset
{

Modified src/OFMutableDictionary.m from [5339feda90] to [c74680827d].

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
			for (; j < last && newdata[j] != NULL; j++);

			/* In case the last bucket is already used */
			if (j >= last) {
				last = data[i]->hash & (newsize - 1);

				for (j = 0; j < last &&
				    newdata[j] != NULL; i++);
			}

			if (j >= last) {
				[self freeMemory: newdata];
				@throw [OFOutOfRangeException
				    newWithClass: isa];
			}







|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
			for (; j < last && newdata[j] != NULL; j++);

			/* In case the last bucket is already used */
			if (j >= last) {
				last = data[i]->hash & (newsize - 1);

				for (j = 0; j < last &&
				    newdata[j] != NULL; j++);
			}

			if (j >= last) {
				[self freeMemory: newdata];
				@throw [OFOutOfRangeException
				    newWithClass: isa];
			}

Modified tests/objc_sync/test.m from [53e6bbc1b9] to [935014e663].

41
42
43
44
45
46
47



48
49
50
51
52
53

int
main()
{
	lock = [[OFObject alloc] init];
	MyThread *t1 = [MyThread threadWithObject: @"A"];
	MyThread *t2 = [MyThread threadWithObject: @"B"];




	[t1 join];
	[t2 join];

	return 0;
}







>
>
>






41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

int
main()
{
	lock = [[OFObject alloc] init];
	MyThread *t1 = [MyThread threadWithObject: @"A"];
	MyThread *t2 = [MyThread threadWithObject: @"B"];

	[t1 start];
	[t2 start];

	[t1 join];
	[t2 join];

	return 0;
}