ObjFW  Diff

Differences From Artifact [fd3e18f82c]:

  • File src/OFMacros.h — part of check-in [f1b749d113] at 2009-01-05 00:59:06 on branch trunk — Update copyright. (user: js size: 1057)

To Artifact [ec8a81722f]:

  • File src/OFMacros.h — part of check-in [ffd26c8238] at 2009-02-27 11:17:54 on branch trunk — Add - hash for OFArray and OFString, main implementation in OFMacros. (user: js size: 1332)

38
39
40
41
42
43
44














}
#else
#define OF_BSWAP_V(buf, len)
#endif

#define OF_ROL(val, bits) \
	(((val) << (bits)) | ((val) >> (32 - (bits))))





















>
>
>
>
>
>
>
>
>
>
>
>
>
>
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
}
#else
#define OF_BSWAP_V(buf, len)
#endif

#define OF_ROL(val, bits) \
	(((val) << (bits)) | ((val) >> (32 - (bits))))

#define OF_HASH_INIT(hash) hash = 0
#define OF_HASH_ADD(hash, byte)		\
	{				\
		hash += byte;		\
		hash += (hash << 10);	\
		hash ^= (hash >> 6);	\
	}
#define OF_HASH_FINALIZE(hash)		\
	{				\
		hash += (hash << 3);	\
		hash ^= (hash >> 11);	\
		hash += (hash << 15);	\
	}