diff options
Diffstat (limited to 'foreign_msvc.c')
-rw-r--r-- | foreign_msvc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/foreign_msvc.c b/foreign_msvc.c index 6a8bb7f..6441132 100644 --- a/foreign_msvc.c +++ b/foreign_msvc.c @@ -17,7 +17,7 @@ static FnPtr foreign_get_fn_ptr(ForeignFnManager *ffmgr, FnExpr *fn, Location ca if (!libname) { err_print(call_where, "Attempt to call function at compile time which does not have an associated library."); info_print(fn->where, "Function was declared here."); - return false; + return NULL; } Library *lib = str_hash_table_get(&ffmgr->libs_loaded, libname, strlen(libname)); if (!lib) { @@ -25,7 +25,7 @@ static FnPtr foreign_get_fn_ptr(ForeignFnManager *ffmgr, FnExpr *fn, Location ca if (!handle) { DWORD err = GetLastError(); err_print(call_where, "Could not open dynamic library %s (error code %ld).", libname, err); - return false; + return NULL; } lib = str_hash_table_insert(&ffmgr->libs_loaded, libname, strlen(libname)); lib->handle = handle; @@ -34,7 +34,7 @@ static FnPtr foreign_get_fn_ptr(ForeignFnManager *ffmgr, FnExpr *fn, Location ca fn_ptr = (FnPtr)GetProcAddress(lib->handle, name); if (!fn_ptr) { err_print(call_where, "Could not get function %s from dynamic library.", name); - return false; + return NULL; } fn->foreign.fn_ptr = fn_ptr; } |