Skip to content

Commit 9e11736

Browse files
authored
Merge pull request #3882 from ruby/use-align-keywords
Use align keywords instead of the header
2 parents db72066 + b3e2708 commit 9e11736

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

include/prism/defines.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,11 @@
263263
* specify alignment in a compiler-agnostic way.
264264
*/
265265
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* C11 or later */
266-
#include <stdalign.h>
267-
268266
/** Specify alignment for a type or variable. */
269-
#define PRISM_ALIGNAS(size) alignas(size)
267+
#define PRISM_ALIGNAS _Alignas
270268

271269
/** Get the alignment requirement of a type. */
272-
#define PRISM_ALIGNOF(type) alignof(type)
270+
#define PRISM_ALIGNOF _Alignof
273271
#elif defined(__GNUC__) || defined(__clang__)
274272
/** Specify alignment for a type or variable. */
275273
#define PRISM_ALIGNAS(size) __attribute__((aligned(size)))

0 commit comments

Comments
 (0)