Fix #33226: error loading .blend files with different endian on Mac. The cause
was wrong inline and pure attributes on the endian switch function.
This commit is contained in:
@@ -29,8 +29,7 @@
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define ATTR_ENDIAN_SWITCH \
|
||||
__attribute__((nonnull(1))) \
|
||||
__attribute__((pure))
|
||||
__attribute__((nonnull(1)))
|
||||
#else
|
||||
# define ATTR_ENDIAN_SWITCH
|
||||
#endif
|
||||
|
@@ -33,6 +33,9 @@
|
||||
* \ingroup bli
|
||||
*/
|
||||
|
||||
#include "DNA_vec_types.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
struct rctf;
|
||||
struct rcti;
|
||||
|
||||
@@ -75,17 +78,6 @@ void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src);
|
||||
void print_rctf(const char *str, const struct rctf *rect);
|
||||
void print_rcti(const char *str, const struct rcti *rect);
|
||||
|
||||
/* hrmf, we need to work out this inline stuff */
|
||||
#if defined(_MSC_VER)
|
||||
# define BLI_INLINE static __forceinline
|
||||
#elif defined(__GNUC__)
|
||||
# define BLI_INLINE static inline __attribute((always_inline))
|
||||
#else
|
||||
/* #warning "MSC/GNUC defines not found, inline non-functional" */
|
||||
# define BLI_INLINE static
|
||||
#endif
|
||||
|
||||
#include "DNA_vec_types.h"
|
||||
BLI_INLINE float BLI_rcti_cent_x_fl(const struct rcti *rct) { return (float)(rct->xmin + rct->xmax) / 2.0f; }
|
||||
BLI_INLINE float BLI_rcti_cent_y_fl(const struct rcti *rct) { return (float)(rct->ymin + rct->ymax) / 2.0f; }
|
||||
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct) { return (rct->xmin + rct->xmax) / 2; }
|
||||
|
@@ -324,11 +324,13 @@
|
||||
/*little macro so inline keyword works*/
|
||||
#if defined(_MSC_VER)
|
||||
# define BLI_INLINE static __forceinline
|
||||
#elif defined(__GNUC__)
|
||||
# define BLI_INLINE static inline __attribute((always_inline))
|
||||
#else
|
||||
/* #warning "MSC/GNUC defines not found, inline non-functional" */
|
||||
# define BLI_INLINE static
|
||||
# if (defined(__APPLE__) && defined(__ppc__))
|
||||
/* static inline __attribute__ here breaks osx ppc gcc42 build */
|
||||
# define BLI_INLINE static __attribute__((always_inline))
|
||||
# else
|
||||
# define BLI_INLINE static inline __attribute__((always_inline))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user