mirror of
https://github.com/vlang/v.git
synced 2025-09-16 16:02:29 +03:00
checker: require unsafe for free()
This commit is contained in:
parent
fa447443ca
commit
46f32fc10c
8 changed files with 23 additions and 7 deletions
|
@ -47,7 +47,9 @@ fn (mut a App) init() {
|
|||
}
|
||||
|
||||
fn (mut a App) cleanup() {
|
||||
a.ps.free()
|
||||
unsafe {
|
||||
a.ps.free()
|
||||
}
|
||||
}
|
||||
|
||||
fn (mut a App) run() {
|
||||
|
|
|
@ -26,7 +26,9 @@ fn handle_client(mut socket net.TcpConn) {
|
|||
eprintln('> new client: $client_addr')
|
||||
mut reader := io.new_buffered_reader(reader: socket)
|
||||
defer {
|
||||
reader.free()
|
||||
unsafe {
|
||||
reader.free()
|
||||
}
|
||||
}
|
||||
socket.write_string('server: hello\n') or { return }
|
||||
for {
|
||||
|
|
|
@ -470,7 +470,9 @@ fn frame(x voidptr) {
|
|||
|
||||
fn cleanup(x voidptr) {
|
||||
mut app := &App(x)
|
||||
app.free()
|
||||
unsafe {
|
||||
app.free()
|
||||
}
|
||||
}
|
||||
|
||||
fn fail(error string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue