ObjFW  Diff

Differences From Artifact [4674410a8d]:

To Artifact [66bcfdea6b]:


39
40
41
42
43
44
45

46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
/* A few macros to reduce #ifdefs */
#ifndef OF_APPLE_RUNTIME
# define class_getInstanceSize class_get_instance_size
# define class_getName class_get_name
# define class_getSuperclass class_get_super_class
#endif


struct pre_ivar {
	void	      **memchunks;
	size_t	      memchunks_size;
	int32_t	      retain_count; /* int32_t because atomic ops use int32_t */
#ifndef OF_ATOMIC_OPS
	of_spinlock_t retain_spinlock;
#endif
};


/* Hopefully no arch needs more than 16 bytes padding */
#define PRE_IVAR_ALIGN ((sizeof(struct pre_ivar) + 15) & ~15)
#define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN))

static struct {
	Class isa;







>








>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* A few macros to reduce #ifdefs */
#ifndef OF_APPLE_RUNTIME
# define class_getInstanceSize class_get_instance_size
# define class_getName class_get_name
# define class_getSuperclass class_get_super_class
#endif

/// \cond internal
struct pre_ivar {
	void	      **memchunks;
	size_t	      memchunks_size;
	int32_t	      retain_count; /* int32_t because atomic ops use int32_t */
#ifndef OF_ATOMIC_OPS
	of_spinlock_t retain_spinlock;
#endif
};
/// \endcond

/* Hopefully no arch needs more than 16 bytes padding */
#define PRE_IVAR_ALIGN ((sizeof(struct pre_ivar) + 15) & ~15)
#define PRE_IVAR ((struct pre_ivar*)((char*)self - PRE_IVAR_ALIGN))

static struct {
	Class isa;