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

builtin: use == 0 instead of isnil()

Do not rely on C inlining that may not happen for a *very* frequently
called fn in lower level code.
This commit is contained in:
Delyan Angelov
2021-06-28 10:52:28 +03:00
parent 830cf4645c
commit 8650ec6916
6 changed files with 30 additions and 31 deletions

View File

@ -110,7 +110,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
cmd := 'addr2line -e $executable $addr'
// taken from os, to avoid depending on the os module inside builtin.v
f := C.popen(&char(cmd.str), c'r')
if isnil(f) {
if f == 0 {
eprintln(sframe)
continue
}