summaryrefslogtreecommitdiff
path: root/src/if_mzsch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_mzsch.h')
-rw-r--r--src/if_mzsch.h34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/if_mzsch.h b/src/if_mzsch.h
index 65c5de7ca..7c1766ebb 100644
--- a/src/if_mzsch.h
+++ b/src/if_mzsch.h
@@ -7,6 +7,7 @@
#ifdef __MINGW32__
/* Hack to engage Cygwin-specific settings */
# define __CYGWIN32__
+# include <stdint.h>
#endif
/* #ifdef needed for "make depend" */
@@ -20,31 +21,24 @@
#endif
#if MZSCHEME_VERSION_MAJOR >= 299
-/* macros to be compatible with 20x versions */
-# define scheme_config scheme_current_config()
-# define scheme_make_string scheme_make_byte_string
-# define scheme_make_string_output_port scheme_make_byte_string_output_port
-# define scheme_get_sized_string_output scheme_get_sized_byte_string_output
-# define scheme_write_string scheme_write_byte_string
-# define scheme_make_sized_string scheme_make_sized_byte_string
-
# define SCHEME_STRINGP(obj) (SCHEME_BYTE_STRINGP(obj) || SCHEME_CHAR_STRINGP(obj))
-# define SCHEME_STR_VAL(obj) SCHEME_BYTE_STR_VAL( \
- (SCHEME_BYTE_STRINGP(obj) ? obj : scheme_char_string_to_byte_string(obj)))
-# define GUARANTEE_STRING(fname, argnum) GUARANTEE_TYPE(fname, argnum, SCHEME_STRINGP, "string")
-
-# ifdef scheme_format
-# undef scheme_format
+# define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_BYTE_STR_VAL(obj))
+#else
+/* macros for compatibility with older versions */
+# define scheme_current_config() scheme_config
+# define scheme_make_sized_byte_string scheme_make_sized_string
+# define scheme_format_utf8 scheme_format
+# ifndef DYNAMIC_MZSCHEME
+/* for dynamic MzScheme there will be separate definitions in if_mzsch.c */
+# define scheme_get_sized_byte_string_output scheme_get_sized_string_output
+# define scheme_make_byte_string scheme_make_string
+# define scheme_make_byte_string_output_port scheme_make_string_output_port
# endif
-# define scheme_format scheme_format_utf8
-# define SCHEME_GET_BYTE_STRING(obj) (SCHEME_BYTE_STRINGP(obj) ? obj : \
- scheme_char_string_to_byte_string(obj))
-#else
-# define SCHEME_GET_BYTE_STRING(obj) (obj)
# define SCHEME_BYTE_STRLEN_VAL SCHEME_STRLEN_VAL
-# define SCHEME_BYTE_STR_VAL SCHEME_STR_VAL
+# define BYTE_STRING_VALUE(obj) ((char_u *)SCHEME_STR_VAL(obj))
# define scheme_byte_string_to_char_string(obj) (obj)
+# define SCHEME_BYTE_STRINGP SCHEME_STRINGP
#endif
/* Precise GC macros */