Files
herolib/lib/crypt/crpgp/err.v
2024-12-25 12:38:51 +01:00

11 lines
252 B
V

module crpgp
fn construct_error() !int {
// todo: call the func to get the error length
err_buf := unsafe { malloc(1024) }
C.error_message(err_buf, 1024)
str := unsafe { cstring_to_vstring(err_buf) }
unsafe { free(err_buf) }
return error(str)
}