Skip to content

Commit ed6f877

Browse files
committed
fix: update ESTACK_MIN_ALIGNMENT definition for better clarity on auto-alignment behavior
1 parent 90644ea commit ed6f877

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

easy_stack.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,13 @@ ESTACK_STATIC_ASSERT((ESTACK_MAGIC != 0), "ESTACK_MAGIC must be a non-zero value
367367
/*
368368
* Configuration: Minimum Alignment Limit
369369
*
370-
* Minimum payload alignment boundary (machine-word size).
371-
* Defined only if payload alignment is enabled (ESTACK_NO_AUTO_ALIGN is NOT defined).
370+
* Minimum payload alignment boundary.
371+
* If auto-alignment is disabled, the minimum allowed alignment is 1 byte.
372+
* Otherwise, it defaults to the machine-word size.
372373
*/
373-
#ifndef ESTACK_NO_AUTO_ALIGN
374+
#ifdef ESTACK_NO_AUTO_ALIGN
375+
# define ESTACK_MIN_ALIGNMENT ((size_t)1)
376+
#else
374377
# define ESTACK_MIN_ALIGNMENT ((size_t)sizeof(uintptr_t))
375378
#endif
376379

0 commit comments

Comments
 (0)