ObjFW  Diff

Differences From Artifact [df05949c71]:

To Artifact [e989a30df6]:


840
841
842
843
844
845
846

847












848
849
850
851
852

853
854
855
856
857
858
859
	/* Classes containing data should reimplement this! */
	return (self == object);
}

- (uint32_t)hash
{
	/* Classes containing data should reimplement this! */

	return (uint32_t)(uintptr_t)self;












}

- (OFString*)description
{
	/* Classes containing data should reimplement this! */

	return [OFString stringWithFormat: @"<%@: %p>", [self className], self];
}

- (void*)allocMemoryWithSize: (size_t)size
{
	void *pointer;
	struct pre_mem *preMem;







>
|
>
>
>
>
>
>
>
>
>
>
>
>





>







840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
	/* Classes containing data should reimplement this! */
	return (self == object);
}

- (uint32_t)hash
{
	/* Classes containing data should reimplement this! */

	uintptr_t ptr = (uintptr_t)self;
	uint32_t hash;

	OF_HASH_INIT(hash);

	while (ptr != 0) {
		OF_HASH_ADD(hash, ptr & 0xFF);
		ptr <<= 8;
	}

	OF_HASH_FINALIZE(hash);

	return hash;
}

- (OFString*)description
{
	/* Classes containing data should reimplement this! */

	return [OFString stringWithFormat: @"<%@: %p>", [self className], self];
}

- (void*)allocMemoryWithSize: (size_t)size
{
	void *pointer;
	struct pre_mem *preMem;