Menu

#386 EXTERNAL Option on METHOD and ROUTINE Directives

None
open
nobody
5
2012-08-22
2010-02-24
Anonymous
No

Currently the spec for the EXTERNAL subkeyword on the METHOD and ROUTINE directives requires an external shared object name in all circumstances. However, there are circumstance (such as in the Mod_ooRexx library) where the library containing the external methods/routines is loaded by the current non-ooRexx process i.e. and editor, etc. If the external methods/routines are located in that library then when the spec is processed by ooRexx it will try to load another copy of the library to resolve the external methods/routines. This is not very efficient and can cause problems.

I propose that the library name in the spec be made either optional or a keyword added to indicate that the external methods/routines are already loaded in the current process and thus another copy of the library does not need to be loaded. Linux could use the dlopen API with a NULL pointer to the library name and then use dlsym to look up the name/location in the current process. With Windows you would have to use a combination of the GetModuleHandle and GetProcAddress APIs.

Discussion

Anonymous
Anonymous

Add attachments
Cancel