emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/tree-sitter b162faba0b 18/26: Fix compile warnings and errors in


From: Yuan Fu
Subject: feature/tree-sitter b162faba0b 18/26: Fix compile warnings and errors in treesit.c
Date: Thu, 16 Jun 2022 14:53:51 -0400 (EDT)

branch: feature/tree-sitter
commit b162faba0bc04b8584af6f536bef8d0525076a28
Author: Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>
Commit: Yuan Fu <yuan@debian-BULLSEYE-live-builder-AMD64>

    Fix compile warnings and errors in treesit.c
    
    * src/treesit.c (ts_initialize): Fix.
    (Ftreesit_parser_set_included_ranges): Fix.
    (Ftreesit_query_compile): Fix.
---
 src/treesit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/treesit.c b/src/treesit.c
index df8c992bb5..dc64aef425 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -123,7 +123,7 @@ ts_calloc_wrapper (size_t n, size_t size)
 }
 
 static void
-ts_initialize ()
+ts_initialize (void)
 {
   if (!ts_initialized)
     {
@@ -766,7 +766,7 @@ is nil, set PARSER to parse the whole buffer.  */)
       /* If RANGES is nil, make parser to parse the whole document.
         To do that we give tree-sitter a 0 length, the range is a
         dummy.  */
-      TSRange ts_range = {0, 0, 0, 0};
+      TSRange ts_range = {{0, 0}, {0, 0}, 0, 0};
       success = ts_parser_set_included_ranges
        (XTS_PARSER (parser)->parser, &ts_range , 0);
     }
@@ -1527,7 +1527,7 @@ goes wrong.  You can use `treesit-query-validate' to 
debug the
 query.  */)
   (Lisp_Object language, Lisp_Object query)
 {
-  if (!Ftreesit_query_p (query))
+  if (NILP (Ftreesit_query_p (query)))
     wrong_type_argument (Qtreesit_query_p, query);
   CHECK_SYMBOL (language);
   if (TS_COMPILED_QUERY_P (query))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]