From 5087931963b9aa9675189dddef87df4e51d188e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 6 Mar 2023 17:33:52 +0100 Subject: [PATCH] random: Add missing `php.h` include to php_random.h (#10764) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `PHPAPI` is defined in `php.h`. It appears that without the explicit include, recent versions of Visual Studio Code’s intellisense (rightfully) no longer detect `PHPAPI`. This will then lead to a misparsing of the file, because `PHPAPI` is assumed to be the return type and the actual return type is assumed to be the function name, thus expecting a semicolon after the actual return type. This in turn colors the entire header in red due to the detected syntax error(s), making development very hard / impossible. This did not cause issues outside of the IDE use case, because apparently all users of `php_random.h` include `php.h` before including `php_random.h`. --- ext/random/php_random.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/random/php_random.h b/ext/random/php_random.h index 6a8b0eb84a7..08517ad7028 100644 --- a/ext/random/php_random.h +++ b/ext/random/php_random.h @@ -31,6 +31,8 @@ #ifndef PHP_RANDOM_H # define PHP_RANDOM_H +# include "php.h" + PHPAPI double php_combined_lcg(void); /*