Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
MobVM 'findExternalFunctionIn'
Last updated at 12:11 am UTC on 17 January 2006
From sqNamedPrims.c :

static void *findExternalFunctionIn(char *functionName, ModuleEntry *module)
{
void *result;

dprintf(("Looking (externally) for %s in %s ... ", functionName, module->name));
if(module->handle)
{
result = (void*) (sqPOP->ioFindExternalFunctionIn(functionName, (int) module->handle)) ;

// hph added to support both 'moduleName_functionName' and just 'functionName'
if((0 == result) & !module->ffiLoaded)
{
char szPluginFunctionName[256] ;

wsprintf(szPluginFunctionName, "%s_%s", module->name, functionName) ;
result = (void*) (sqPOP->ioFindExternalFunctionIn(szPluginFunctionName, (int) module->handle)) ;
}
// hph
}
else
result = NULL;
dprintf(("%s\n", result ? "found" : "not found"));
return result;
}