# define ZEND_SET_ALIGNED(alignment, decl) decl
#endif
+#define ZEND_SLIDE_TO_ALIGNED(alignment, ptr) (((zend_uintptr_t)(ptr) + ((alignment)-1)) & ~((alignment)-1))
+#define ZEND_SLIDE_TO_ALIGNED16(ptr) ZEND_SLIDE_TO_ALIGNED(Z_UL(16), ptr)
+
#endif /* ZEND_PORTABILITY_H */
/*
end = source + ZSTR_LEN(str);
if (ZSTR_LEN(str) > 15) {
- char *aligned = (char*)(((zend_uintptr_t)source + 15) & ~15);
+ char *aligned = (char*) ZEND_SLIDE_TO_ALIGNED16(source);
if (UNEXPECTED(source != aligned)) {
do {
}
source += 16;
} else if (end - source > 15) {
- char *aligned = (char*)(((zend_uintptr_t)source + 15) & ~15);
+ char *aligned = (char*) ZEND_SLIDE_TO_ALIGNED16(source);
if (source != aligned) {
do {