From 501328b34880f29ad5012a3b31147fb3bf8cbe10 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Mon, 31 Dec 2012 01:32:51 +1000 Subject: [PATCH] Allow future-proof initialisation of Py_CoreConfig --- pep-0432.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pep-0432.txt b/pep-0432.txt index dcb2dc5f7..0b1df17b8 100644 --- a/pep-0432.txt +++ b/pep-0432.txt @@ -546,9 +546,16 @@ configuration:: unsigned long hash_seed; } Py_CoreConfig; + #define Py_CoreConfig_INIT {0, -1, 0} + The core configuration settings pointer may be ``NULL``, in which case the default values are ``ignore_environment = 0`` and ``use_hash_seed = -1``. +The ``Py_CoreConfig_INIT`` macro is designed to allow easy initialization +of a struct instance with sensible defaults:: + + Py_CoreConfig core_config = Py_CoreConfig_INIT; + ``ignore_environment`` controls the processing of all Python related environment variables. If the flag is zero, then environment variables are processed normally. Otherwise, all Python-specific environment variables