Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.
Next: Function Snarfing, Previous: General Libguile Concepts, Up: Programming in C [Contents][Index]
The foreign object type facility is Guile’s mechanism for
importing object and types from C or other languages into Guile’s
system. If you have a C struct foo
type, for example, you can
define a corresponding Guile foreign object type that allows Scheme code
to handle struct foo *
objects.
To define a new foreign object type, the programmer provides Guile with some essential information about the type — what its name is, how many fields it has, and its finalizer (if any) — and Guile allocates a fresh type for it. Foreign objects can be accessed from Scheme or from C.
• Defining Foreign Object Types: | ||
• Creating Foreign Objects: | ||
• Type Checking of Foreign Objects: | ||
• Foreign Object Memory Management: | ||
• Foreign Objects and Scheme: |