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

tools: make v test-cleancode test everything by default (#10050)

This commit is contained in:
Delyan Angelov
2021-05-08 13:32:29 +03:00
committed by GitHub
parent cba2cb6b9c
commit 8a380f4699
132 changed files with 3230 additions and 3440 deletions

View File

@@ -1,9 +1,8 @@
module picohttpparser
[inline]
[unsafe]
fn cpy(dst byteptr, src byteptr, len int) int {
unsafe {C.memcpy(dst, src, len)}
[inline; unsafe]
fn cpy(dst &byte, src &byte, len int) int {
unsafe { C.memcpy(dst, src, len) }
return len
}
@@ -12,10 +11,10 @@ pub fn cmp(dst string, src string) bool {
if dst.len != src.len {
return false
}
return unsafe {C.memcmp(dst.str, src.str, src.len) == 0}
return unsafe { C.memcmp(dst.str, src.str, src.len) == 0 }
}
[inline]
pub fn cmpn(dst string, src string, n int) bool {
return unsafe {C.memcmp(dst.str, src.str, n) == 0}
return unsafe { C.memcmp(dst.str, src.str, n) == 0 }
}

View File

@@ -31,5 +31,5 @@ fn C.phr_parse_request_path(buf_start &char, len size_t, method PPchar, method_l
fn C.phr_parse_request_path_pipeline(buf_start &char, len size_t, method PPchar, method_len &size_t, path PPchar, path_len &size_t) int
fn C.get_date() &byte
// char * u64toa(uint64_t value, char *buffer)
fn C.u64toa(buffer &char, value u64) &char
// static inline int u64toa(char* buf, uint64_t value) {
fn C.u64toa(buffer &char, value u64) int

View File

@@ -1,12 +1,12 @@
module picohttpparser
pub struct Response {
fd int
fd int
pub:
date byteptr
buf_start byteptr
date &byte = 0
buf_start &byte = 0
pub mut:
buf byteptr
buf &byte = 0
}
[inline]