ObjFW  Diff

Differences From Artifact [a5359bc24a]:

  • File src/macros.h — part of check-in [2fb22c605b] at 2015-10-01 20:34:22 on branch trunk — Use _Nullable instead of __nullable

    Same for _Nonnull / __nonnull.

    Apple implemented it as __nullable / __nonnull in their version of Clang
    and sent that for upstreaming. My inital comments about this being a
    potential problem and to better use _Nullable / _Nonnull had been
    rejected as being too late, so I assumed it stayed that way. But
    apparently, it has been changed to _Nullable / _Nonnull before the 3.7.0
    release. (user: js, size: 14924) [annotate] [blame] [check-ins using] [more...]

To Artifact [a7d0bdefbc]:


579
580
581
582
583
584
585


















586
587
588
589
590
591
592
	{							\
		uint32_t otherCopy = other;			\
		OF_HASH_ADD(hash, (otherCopy >> 24) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >> 16) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >>  8) & 0xFF);	\
		OF_HASH_ADD(hash, otherCopy & 0xFF);		\
	}



















static OF_INLINE char*
of_strdup(const char *string)
{
	char *copy;
	size_t length = strlen(string);








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







579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
	{							\
		uint32_t otherCopy = other;			\
		OF_HASH_ADD(hash, (otherCopy >> 24) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >> 16) & 0xFF);	\
		OF_HASH_ADD(hash, (otherCopy >>  8) & 0xFF);	\
		OF_HASH_ADD(hash, otherCopy & 0xFF);		\
	}

static OF_INLINE bool
of_bitset_isset(uint8_t *storage, size_t index)
{
	return storage[index / 8] & (1 << (index % 8));
}

static OF_INLINE void
of_bitset_set(uint8_t *storage, size_t index)
{
	storage[index / 8] |= (1 << (index % 8));
}

static OF_INLINE void
of_bitset_clear(uint8_t *storage, size_t index)
{
	storage[index / 8] &= ~(1 << (index % 8));
}

static OF_INLINE char*
of_strdup(const char *string)
{
	char *copy;
	size_t length = strlen(string);