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

builtin: move C. calls to .c.v files (#11164)

This commit is contained in:
Delyan Angelov
2021-08-12 21:46:38 +03:00
committed by GitHub
parent c9e9556a92
commit 47884dfd1f
21 changed files with 288 additions and 206 deletions

View File

@ -15,26 +15,6 @@ fn on_panic(f fn(int)int) {
}
*/
// print_backtrace shows a backtrace of the current call stack on stdout
pub fn print_backtrace() {
// At the time of backtrace_symbols_fd call, the C stack would look something like this:
// * print_backtrace_skipping_top_frames
// * print_backtrace itself
// * the rest of the backtrace frames
// => top 2 frames should be skipped, since they will not be informative to the developer
$if !no_backtrace ? {
$if freestanding {
println(bare_backtrace())
} $else {
$if tinyc {
C.tcc_backtrace(c'Backtrace')
} $else {
print_backtrace_skipping_top_frames(2)
}
}
}
}
struct VCastTypeIndexName {
tindex int
tname string