1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: disallow implicit conversion from fixed array to fooptr (#8823)

This commit is contained in:
Nick Treleaven
2021-02-25 23:28:47 +00:00
committed by GitHub
parent 639061be6c
commit c03798e390
7 changed files with 42 additions and 18 deletions

View File

@ -41,20 +41,21 @@ fn (req &Request) ssl_do(port int, method Method, host_name string, path string)
C.BIO_puts(web, req_headers.str)
mut content := strings.new_builder(100)
mut buff := [bufsize]byte{}
bp := &buff[0]
mut readcounter := 0
for {
readcounter++
len := unsafe { C.BIO_read(web, buff, bufsize) }
len := unsafe { C.BIO_read(web, bp, bufsize) }
if len <= 0 {
break
}
$if debug_http ? {
eprintln('ssl_do, read ${readcounter:4d} | len: $len')
eprintln('-'.repeat(20))
eprintln(unsafe { tos(buff, len) })
eprintln(unsafe { tos(bp, len) })
eprintln('-'.repeat(20))
}
unsafe { content.write_bytes(buff, len) }
unsafe { content.write_bytes(bp, len) }
}
if web != 0 {
C.BIO_free_all(web)