mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: add stdcall attribute, unhandled exception handler, get_raw_stdin, v_realloc
This commit is contained in:
@ -158,7 +158,16 @@ TODO
|
||||
print_backtrace()
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
[unsafe_fn]
|
||||
pub fn v_realloc(b byteptr, n int) byteptr {
|
||||
ptr := C.realloc(b, n)
|
||||
if ptr == 0 {
|
||||
panic('realloc($n) failed')
|
||||
}
|
||||
|
||||
return ptr
|
||||
}
|
||||
|
||||
pub fn v_calloc(n int) byteptr {
|
||||
|
Reference in New Issue
Block a user