mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
checker: check unsafe
V function calls (#8752)
This commit is contained in:
parent
d3bcd5d305
commit
ea803113c3
36 changed files with 200 additions and 161 deletions
|
@ -21,8 +21,10 @@ pub fn decode(data string) string {
|
|||
if size <= 0 {
|
||||
return ''
|
||||
}
|
||||
buffer := malloc(size)
|
||||
return tos(buffer, decode_in_buffer(data, buffer))
|
||||
unsafe {
|
||||
buffer := malloc(size)
|
||||
return tos(buffer, decode_in_buffer(data, buffer))
|
||||
}
|
||||
}
|
||||
|
||||
// encode encodes the `string` value passed in `data` to base64.
|
||||
|
@ -34,8 +36,10 @@ pub fn encode(data string) string {
|
|||
if size <= 0 {
|
||||
return ''
|
||||
}
|
||||
buffer := malloc(size)
|
||||
return tos(buffer, encode_in_buffer(data, buffer))
|
||||
unsafe {
|
||||
buffer := malloc(size)
|
||||
return tos(buffer, encode_in_buffer(data, buffer))
|
||||
}
|
||||
}
|
||||
|
||||
// decode_url returns a decoded URL `string` version of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue