Scheme 48 Manual | Contents | Previous Chapter: Libraries | Next Chapter: Access to POSIX
Previous: SRFIs | Next: Available facilities

Mixing Scheme 48 and C
Mike Sperber and Richard Kelsey

This chapter describes an interface for calling C functions from Scheme, calling Scheme functions from C, and allocating storage in the Scheme heap.. Scheme 48 manages stub functions in C that negotiate between the calling conventions of Scheme and C and the memory allocation policies of both worlds. No stub generator is available yet, but writing stubs is a straightforward task.

  • Available facilities
  • Shared bindings
  • Calling C functions from Scheme
  • Adding external modules to the Makefile
  • Dynamic loading
  • Compatibility
  • Accessing Scheme data from C
  • Calling Scheme functions from C
  • Interacting with the Scheme heap
  • Using Scheme records in C code
  • Raising exceptions from external code
  • Unsafe functions and macros
  • Previous: SRFIs | Next: Available facilities