ObjFW  Diff

Differences From Artifact [dd1167284f]:

To Artifact [23de019f51]:


30
31
32
33
34
35
36


37
38
39
40
41
42
43
#ifdef OF_THREADS
# import "OFThread.h"
#endif

#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"



#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
    defined(OF_THREADS)
static OFMutex *mutex;
#endif

#ifdef HAVE_GMTIME_R







>
>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifdef OF_THREADS
# import "OFThread.h"
#endif

#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"

#import "macros.h"

#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
    defined(OF_THREADS)
static OFMutex *mutex;
#endif

#ifdef HAVE_GMTIME_R
291
292
293
294
295
296
297

























298
299
300
301
302
303
304

	if (otherDate->seconds != seconds ||
	    otherDate->microseconds != microseconds)
		return NO;

	return YES;
}


























- copy
{
	return [self retain];
}

- (of_comparison_result_t)compare: (id)object







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

	if (otherDate->seconds != seconds ||
	    otherDate->microseconds != microseconds)
		return NO;

	return YES;
}

- (uint32_t)hash
{
	uint32_t hash;

	OF_HASH_INIT(hash);

	OF_HASH_ADD(hash, (seconds >> 56) & 0xFF);
	OF_HASH_ADD(hash, (seconds >> 48) & 0xFF);
	OF_HASH_ADD(hash, (seconds >> 40) & 0xFF);
	OF_HASH_ADD(hash, (seconds >> 32) & 0xFF);
	OF_HASH_ADD(hash, (seconds >> 24) & 0xFF);
	OF_HASH_ADD(hash, (seconds >> 16) & 0xFF);
	OF_HASH_ADD(hash, (seconds >> 8) & 0xFF);
	OF_HASH_ADD(hash, seconds & 0xFF);

	OF_HASH_ADD(hash, (microseconds >> 24) & 0xFF);
	OF_HASH_ADD(hash, (microseconds >> 16) & 0xFF);
	OF_HASH_ADD(hash, (microseconds >> 8) & 0xFF);
	OF_HASH_ADD(hash, microseconds & 0xFF);

	OF_HASH_FINALIZE(hash);

	return hash;
}

- copy
{
	return [self retain];
}

- (of_comparison_result_t)compare: (id)object