all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Some issues with the tree-sitter branch
@ 2022-10-16 13:32 Eli Zaretskii
  2022-10-16 14:01 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Eli Zaretskii @ 2022-10-16 13:32 UTC (permalink / raw)
  To: Yuan Fu; +Cc: emacs-devel

I noticed several minor issues with the branch while reading the code:

 . Several places assign EMACS_INT values to uint32_t variables with
   an explicit range check (and error signal in case of overflow).
 . Several functions produce Lisp_Object results by reference, and
   callers pass to them pointers to Lisp_Object variables.  Our style
   prefers returning a Lisp_Object value through the return value,
   like this:

      Lisp_Object some_var = some_func (...);

   When a function produces a single value, I think the above is
   preferable.
 . There's a call to malloc in Ftreesit_parser_set_included_ranges
   which doesn't check the return value of malloc, and doesn't signal
   memory-full error when malloc fails (that function should perhaps
   use SAFE_ALLOCA).

In addition, the style of treesit.c (indentation etc.) is not exactly
ours (but this can be fixed later).

Thank you for your work on this important feature.



^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-10-18 16:11 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-16 13:32 Some issues with the tree-sitter branch Eli Zaretskii
2022-10-16 14:01 ` Eli Zaretskii
2022-10-16 15:10 ` Eli Zaretskii
2022-10-16 19:36   ` tree-sitter: Paths used for loading of language definitions Jostein Kjønigsen
2022-10-16 20:12     ` Daniel Martín
2022-10-17  4:27     ` Yuan Fu
2022-10-17  7:14       ` Jostein Kjønigsen
2022-10-17  7:29         ` Yuan Fu
2022-10-17  8:02         ` Eli Zaretskii
2022-10-17  9:02           ` Yuan Fu
2022-10-17  9:08             ` Eli Zaretskii
2022-10-17 11:56               ` Stephen Leake
2022-10-17 13:39                 ` Eli Zaretskii
2022-10-17 21:15               ` Yuan Fu
2022-10-17  4:53 ` Some issues with the tree-sitter branch Yuan Fu
2022-10-17  5:37   ` Po Lu
2022-10-17  5:48     ` Yuan Fu
2022-10-17  6:48   ` Eli Zaretskii
2022-10-17  9:12     ` Yuan Fu
2022-10-17 10:14       ` Eli Zaretskii
2022-10-18  0:15         ` Yuan Fu
2022-10-18  0:14   ` Yuan Fu
2022-10-18 16:11     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.