scheme48ffi.h 993 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Part of Scheme 48 1.9. See file COPYING for notices and license.
  3. *
  4. * Authors: Marcus Crestani, Harald Glab-Phlak
  5. */
  6. /* Modelled on Jim Blandy's foreign function interface that he put in
  7. his Scheme implementation called Minor. */
  8. #ifndef _H_FFI
  9. #define _H_FFI
  10. /* internal interface */
  11. s48_call_t s48_first_call (void);
  12. s48_call_t s48_get_current_call (void);
  13. s48_call_t s48_push_call (s48_call_t call);
  14. void s48_pop_to (s48_call_t call);
  15. void s48_initialize_ffi (void);
  16. char * s48_make_local_bv (s48_call_t call, s48_ref_t byte_vector, long s);
  17. char * s48_make_local_bv_readonly (s48_call_t call, s48_ref_t byte_vector, long s);
  18. void s48_copy_local_bvs_to_scheme (s48_call_t call);
  19. void s48_copy_local_bvs_from_scheme (s48_call_t call);
  20. /* gc interface */
  21. void s48_trace_external_calls (void);
  22. #ifdef DEBUG_FFI
  23. void init_debug_ffi (void);
  24. static size_t count_calls(), count_local_refs(), count_global_refs();
  25. #endif
  26. #endif /* _H_FFI */