ObjFW  Diff

Differences From Artifact [f7dad7806c]:

To Artifact [3858acab50]:


16
17
18
19
20
21
22

23
24
25
26
27
28
29

#import "OFObject.h"

#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>


#if defined(OF_APPLE_RUNTIME)
# import <objc/runtime.h>
#endif

#ifdef __GNUC__
# define OF_INLINE inline __attribute__((always_inline))







>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#import "OFObject.h"

#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#if defined(OF_APPLE_RUNTIME)
# import <objc/runtime.h>
#endif

#ifdef __GNUC__
# define OF_INLINE inline __attribute__((always_inline))
407
408
409
410
411
412
413














	of_rectangle_t rectangle = {
		of_point(x, y),
		of_dimension(width, height)
	};

	return rectangle;
}





















>
>
>
>
>
>
>
>
>
>
>
>
>
>
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
	of_rectangle_t rectangle = {
		of_point(x, y),
		of_dimension(width, height)
	};

	return rectangle;
}

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

	if ((copy = malloc(length + 1)) == NULL)
		return NULL;

	memcpy(copy, string, length + 1);

	return copy;
}