6
6
< title >
7
7
Class: Addrinfo
8
8
9
- — Documentation by YARD 0.9.12
9
+ — Documentation by YARD 0.9.19
10
10
11
11
</ title >
12
12
@@ -1192,16 +1192,6 @@ <h3 class="signature " id="getnameinfo-instance_method">
1192
1192
< pre class ="lines ">
1193
1193
1194
1194
1195
- 180
1196
- 181
1197
- 182
1198
- 183
1199
- 184
1200
- 185
1201
- 186
1202
- 187
1203
- 188
1204
- 189
1205
1195
190
1206
1196
191
1207
1197
192
@@ -1218,10 +1208,20 @@ <h3 class="signature " id="getnameinfo-instance_method">
1218
1208
203
1219
1209
204
1220
1210
205
1221
- 206</ pre >
1211
+ 206
1212
+ 207
1213
+ 208
1214
+ 209
1215
+ 210
1216
+ 211
1217
+ 212
1218
+ 213
1219
+ 214
1220
+ 215
1221
+ 216</ pre >
1222
1222
</ td >
1223
1223
< td >
1224
- < pre class ="code "> < span class ="info file "> # File 'mrbgems/mruby-socket/src/socket.c', line 180 </ span >
1224
+ < pre class ="code "> < span class ="info file "> # File 'mrbgems/mruby-socket/src/socket.c', line 190 </ span >
1225
1225
1226
1226
static mrb_value
1227
1227
mrb_addrinfo_getnameinfo(mrb_state *mrb, mrb_value < span style ="color:#069 "> self</ span > )
@@ -1240,8 +1240,8 @@ <h3 class="signature " id="getnameinfo-instance_method">
1240
1240
mrb_raise(mrb, < span style ="color:#036;font-weight:bold "> E_SOCKET_ERROR</ span > , < span style ="background-color:hsla(0,100%,50%,0.05) "> < span style ="color:#710 "> "</ span > < span style ="color:#D20 "> invalid sockaddr</ span > < span style ="color:#710 "> "</ span > </ span > );
1241
1241
}
1242
1242
error = getnameinfo((struct sockaddr *)RSTRING_PTR(sastr), (socklen_t)RSTRING_LEN(sastr), RSTRING_PTR(host), < span style ="color:#036;font-weight:bold "> NI_MAXHOST</ span > , RSTRING_PTR(serv), < span style ="color:#036;font-weight:bold "> NI_MAXSERV</ span > , (int)flags);
1243
- < span style ="color:#080;font-weight:bold "> if</ span > (error != < span style =" color:#00D " > 0 </ span > ) {
1244
- mrb_raisef(mrb, < span style ="color:#036;font-weight:bold "> E_SOCKET_ERROR</ span > , < span style ="background-color:hsla(0,100%,50%,0.05) "> < span style ="color:#710 "> "</ span > < span style ="color:#D20 "> getnameinfo: %s </ span > < span style ="color:#710 "> "</ span > </ span > , gai_strerror(error));
1243
+ < span style ="color:#080;font-weight:bold "> if</ span > (error) {
1244
+ mrb_raisef(mrb, < span style ="color:#036;font-weight:bold "> E_SOCKET_ERROR</ span > , < span style ="background-color:hsla(0,100%,50%,0.05) "> < span style ="color:#710 "> "</ span > < span style ="color:#D20 "> getnameinfo: %S </ span > < span style ="color:#710 "> "</ span > </ span > , mrb_str_new_cstr(mrb, gai_strerror(error) ));
1245
1245
}
1246
1246
ary = mrb_ary_new_capa(mrb, < span style ="color:#00D "> 2</ span > );
1247
1247
mrb_str_resize(mrb, host, strlen(RSTRING_PTR(host)));
@@ -1788,19 +1788,23 @@ <h3 class="signature " id="unix_path-instance_method">
1788
1788
< pre class ="lines ">
1789
1789
1790
1790
1791
- 209
1792
- 210
1793
- 211
1794
- 212
1795
- 213
1796
- 214
1797
- 215
1798
- 216
1799
- 217
1800
- 218</ pre >
1791
+ 219
1792
+ 220
1793
+ 221
1794
+ 222
1795
+ 223
1796
+ 224
1797
+ 225
1798
+ 226
1799
+ 227
1800
+ 228
1801
+ 229
1802
+ 230
1803
+ 231
1804
+ 232</ pre >
1801
1805
</ td >
1802
1806
< td >
1803
- < pre class ="code "> < span class ="info file "> # File 'mrbgems/mruby-socket/src/socket.c', line 209 </ span >
1807
+ < pre class ="code "> < span class ="info file "> # File 'mrbgems/mruby-socket/src/socket.c', line 219 </ span >
1804
1808
1805
1809
static mrb_value
1806
1810
mrb_addrinfo_unix_path(mrb_state *mrb, mrb_value < span style ="color:#069 "> self</ span > )
@@ -1810,7 +1814,11 @@ <h3 class="signature " id="unix_path-instance_method">
1810
1814
sastr = mrb_iv_get(mrb, < span style ="color:#069 "> self</ span > , mrb_intern_lit(mrb, < span style ="background-color:hsla(0,100%,50%,0.05) "> < span style ="color:#710 "> "</ span > < span style ="color:#D20 "> @sockaddr</ span > < span style ="color:#710 "> "</ span > </ span > ));
1811
1815
< span style ="color:#080;font-weight:bold "> if</ span > (((struct sockaddr *)RSTRING_PTR(sastr))->sa_family != < span style ="color:#036;font-weight:bold "> AF_UNIX</ span > )
1812
1816
mrb_raise(mrb, < span style ="color:#036;font-weight:bold "> E_SOCKET_ERROR</ span > , < span style ="background-color:hsla(0,100%,50%,0.05) "> < span style ="color:#710 "> "</ span > < span style ="color:#D20 "> need AF_UNIX address</ span > < span style ="color:#710 "> "</ span > </ span > );
1813
- < span style ="color:#080;font-weight:bold "> return</ span > mrb_str_new_cstr(mrb, ((struct sockaddr_un *)RSTRING_PTR(sastr))->sun_path);
1817
+ < span style ="color:#080;font-weight:bold "> if</ span > (RSTRING_LEN(sastr) < (mrb_int)offsetof(struct sockaddr_un, sun_path) + < span style ="color:#00D "> 1</ span > ) {
1818
+ < span style ="color:#080;font-weight:bold "> return</ span > mrb_str_new(mrb, < span style ="background-color:hsla(0,100%,50%,0.05) "> < span style ="color:#710 "> "</ span > < span style ="color:#710 "> "</ span > </ span > , < span style ="color:#00D "> 0</ span > );
1819
+ } < span style ="color:#080;font-weight:bold "> else</ span > {
1820
+ < span style ="color:#080;font-weight:bold "> return</ span > mrb_str_new_cstr(mrb, ((struct sockaddr_un *)RSTRING_PTR(sastr))->sun_path);
1821
+ }
1814
1822
}</ pre >
1815
1823
</ td >
1816
1824
</ tr >
@@ -1822,9 +1830,9 @@ <h3 class="signature " id="unix_path-instance_method">
1822
1830
</ div >
1823
1831
1824
1832
< div id ="footer ">
1825
- Generated on Fri May 11 23:53:59 2018 by
1833
+ Generated on Thu May 16 08:48:33 2019 by
1826
1834
< a href ="http://yardoc.org " title ="Yay! A Ruby Documentation Tool " target ="_parent "> yard</ a >
1827
- 0.9.12 in < a href ="https://github.com/sagmor/yard-mruby "> mruby mode</ a > 0.3.0 (ruby-2.5.1 ).
1835
+ 0.9.19 in < a href ="https://github.com/sagmor/yard-mruby "> mruby mode</ a > 0.3.0 (ruby-2.5.5 ).
1828
1836
</ div >
1829
1837
1830
1838
</ div >
0 commit comments