diff src/structs.h @ 18904:2bdc2e1f6e1f v8.2.0013

patch 8.2.0013: not using a typedef for condstack Commit: https://github.com/vim/vim/commit/ddef129160ff0676e5da482071fb2fdc2988ac34 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 16 17:10:33 2019 +0100 patch 8.2.0013: not using a typedef for condstack Problem: Not using a typedef for condstack. Solution: Add a typedef.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Dec 2019 17:15:04 +0100
parents 49b78d6465e5
children edacd1e922c0
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -863,8 +863,7 @@ struct eslist_elem
  */
 #define CSTACK_LEN	50
 
-struct condstack
-{
+typedef struct {
     short	cs_flags[CSTACK_LEN];	// CSF_ flags
     char	cs_pending[CSTACK_LEN];	// CSTP_: what's pending in ":finally"
     union {
@@ -878,7 +877,7 @@ struct condstack
     int		cs_trylevel;		// nr of nested ":try"s
     eslist_T	*cs_emsg_silent_list;	// saved values of "emsg_silent"
     char	cs_lflags;		// loop flags: CSL_ flags
-};
+} cstack_T;
 # define cs_rettv	cs_pend.csp_rv
 # define cs_exception	cs_pend.csp_ex
 
@@ -912,7 +911,7 @@ struct condstack
 # define CSTP_FINISH	32	// ":finish" is pending
 
 /*
- * Flags for the cs_lflags item in struct condstack.
+ * Flags for the cs_lflags item in cstack_T.
  */
 # define CSL_HAD_LOOP	 1	// just found ":while" or ":for"
 # define CSL_HAD_ENDLOOP 2	// just found ":endwhile" or ":endfor"