ObjFW  Diff

Differences From Artifact [1147a05908]:

To Artifact [d86f5f8b91]:

  • File src/macros.h — part of check-in [1af54eb2c2] at 2024-04-02 03:21:12 on branch trunk — Only align OFVector4D where necessary

    Changing the alignment of OFVector4D globally (as was done previously)
    would have technically been an ABI break in extremely rare cases.
    However, since we only need the alignment for the methods added after
    1.0, it's better to only have the alignment there and get back to full
    ABI compatibility with 1.0. (user: js, size: 19548) [annotate] [blame] [check-ins using]


98
99
100
101
102
103
104
105
106
107
108
109

110
111
112

113
114
115
116
117
118
119
# define OF_LIKELY(cond) (cond)
# define OF_UNLIKELY(cond) (cond)
# define OF_CONST_FUNC
# define OF_NO_RETURN_FUNC
# define OF_WEAK_REF(sym)
#endif

#ifdef __GNUC__
# define OF_ALIGN(alignment) __attribute__((__aligned__(alignment)))
#endif

#if __STDC_VERSION__ >= 201112L

# define OF_ALIGNOF(type) _Alignof(type)
# define OF_ALIGNAS(type) _Alignas(type)
#else

# define OF_ALIGNOF(type) __alignof__(type)
# define OF_ALIGNAS(type) OF_ALIGN(OF_ALIGNOF(type))
#endif

#ifdef __BIGGEST_ALIGNMENT__
# define OF_BIGGEST_ALIGNMENT __BIGGEST_ALIGNMENT__
#else







<
<
<
<

>



>







98
99
100
101
102
103
104




105
106
107
108
109
110
111
112
113
114
115
116
117
# define OF_LIKELY(cond) (cond)
# define OF_UNLIKELY(cond) (cond)
# define OF_CONST_FUNC
# define OF_NO_RETURN_FUNC
# define OF_WEAK_REF(sym)
#endif





#if __STDC_VERSION__ >= 201112L
# define OF_ALIGN(size) _Alignas(size)
# define OF_ALIGNOF(type) _Alignof(type)
# define OF_ALIGNAS(type) _Alignas(type)
#else
# define OF_ALIGN(size) __attribute__((__aligned__(size)))
# define OF_ALIGNOF(type) __alignof__(type)
# define OF_ALIGNAS(type) OF_ALIGN(OF_ALIGNOF(type))
#endif

#ifdef __BIGGEST_ALIGNMENT__
# define OF_BIGGEST_ALIGNMENT __BIGGEST_ALIGNMENT__
#else