diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-09-11 23:21:34 +0530 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-09-11 23:50:12 +0300 |
| commit | b3c70f495b736ff4ebe4c5097df2a5da0ea1ab80 (patch) | |
| tree | 4b6a7c93a4ad59db6a269c2d07197d98a28da4a4 | |
| parent | 77bf63d6638cdb3f659cc97179e27d96a85c25a6 (diff) | |
| download | meson-b3c70f495b736ff4ebe4c5097df2a5da0ea1ab80.tar.gz | |
interpreter: Always flatten when unholding arrays
Otherwise we might end up with wrapper holders in the Build object and
pickling will then fail, defeating the purpose of the holder objects.
Closes https://github.com/mesonbuild/meson/issues/2211
| -rw-r--r-- | mesonbuild/mesonlib.py | 1 | ||||
| -rw-r--r-- | test cases/common/87 declare dep/entity/meson.build | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 305f60078..4862e23e6 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -707,6 +707,7 @@ def windows_proof_rmtree(f): def unholder_array(entries): result = [] + entries = flatten(entries) for e in entries: if hasattr(e, 'held_object'): e = e.held_object diff --git a/test cases/common/87 declare dep/entity/meson.build b/test cases/common/87 declare dep/entity/meson.build index 80bbf36fa..3bfe13cd8 100644 --- a/test cases/common/87 declare dep/entity/meson.build +++ b/test cases/common/87 declare dep/entity/meson.build @@ -1,6 +1,6 @@ entity_lib = static_library('entity', 'entity1.c') -entity_dep = declare_dependency(link_with : entity_lib, +entity_dep = declare_dependency(link_with : [[entity_lib]], include_directories : include_directories('.'), sources : 'entity2.c', compile_args : ['-DUSING_ENT=1'], |
