The R Project SVN R

Rev

Rev 81588 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 81588 Rev 87512
Line 153... Line 153...
153
#define ALIGN(ptr, type) \
153
#define ALIGN(ptr, type) \
154
  ((((size_t)ptr) % sizeof(type)) \
154
  ((((size_t)ptr) % sizeof(type)) \
155
   ? (sizeof(type) - (((size_t)ptr) % sizeof(type))) \
155
   ? (sizeof(type) - (((size_t)ptr) % sizeof(type))) \
156
   : 0)
156
   : 0)
157
 
157
 
-
 
158
/* R addition, only "long" has been used before for alignment of allocated
-
 
159
   data. With C11, one could use max_align_t. */
-
 
160
typedef union {
-
 
161
    void *ptr;
-
 
162
    void (*funptr)(void);
-
 
163
    long long ll;
-
 
164
    double dbl;
-
 
165
} anytype;
-
 
166
 
158
#undef MAX
167
#undef MAX
159
#undef MIN
168
#undef MIN
160
#define MAX(a, b) (((a) >= (b)) ? (a) : (b))
169
#define MAX(a, b) (((a) >= (b)) ? (a) : (b))
161
#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
170
#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
162
 
171