The following facilities are available for interfacing between Scheme 48 and C:
most of the Scheme functions described here.
The others are in
dynamic-externals, which has the functions for dynamic loading and
name lookup from
the section on Dynamic Loading,
shared-bindings, which has the additional shared-binding functions
the section on the complete shared-binding interface.
The names of all of Scheme 48's visible C bindings begin
s48_' (for procedures and variables) or
S48_' (for macros).
Whenever a C name is derived from a Scheme identifier, we
-' with `
_' and convert letters to lowercase
for procedures and uppercase for macros.
A final `
?' converted to `
_P' in C macro names).
A final `
!' is dropped.
Thus the C macro for Scheme's
the one for
Procedures and macros that do not check the types of their arguments
unsafe' in their names.
All of the C functions and macros described have prototypes or definitions
in the file
The C type for Scheme values is defined there to be
Scheme 48 uses a copying garbage collector. The collector must be able to locate all references to objects allocated in the Scheme 48 heap in order to ensure that storage is not reclaimed prematurely and to update references to objects moved by the collector. The garbage collector may run whenever an object is allocated in the heap. C variables whose values are Scheme 48 objects and which are live across heap allocation calls need to be registered with the garbage collector.
Previous: Mixing Scheme 48 and C | Next: Shared bindings