1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

We can safely alloca the root.

This commit is contained in:
Rob Rix 2015-11-26 15:37:57 -05:00
parent d431309cc4
commit 19818231f5

View File

@ -70,7 +70,7 @@ parseTreeSitterFile file = do
source <- newCString contents
ts_document_set_input_string document source
ts_document_parse document
withAlloc (\root -> do
alloca (\root -> do
ts_document_root_node_p document root
unfoldM (toTerm document contents) root)
ts_document_free document