Module type Dynlink_common_interface.OldDynlink

module type OldDynlink = sig .. end


Dynamic loading of compiled files

val loadfile : string -> unit
In bytecode: load the given bytecode object file (.cmo file) or bytecode library file (.cma file), and link it with the running program. In native code: load the given OCaml plugin file (usually .cmxs), and link it with the running program. All toplevel expressions in the loaded compilation units are evaluated. No facilities are provided to access value names defined by the unit. Therefore, the unit must register itself its entry points with the main program, e.g. by modifying tables of functions.

Access control

val allow_unsafe_modules : bool -> unit
Govern whether unsafe object files are allowed to be dynamically linked. A compilation unit is ``unsafe'' if it contains declarations of external functions, which can break type safety. By default, dynamic linking of unsafe object files is not allowed. In native code, this function does nothing; object files with external functions are always allowed to be dynamically linked.

Deprecated, initialization

val init : unit -> unit
Deprecated.Initialize the Dynlink library. This function is called automatically when needed.
val add_interfaces : string list -> string list -> unit