diff options
| author | Armin Rigo <arigo@tunes.org> | 2013-11-09 14:40:54 +0100 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2013-11-09 14:40:54 +0100 |
| commit | 1bc624ea6f84b46715031ea02a31bb2041d777ac (patch) | |
| tree | 4c28cab0865d86dcfc19bf6140bec4903d6c6f05 /testing/test_parsing.py | |
| parent | a7f53074578d56c48fbefb9b38e214bca5044a03 (diff) | |
| download | cffi-thread-safe.tar.gz | |
Add locking. Not really tested, apart from the absence of double locking.thread-safe
Diffstat (limited to 'testing/test_parsing.py')
| -rw-r--r-- | testing/test_parsing.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/test_parsing.py b/testing/test_parsing.py index d5bf273..73c2277 100644 --- a/testing/test_parsing.py +++ b/testing/test_parsing.py @@ -130,8 +130,9 @@ def test_typedef_array_convert_array_to_pointer(): ffi.cdef(""" typedef int (*fn_t)(int[5]); """) - type = ffi._parser.parse_type("fn_t") - BType = ffi._get_cached_btype(type) + with ffi._lock: + type = ffi._parser.parse_type("fn_t") + BType = ffi._get_cached_btype(type) assert str(BType) == '<func (<pointer to <int>>), <int>, False>' def test_remove_comments(): |
