1 /* vi:set ts=8 sts=4 sw=4:
3 * MzScheme interface for Vim, wrapper around scheme.h
8 /* Hack to engage Cygwin-specific settings */
12 /* #ifdef needed for "make depend" */
22 #if MZSCHEME_VERSION_MAJOR >= 299
23 /* macros to be compatible with 20x versions */
24 # define scheme_config scheme_current_config()
25 # define scheme_make_string scheme_make_byte_string
26 # define scheme_make_string_output_port scheme_make_byte_string_output_port
27 # define scheme_get_sized_string_output scheme_get_sized_byte_string_output
28 # define scheme_write_string scheme_write_byte_string
29 # define scheme_make_sized_string scheme_make_sized_byte_string
31 # define SCHEME_STRINGP(obj) (SCHEME_BYTE_STRINGP(obj) || SCHEME_CHAR_STRINGP(obj))
32 # define SCHEME_STR_VAL(obj) SCHEME_BYTE_STR_VAL( \
33 (SCHEME_BYTE_STRINGP(obj) ? obj : scheme_char_string_to_byte_string(obj)))
34 # define GUARANTEE_STRING(fname, argnum) GUARANTEE_TYPE(fname, argnum, SCHEME_STRINGP, "string")
39 # define scheme_format scheme_format_utf8
41 # define SCHEME_GET_BYTE_STRING(obj) (SCHEME_BYTE_STRINGP(obj) ? obj : \
42 scheme_char_string_to_byte_string(obj))
44 # define SCHEME_GET_BYTE_STRING(obj) (obj)
45 # define SCHEME_BYTE_STRLEN_VAL SCHEME_STRLEN_VAL
46 # define SCHEME_BYTE_STR_VAL SCHEME_STR_VAL
47 # define scheme_byte_string_to_char_string(obj) (obj)
50 /* Precise GC macros */
51 #ifndef MZ_GC_DECL_REG
52 # define MZ_GC_DECL_REG(size) /* empty */
54 #ifndef MZ_GC_VAR_IN_REG
55 # define MZ_GC_VAR_IN_REG(x, v) /* empty */
57 #ifndef MZ_GC_ARRAY_VAR_IN_REG
58 # define MZ_GC_ARRAY_VAR_IN_REG(x, v, l) /* empty */
61 # define MZ_GC_REG() /* empty */
64 # define MZ_GC_UNREG() /* empty */
67 #ifdef MZSCHEME_FORCE_GC
69 * force garbage collection to check all references are registered
70 * seg faults will indicate not registered refs
72 # define MZ_GC_CHECK() scheme_collect_garbage();
74 # define MZ_GC_CHECK() /* empty */
77 #endif /* _IF_MZSCH_H_ */