Clarify that configuration_data()'s copy is immutable

pull/3385/merge
Aleksey Filippov 7 years ago committed by Jussi Pakkanen
parent 1ffbddc31a
commit 5f5360470f
  1. 1
      docs/markdown/Configuration.md
  2. 0
      test cases/failing/75 configuration immutable/input
  3. 12
      test cases/failing/75 configuration immutable/meson.build

@ -39,6 +39,7 @@ use a single `configuration_data` object as many times as you like,
but it becomes immutable after being passed to the `configure_file` but it becomes immutable after being passed to the `configure_file`
function. That is, after it has been used once to generate output the function. That is, after it has been used once to generate output the
`set` function becomes unusable and trying to call it causes an error. `set` function becomes unusable and trying to call it causes an error.
Copy of immutable `configuration_data` is still immutable.
For more complex configuration file generation Meson provides a second For more complex configuration file generation Meson provides a second
form. To use it, put a line like this in your configuration file. form. To use it, put a line like this in your configuration file.

@ -0,0 +1,12 @@
project('configuration_data is immutable')
a = configuration_data()
configure_file(
configuration : a,
input : 'input',
output : 'output',
)
still_immutable = a
still_immutable.set('hello', 'world')
Loading…
Cancel
Save