mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: voidptr(0) => unsafe { nil } (p.1)
This commit is contained in:
@ -130,7 +130,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
|
||||
fn break_if_debugger_attached() {
|
||||
unsafe {
|
||||
mut ptr := &voidptr(0)
|
||||
*ptr = voidptr(0)
|
||||
*ptr = nil
|
||||
//_ = ptr
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,10 @@ pub fn ptr_str(ptr voidptr) string {
|
||||
return buf1
|
||||
}
|
||||
|
||||
// pub fn nil_str(x voidptr) string {
|
||||
// return 'nil'
|
||||
//}
|
||||
|
||||
// str returns string equivalent of x
|
||||
pub fn (x isize) str() string {
|
||||
return i64(x).str()
|
||||
|
Reference in New Issue
Block a user