Skip to content

Commit c058f51

Browse files
committed
zend defines attribute malloc for Win32 as returned pointer are not aliased
1 parent 395b6a9 commit c058f51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Zend/zend_portability.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ char *alloca();
214214

215215
#if ZEND_GCC_VERSION >= 2096 || __has_attribute(__malloc__)
216216
# define ZEND_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
217+
#elif defined(ZEND_WIN32)
218+
# define ZEND_ATTRIBUTE_MALLOC __declspec(restrict)
217219
#else
218220
# define ZEND_ATTRIBUTE_MALLOC
219221
#endif

0 commit comments

Comments
 (0)