Changeset 13018 in project for chicken


Ignore:
Timestamp:
01/16/09 04:47:04 (11 years ago)
Author:
Kon Lovett
Message:

Added return value testing for FreeLibrary? & shl_unlaod.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/runtime.c

    r12950 r13018  
    85188518
    85198519  if(C_truep(reloadable) && (reload_lf = find_module_handle(mname)) != NULL) {
    8520     shl_unload((shl_t)reload_lf->module_handle); /*** failure currently not handled - what does shl_unload() return ? */
     8520    if(shl_unload((shl_t)reload_lf->module_handle) != 0)
     8521      panic(C_text("Unable to unload previously loaded compiled code"));
    85218522  }
    85228523  else reload_lf = NULL;
     
    86618662
    86628663  if(C_truep(reloadable) && (reload_lf = find_module_handle((char *)C_data_pointer(name))) != NULL) {
    8663     FreeLibrary((HINSTANCE)reload_lf->module_handle); /*** failure currently not handled - what does FreeLibrary() return ? */
     8664    if(FreeLibrary((HINSTANCE)reload_lf->module_handle) == 0)
     8665      panic(C_text("Unable to unload previously loaded compiled code"));
    86648666  }
    86658667  else reload_lf = NULL;
     
    87158717#ifndef NO_DLOAD2
    87168718# if defined(__hpux__) && defined(HAVE_DL_H)
    8717   shl_unload((shl_t)m->module_handle);
     8719  if(shl_unload((shl_t)m->module_handle) != 0) return C_SCHEME_FALSE;
    87188720# elif defined(HAVE_DLFCN_H)
    87198721  if(dlclose(m->module_handle) != 0) return C_SCHEME_FALSE;
    87208722# elif defined(HAVE_LOADLIBRARY)
    8721   FreeLibrary(m->module_handle);
     8723  if(FreeLibrary(m->module_handle) == 0) return C_SCHEME_FALSE;
    87228724# else
    87238725  return C_SCHEME_FALSE;
Note: See TracChangeset for help on using the changeset viewer.