Remap_Context module

remap_context

procedure2 overloadsSource

Returns the current context as this program's #Context. When context came from a program with a different layout, its fields are copied over by name; see the two-argument form.

remap_context :: () -> result: #Context

Returns

result: #Context
remap_context :: (
    foreign_context: *void,
    foreign_type: *Type_Info_Struct
) -> result: #Context

Builds a #Context from a context of another layout. The foreign struct must begin with a base struct; the fields of that struct and the ones after it are copied into the field of the same name when the sizes agree. Fields with no match keep their defaults. A foreign context without a base gives an empty context (and a logged warning when VERBOSE).

Parameters

foreign_context: *void
foreign_type: *Type_Info_Struct

Returns

result: #Context

See also