mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: change optional to result of io (#16075)
This commit is contained in:
@ -28,7 +28,7 @@ pub fn get_libname(libname string) string {
|
||||
|
||||
// open_opt - loads the dynamic shared object.
|
||||
// Unlike open, open_opt return an option.
|
||||
pub fn open_opt(filename string, flags int) ?voidptr {
|
||||
pub fn open_opt(filename string, flags int) !voidptr {
|
||||
shared_object_handle := open(filename, flags)
|
||||
if shared_object_handle == 0 {
|
||||
e := dlerror()
|
||||
@ -39,7 +39,7 @@ pub fn open_opt(filename string, flags int) ?voidptr {
|
||||
|
||||
// sym_opt returns the address of a symbol in a given shared object, if found.
|
||||
// Unlike sym, sym_opt returns an option.
|
||||
pub fn sym_opt(shared_object_handle voidptr, symbol string) ?voidptr {
|
||||
pub fn sym_opt(shared_object_handle voidptr, symbol string) !voidptr {
|
||||
sym_handle := sym(shared_object_handle, symbol)
|
||||
if sym_handle == 0 {
|
||||
e := dlerror()
|
||||
|
Reference in New Issue
Block a user