Hi,
i trying to discover which directories and in what order mac VM
looking for extrnal plugin module,
and to make sure that it finds my module, i renamed library
FloatMathPlugin.dylib to
FloatMathPluginz.dylib
and correspondingly in primitive invocation, i put:
primitiveExp
"Answer E raised to the receiver power.
Optional. See Object documentation whatIsAPrimitive."
<primitive: 'primitiveExp' module: 'FloatMathPluginz'>
self isNaN ifTrue:[ ^self].
now i found that module is loaded, but primitive doesn't work..
entering gdb, i found following cruel line in callInitializersIn():
if(strncmp(moduleName, module->name, strlen(module->name)) != 0) {
DPRINTF(("ERROR: getModuleName returned %s (expected: %s)\n",
moduleName, module->name));
return 0;
}
where moduleName is a result from call module's 'getModuleName' function,
which is obviously returns 'FloatMathPlugin' instead of 'FloatMathPluginz',
and therefore comparison fails, and module fails to initialize :(
Btw, i would find this thing much faster, if somebody wouldn't put
following in the beginning of sqNamedPrims.c :
#undef DEBUG <<<< whyyyy?!?!?
#undef DPRINTF
#ifdef DEBUG
#define DPRINTF(what) printf what
#else
#define DPRINTF(what)
#endif
--
Best regards,
Igor Stasenko AKA sig.