Commit f7a781f
authored
Replace ipv4 inet_ntop with a handrolled function (#367)
* Replace ipv4 inet_ntop with a handrolled function
* make iptos static
* Make codegen better behaved on msvc / gcc
For some reason gcc assumes that static constexpr array can be modified and does not attempt to zero init the string, reading from the array instead. Having the buffer be initialized in the function instead via a consteval seems to yield proper results.
MSVC just straight up doesn't understand static initialization and attempts to initialize the static buffer on every function call. Microsoft never fails to disappoint.1 parent 3772d17 commit f7a781f
1 file changed
+30
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 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 | + | |
199 | 227 | | |
200 | 228 | | |
201 | | - | |
| 229 | + | |
202 | 230 | | |
203 | 231 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 232 | + | |
209 | 233 | | |
210 | 234 | | |
211 | 235 | | |
| |||
0 commit comments