From e24ef7d2f65acae0ed5179506fe587373b97d5c2 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 12 Aug 2022 18:56:49 +0100 Subject: [PATCH 1/2] Update docs to use the correct REGISTER_INI_ENTRIES macro The texts talks about using the simplest way to register an INI setting but says that we used ``PHP_INI_BEGIN()`` which is always needed as it's to start registering. The one actually used to register is ``REGISTER_INI_ENTRIES()`` --- Book/php7/extensions_design/ini_settings.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Book/php7/extensions_design/ini_settings.rst b/Book/php7/extensions_design/ini_settings.rst index bc126dd3..1481901e 100644 --- a/Book/php7/extensions_design/ini_settings.rst +++ b/Book/php7/extensions_design/ini_settings.rst @@ -149,7 +149,7 @@ for previous chapter about random number picking and guessing, once again only s That was the easiest INI declaration, we won't keep it as-is but the steps are trivial : you declare a ``zend_ini_entry_def[]`` vector using ``PHP_INI_BEGIN`` and ``PHP_INI_END`` macros. In the middle, you add your -individual ``zend_ini_entry_def`` entries using here again macros. We used the simplest one : ``PHP_INI_BEGIN()``, that +individual ``zend_ini_entry_def`` entries using here again macros. We used the simplest one : ``REGISTER_INI_ENTRIES()``, that takes only four parameters : the name of the entry to register, its default value given if it was not part of an INI file scanning (see above chapter for details), the modification level, ``PHP_INI_ALL`` says "everywhere". We did not play with validator yet, and passed NULL. From ad6c8b0d7039e42e039663ee50a261a5bf21e532 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 16 Aug 2022 12:57:46 +0100 Subject: [PATCH 2/2] Use actual proper macro Co-authored-by: Christoph M. Becker --- Book/php7/extensions_design/ini_settings.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Book/php7/extensions_design/ini_settings.rst b/Book/php7/extensions_design/ini_settings.rst index 1481901e..93fa36cf 100644 --- a/Book/php7/extensions_design/ini_settings.rst +++ b/Book/php7/extensions_design/ini_settings.rst @@ -149,7 +149,7 @@ for previous chapter about random number picking and guessing, once again only s That was the easiest INI declaration, we won't keep it as-is but the steps are trivial : you declare a ``zend_ini_entry_def[]`` vector using ``PHP_INI_BEGIN`` and ``PHP_INI_END`` macros. In the middle, you add your -individual ``zend_ini_entry_def`` entries using here again macros. We used the simplest one : ``REGISTER_INI_ENTRIES()``, that +individual ``zend_ini_entry_def`` entries using here again macros. We used the simplest one : ``PHP_INI_ENTRY()``, that takes only four parameters : the name of the entry to register, its default value given if it was not part of an INI file scanning (see above chapter for details), the modification level, ``PHP_INI_ALL`` says "everywhere". We did not play with validator yet, and passed NULL.