summaryrefslogtreecommitdiff
path: root/testing/test_parsing.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2013-11-09 14:40:54 +0100
committerArmin Rigo <arigo@tunes.org>2013-11-09 14:40:54 +0100
commit1bc624ea6f84b46715031ea02a31bb2041d777ac (patch)
tree4c28cab0865d86dcfc19bf6140bec4903d6c6f05 /testing/test_parsing.py
parenta7f53074578d56c48fbefb9b38e214bca5044a03 (diff)
downloadcffi-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.py5
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():