mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
35d273825a
commit
cd9a56c2b0
30 changed files with 970 additions and 19 deletions
|
@ -765,4 +765,15 @@ extern char * _getpty(int *, int, mode_t, int);
|
|||
#undef __bool__
|
||||
#endif
|
||||
|
||||
// Make sure we have maximum alignment, even if the current compiler
|
||||
// does not support max_align_t. Note that:
|
||||
// - Autoconf reports alignment of unknown types to 0.
|
||||
// - 'long double' has maximum alignment on *most* platforms,
|
||||
// looks like the best we can do for pre-C11 compilers.
|
||||
// - The value is tested, see test_alignof_max_align_t
|
||||
#if !defined(ALIGNOF_MAX_ALIGN_T) || ALIGNOF_MAX_ALIGN_T == 0
|
||||
# undef ALIGNOF_MAX_ALIGN_T
|
||||
# define ALIGNOF_MAX_ALIGN_T _Alignof(long double)
|
||||
#endif
|
||||
|
||||
#endif /* Py_PYPORT_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue