summaryrefslogtreecommitdiff
path: root/libguile/strings.h
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/strings.h')
-rw-r--r--libguile/strings.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libguile/strings.h b/libguile/strings.h
index e6a9cf8b6..8e3ca5eb3 100644
--- a/libguile/strings.h
+++ b/libguile/strings.h
@@ -59,6 +59,10 @@
/* Is X a writable string (i.e., not a substring)? */
#define SCM_RWSTRINGP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_string))
+#define SCM_STRING_COERCE_0TERMINATION_X(x) \
+ { if (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_substring)) \
+ x = scm_makfromstr (SCM_ROCHARS (x), SCM_STRING_LENGTH (x), 0); }
+
extern SCM scm_string_p (SCM x);