mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
$if mac => $if macos
This commit is contained in:
@ -16,7 +16,7 @@ fn print_backtrace_skipping_top_frames_mingw(skipframes int) bool {
|
||||
|
||||
fn print_backtrace_skipping_top_frames_nix(xskipframes int) bool {
|
||||
skipframes := xskipframes + 2
|
||||
$if mac { return print_backtrace_skipping_top_frames_mac(skipframes) }
|
||||
$if macos { return print_backtrace_skipping_top_frames_mac(skipframes) }
|
||||
$if linux { return print_backtrace_skipping_top_frames_linux(skipframes) }
|
||||
$if freebsd { return print_backtrace_skipping_top_frames_freebsd(skipframes) }
|
||||
return false
|
||||
@ -25,7 +25,7 @@ fn print_backtrace_skipping_top_frames_nix(xskipframes int) bool {
|
||||
// the functions below are not called outside this file,
|
||||
// so there is no need to have their twins in builtin_windows.v
|
||||
fn print_backtrace_skipping_top_frames_mac(skipframes int) bool {
|
||||
$if mac {
|
||||
$if macos {
|
||||
buffer := [100]byteptr
|
||||
nr_ptrs := C.backtrace(*voidptr(buffer), 100)
|
||||
C.backtrace_symbols_fd(*voidptr(&buffer[skipframes]), nr_ptrs-skipframes, 1)
|
||||
|
Reference in New Issue
Block a user