From 45c7e3b06b6ae41d80d55258222ad20af38521b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 6 Sep 2023 10:06:29 +0200 Subject: [PATCH] Fix #12123 Make _ZEND_TYPE_PREFIX apply only for MSVC Closes GH-12136 --- NEWS | 2 ++ Zend/zend_types.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7d14227cdb879..b281b24de18e1 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ PHP NEWS . Fixed bug GH-12102 (Incorrect compile error when using array access on TMP value in function call). (ilutov) . Fixed warning emitted when checking if a user stream is castable. (Girgias) + . Fixed bug GH-12123 (Compile error on MacOS with C++ extension when using + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX). (kocsismate) - FPM: . Fixed GH-12077 (PHP 8.3.0RC1 borked socket-close-on-exec.phpt). diff --git a/Zend/zend_types.h b/Zend/zend_types.h index 5b2e72642b47d..c4a07f58874ab 100644 --- a/Zend/zend_types.h +++ b/Zend/zend_types.h @@ -269,7 +269,7 @@ typedef struct { #define ZEND_TYPE_ALLOW_NULL(t) \ (((t).type_mask & _ZEND_TYPE_NULLABLE_BIT) != 0) -#ifdef __cplusplus +#if defined(__cplusplus) && defined(_MSC_VER) # define _ZEND_TYPE_PREFIX zend_type #else /* FIXME: We could add (zend_type) here at some point but this breaks in MSVC because