[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modifiers (revisited)
> Date: Fri, 17 May 96 08:15:43 EDT
> From: Mike Griebling <grieblm@trt.allied.com>
>
> I have another question about the correct use of modifiers.
>
> Assuming we have an interface module to an external C object file.
> Are the procedures names in this interface module translated to
> "module_procedure" as the description in your modifier document seems
> to suggest? If this is so, how are global C identifiers such as
> "malloc", etc. defined?
I assume you are refering to the file `ExternalC' I posted some days
ago. The default name mangling depends on the module type.
An INTERFACE module will use the names of variables and procedures as
given, i.e. a procedure called `foo' in the module will translate to
`foo' in the generated C code.
For a FOREIGN module M, the default is to change the name of the
procedure to `M_foo'.
In both modules it's possible to explicitly set a link name that
overrides the defaults. A procedure declaration
PROCEDURE ["bar"] foo (...);
will be called as `bar'.
-- mva