/
api_2private_2helpers_8h_source.html
229 lines (227 loc) · 29.3 KB
/
api_2private_2helpers_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<title>Neovim: src/nvim/api/private/helpers.h Source File</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
<link href="extra.css" rel="stylesheet" type="text/css"/>
<link href="http://fonts.googleapis.com/css?family=Lato:400,700,900" rel="stylesheet">
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<header class="navbar">
<div class="container">
<nav class="site-nav">
<ul>
<li><a href="http://neovim.io/">Neovim Home</a></li>
</ul>
</nav>
<a href="index.html">
<img src="logo-devdoc.png" class="logo" alt="Neovim Dev-Doc">
</a>
</div>
</header>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_bc030da22f6f77ebb27ffd39b609bafa.html">nvim</a></li><li class="navelem"><a class="el" href="dir_5031ba7ba6e88ee94a8e02befd8c46c8.html">api</a></li><li class="navelem"><a class="el" href="dir_484a9311a32373e582c49bafb7151863.html">private</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">helpers.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="api_2private_2helpers_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef NVIM_API_PRIVATE_HELPERS_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#define NVIM_API_PRIVATE_HELPERS_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>  </div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <stdbool.h></span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>  </div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "<a class="code" href="api_2private_2defs_8h.html">nvim/api/private/defs.h</a>"</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include "<a class="code" href="vim_8h.html">nvim/vim.h</a>"</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include "<a class="code" href="getchar_8h.html">nvim/getchar.h</a>"</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include "<a class="code" href="memory_8h.html">nvim/memory.h</a>"</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "<a class="code" href="decoration_8h.html">nvim/decoration.h</a>"</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "<a class="code" href="ex__eval_8h.html">nvim/ex_eval.h</a>"</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "<a class="code" href="kvec_8h.html">nvim/lib/kvec.h</a>"</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a15ead2c26c4b19e7067e41b8e93942b2"> 14</a></span> <span class="preprocessor">#define OBJECT_OBJ(o) o</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  </div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a54fd7906326ebadfb3e157b17c6291fe"> 16</a></span> <span class="preprocessor">#define BOOLEAN_OBJ(b) ((Object) { \</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor"> .type = kObjectTypeBoolean, \</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor"> .data.boolean = b })</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a432e2c6bcf433757ea9b89bc85722b23"> 19</a></span> <span class="preprocessor">#define BOOL(b) BOOLEAN_OBJ(b)</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  </div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#ab744c3793bd5c8ef48c1893ac48e1f8b"> 21</a></span> <span class="preprocessor">#define INTEGER_OBJ(i) ((Object) { \</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor"> .type = kObjectTypeInteger, \</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor"> .data.integer = i })</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#aa7b6548cc441e4ba4c768c1e19baad99"> 25</a></span> <span class="preprocessor">#define FLOAT_OBJ(f) ((Object) { \</span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor"> .type = kObjectTypeFloat, \</span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor"> .data.floating = f })</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  </div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a8aafec2a2811e04ea25b210d761717c9"> 29</a></span> <span class="preprocessor">#define STRING_OBJ(s) ((Object) { \</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor"> .type = kObjectTypeString, \</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor"> .data.string = s })</span></div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#ac09a6ee5388df7e131ff5b277392b3a1"> 33</a></span> <span class="preprocessor">#define CSTR_TO_OBJ(s) STRING_OBJ(cstr_to_string(s))</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#adeba4b57ec37a426fa0bd27626312df9"> 35</a></span> <span class="preprocessor">#define BUFFER_OBJ(s) ((Object) { \</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor"> .type = kObjectTypeBuffer, \</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor"> .data.integer = s })</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a1160d3db217096276ad1338ed1f75687"> 39</a></span> <span class="preprocessor">#define WINDOW_OBJ(s) ((Object) { \</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor"> .type = kObjectTypeWindow, \</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor"> .data.integer = s })</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a8a6daed7b2d7e5359a29a9ee7919b0df"> 43</a></span> <span class="preprocessor">#define TABPAGE_OBJ(s) ((Object) { \</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor"> .type = kObjectTypeTabpage, \</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor"> .data.integer = s })</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a8fe988689ac455197a2cba850f51ef20"> 47</a></span> <span class="preprocessor">#define ARRAY_OBJ(a) ((Object) { \</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor"> .type = kObjectTypeArray, \</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor"> .data.array = a })</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a8d3b7c599fd9bf7cd6fd053d3a26af6b"> 51</a></span> <span class="preprocessor">#define DICTIONARY_OBJ(d) ((Object) { \</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor"> .type = kObjectTypeDictionary, \</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor"> .data.dictionary = d })</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a86f80bad9c7b33649b4e32ab21475d92"> 55</a></span> <span class="preprocessor">#define LUAREF_OBJ(r) ((Object) { \</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor"> .type = kObjectTypeLuaRef, \</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor"> .data.luaref = r })</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a263efce0e5cda1d387a1a43f94715445"> 59</a></span> <span class="preprocessor">#define NIL ((Object)OBJECT_INIT)</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#af1dc14f5199c7ddd6404f221ce581a7f"> 60</a></span> <span class="preprocessor">#define NULL_STRING ((String)STRING_INIT)</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  </div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#ad9c4697de565d6819af95019b8b021a2"> 62</a></span> <span class="preprocessor">#define PUT(dict, k, v) \</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor"> kv_push(dict, ((KeyValuePair) { .key = cstr_to_string(k), .value = v }))</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#aaf21aab5bac9bda612ff011e463587f3"> 65</a></span> <span class="preprocessor">#define PUT_BOOL(dict, name, condition) PUT(dict, name, BOOLEAN_OBJ(condition));</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a6aa321a80c2b73f92ed79627a0db9914"> 67</a></span> <span class="preprocessor">#define ADD(array, item) \</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="preprocessor"> kv_push(array, item)</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  </div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a850935461923b5dc3c506d577da291bf"> 70</a></span> <span class="preprocessor">#define FIXED_TEMP_ARRAY(name, fixsize) \</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="preprocessor"> Array name = ARRAY_DICT_INIT; \</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="preprocessor"> Object name##__items[fixsize]; \</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="preprocessor"> name.size = fixsize; \</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="preprocessor"> name.items = name##__items; \</span></div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="preprocessor"></span> </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#af96e60a1dc5d63d971cd5f3d822ee594"> 76</a></span> <span class="preprocessor">#define STATIC_CSTR_AS_STRING(s) ((String) {.data = s, .size = sizeof(s) - 1})</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  </div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a304f7562b0de17c7d99e6ab728bec37a"> 81</a></span> <span class="preprocessor">#define STATIC_CSTR_TO_STRING(s) ((String){ \</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="preprocessor"> .data = xmemdupz(s, sizeof(s) - 1), \</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor"> .size = sizeof(s) - 1 })</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  </div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="comment">// Helpers used by the generated msgpack-rpc api wrappers</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a1c2474b27418351557054c1f65a6fff0"> 86</a></span> <span class="preprocessor">#define api_init_boolean</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a957d431c8cc36454366952354fa102cd"> 87</a></span> <span class="preprocessor">#define api_init_integer</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#aa855cf312810cdfb5e4164f6649b2c98"> 88</a></span> <span class="preprocessor">#define api_init_float</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#afb24091f8356d71ed420ff6d942a8681"> 89</a></span> <span class="preprocessor">#define api_init_string = STRING_INIT</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a85a464dddf26f050f6242b39e5adf985"> 90</a></span> <span class="preprocessor">#define api_init_buffer</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a02879bb5701485e933f9521fec75c1bf"> 91</a></span> <span class="preprocessor">#define api_init_window</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a75a6c8e16ba01310fd232dd37243c976"> 92</a></span> <span class="preprocessor">#define api_init_tabpage</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#aa353c59e80f584c01d12b6ad525e2899"> 93</a></span> <span class="preprocessor">#define api_init_object = NIL</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a19251710c37d07d8735d998c0a6b687a"> 94</a></span> <span class="preprocessor">#define api_init_array = ARRAY_DICT_INIT</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#afb2c54c7449d7ad0ed82c52efefe97a0"> 95</a></span> <span class="preprocessor">#define api_init_dictionary = ARRAY_DICT_INIT</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  </div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a645d6ef747b3aaa349f0f3707ef29a29"> 97</a></span> <span class="preprocessor">#define api_free_boolean(value)</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a364212ee8ca9a21ed2669fa0592ba9cc"> 98</a></span> <span class="preprocessor">#define api_free_integer(value)</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a4177be78cbb74c9ed432f89a7dc811f1"> 99</a></span> <span class="preprocessor">#define api_free_float(value)</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a922a4d0d1a4b3267bdfcc57bf44195a9"> 100</a></span> <span class="preprocessor">#define api_free_buffer(value)</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a0b4c3fd4a32fac9c7d5e3715c114854c"> 101</a></span> <span class="preprocessor">#define api_free_window(value)</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a497c155239ad6e9fc68cd948489be4aa"> 102</a></span> <span class="preprocessor">#define api_free_tabpage(value)</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  </div>
<div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="structTryState.html"> 108</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structTryState.html#aa0130d9bbbcc0011c8cc9a2e5fe85960"> 109</a></span>  <a class="code" href="structvim__exception.html">except_T</a> *<a class="code" href="structTryState.html#aa0130d9bbbcc0011c8cc9a2e5fe85960">current_exception</a>;</div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="structTryState.html#a2f5f8c429f5b99263be293e133cdf8d2"> 110</a></span>  <span class="keyword">struct </span><a class="code" href="structmsglist.html">msglist</a> *<a class="code" href="structTryState.html#a2f5f8c429f5b99263be293e133cdf8d2">private_msg_list</a>;</div>
<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="structTryState.html#a514e22bf519be56c06c606a83a44be8a"> 111</a></span>  <span class="keyword">const</span> <span class="keyword">struct </span><a class="code" href="structmsglist.html">msglist</a> *<span class="keyword">const</span> *<a class="code" href="structTryState.html#a514e22bf519be56c06c606a83a44be8a">msg_list</a>;</div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structTryState.html#aec34985c31e693e5d7c2d888adb0ed7e"> 112</a></span>  <span class="keywordtype">int</span> <a class="code" href="structTryState.html#aec34985c31e693e5d7c2d888adb0ed7e">trylevel</a>;</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structTryState.html#ab05eeecd187f1e3c059ec05bdbd7c0d9"> 113</a></span>  <span class="keywordtype">int</span> <a class="code" href="structTryState.html#ab05eeecd187f1e3c059ec05bdbd7c0d9">got_int</a>;</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="structTryState.html#a5a7ca406fc5eaa3f99c4025d0d1e6ed0"> 114</a></span>  <span class="keywordtype">int</span> <a class="code" href="structTryState.html#a5a7ca406fc5eaa3f99c4025d0d1e6ed0">need_rethrow</a>;</div>
<div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="structTryState.html#a52db2ad34914677acb1c23b038218d14"> 115</a></span>  <span class="keywordtype">int</span> <a class="code" href="structTryState.html#a52db2ad34914677acb1c23b038218d14">did_emsg</a>;</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> } <a class="code" href="structTryState.html">TryState</a>;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  </div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="comment">// `msg_list` controls the collection of abort-causing non-exception errors,</span></div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment">// which would otherwise be ignored. This pattern is from do_cmdline().</span></div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment">//</span></div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="comment">// TODO(bfredl): prepare error-handling at "top level" (nv_event).</span></div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="api_2private_2helpers_8h.html#a0e718adbef3637f27ea41f058f9bc257"> 122</a></span> <span class="preprocessor">#define TRY_WRAP(code) \</span></div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="preprocessor"> do { \</span></div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="preprocessor"> struct msglist **saved_msg_list = msg_list; \</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="preprocessor"> struct msglist *private_msg_list; \</span></div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="preprocessor"> msg_list = &private_msg_list; \</span></div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="preprocessor"> private_msg_list = NULL; \</span></div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="preprocessor"> code \</span></div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="preprocessor"> msg_list = saved_msg_list; </span><span class="comment">/* Restore the exception context. */</span><span class="preprocessor"> \</span></div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="preprocessor"> } while (0)</span></div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  </div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="preprocessor">#ifdef INCLUDE_GENERATED_DECLARATIONS</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="preprocessor"># include "api/private/helpers.h.generated.h"</span></div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="preprocessor">#endif // NVIM_API_PRIVATE_HELPERS_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aex__eval_8h_html"><div class="ttname"><a href="ex__eval_8h.html">ex_eval.h</a></div></div>
<div class="ttc" id="astructmsglist_html"><div class="ttname"><a href="structmsglist.html">msglist</a></div><div class="ttdef"><b>Definition:</b> ex_eval.h:42</div></div>
<div class="ttc" id="astructTryState_html_a52db2ad34914677acb1c23b038218d14"><div class="ttname"><a href="structTryState.html#a52db2ad34914677acb1c23b038218d14">TryState::did_emsg</a></div><div class="ttdeci">int did_emsg</div><div class="ttdef"><b>Definition:</b> helpers.h:115</div></div>
<div class="ttc" id="astructTryState_html"><div class="ttname"><a href="structTryState.html">TryState</a></div><div class="ttdef"><b>Definition:</b> helpers.h:108</div></div>
<div class="ttc" id="astructTryState_html_a514e22bf519be56c06c606a83a44be8a"><div class="ttname"><a href="structTryState.html#a514e22bf519be56c06c606a83a44be8a">TryState::msg_list</a></div><div class="ttdeci">const struct msglist *const * msg_list</div><div class="ttdef"><b>Definition:</b> helpers.h:111</div></div>
<div class="ttc" id="agetchar_8h_html"><div class="ttname"><a href="getchar_8h.html">getchar.h</a></div></div>
<div class="ttc" id="aapi_2private_2defs_8h_html"><div class="ttname"><a href="api_2private_2defs_8h.html">defs.h</a></div></div>
<div class="ttc" id="astructTryState_html_aec34985c31e693e5d7c2d888adb0ed7e"><div class="ttname"><a href="structTryState.html#aec34985c31e693e5d7c2d888adb0ed7e">TryState::trylevel</a></div><div class="ttdeci">int trylevel</div><div class="ttdef"><b>Definition:</b> helpers.h:112</div></div>
<div class="ttc" id="astructTryState_html_a2f5f8c429f5b99263be293e133cdf8d2"><div class="ttname"><a href="structTryState.html#a2f5f8c429f5b99263be293e133cdf8d2">TryState::private_msg_list</a></div><div class="ttdeci">struct msglist * private_msg_list</div><div class="ttdef"><b>Definition:</b> helpers.h:110</div></div>
<div class="ttc" id="akvec_8h_html"><div class="ttname"><a href="kvec_8h.html">kvec.h</a></div></div>
<div class="ttc" id="astructTryState_html_a5a7ca406fc5eaa3f99c4025d0d1e6ed0"><div class="ttname"><a href="structTryState.html#a5a7ca406fc5eaa3f99c4025d0d1e6ed0">TryState::need_rethrow</a></div><div class="ttdeci">int need_rethrow</div><div class="ttdef"><b>Definition:</b> helpers.h:114</div></div>
<div class="ttc" id="adecoration_8h_html"><div class="ttname"><a href="decoration_8h.html">decoration.h</a></div></div>
<div class="ttc" id="astructTryState_html_ab05eeecd187f1e3c059ec05bdbd7c0d9"><div class="ttname"><a href="structTryState.html#ab05eeecd187f1e3c059ec05bdbd7c0d9">TryState::got_int</a></div><div class="ttdeci">int got_int</div><div class="ttdef"><b>Definition:</b> helpers.h:113</div></div>
<div class="ttc" id="avim_8h_html"><div class="ttname"><a href="vim_8h.html">vim.h</a></div></div>
<div class="ttc" id="astructTryState_html_aa0130d9bbbcc0011c8cc9a2e5fe85960"><div class="ttname"><a href="structTryState.html#aa0130d9bbbcc0011c8cc9a2e5fe85960">TryState::current_exception</a></div><div class="ttdeci">except_T * current_exception</div><div class="ttdef"><b>Definition:</b> helpers.h:109</div></div>
<div class="ttc" id="amemory_8h_html"><div class="ttname"><a href="memory_8h.html">memory.h</a></div></div>
<div class="ttc" id="astructvim__exception_html"><div class="ttname"><a href="structvim__exception.html">vim_exception</a></div><div class="ttdef"><b>Definition:</b> ex_eval.h:61</div></div>
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<footer>
<div class="container">
Generated on Sat May 15 2021 05:47:36 for Neovim by
<a href="http://www.doxygen.org/index.html">Doxygen</a>
1.8.17
</div>
</footer>
</body>
</html>