#ifndef SCM_STRINGS_H
#define SCM_STRINGS_H
-/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2005 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
\f
Legacy interface
- - SCM_STRINGP returns false for sh-strings.
+ - SCM_STRINGP is just scm_is_string.
- SCM_STRING_CHARS uses scm_i_string_writable_chars and immediately
calls scm_i_stop_writing, hoping for the best. SCM_STRING_LENGTH
- is the same as scm_i_string_length. SCM_STRINGP will only return
- true for strings that are null-terminated when accessed with
- SCM_STRING_CHARS.
+ is the same as scm_i_string_length. SCM_STRING_CHARS will throw
+ an error for for strings that are not null-terminated.
*/
SCM_API SCM scm_string_p (SCM x);
SCM_API SCM scm_string_ref (SCM str, SCM k);
SCM_API SCM scm_string_set_x (SCM str, SCM k, SCM chr);
SCM_API SCM scm_substring (SCM str, SCM start, SCM end);
+SCM_API SCM scm_substring_read_only (SCM str, SCM start, SCM end);
SCM_API SCM scm_substring_shared (SCM str, SCM start, SCM end);
SCM_API SCM scm_substring_copy (SCM str, SCM start, SCM end);
SCM_API SCM scm_string_append (SCM args);
SCM_API SCM scm_c_string_ref (SCM str, size_t pos);
SCM_API void scm_c_string_set_x (SCM str, size_t pos, SCM chr);
SCM_API SCM scm_c_substring (SCM str, size_t start, size_t end);
+SCM_API SCM scm_c_substring_read_only (SCM str, size_t start, size_t end);
SCM_API SCM scm_c_substring_shared (SCM str, size_t start, size_t end);
SCM_API SCM scm_c_substring_copy (SCM str, size_t start, size_t end);
SCM_API SCM scm_i_make_string (size_t len, char **datap);
SCM_API SCM scm_i_substring (SCM str, size_t start, size_t end);
+SCM_API SCM scm_i_substring_read_only (SCM str, size_t start, size_t end);
SCM_API SCM scm_i_substring_shared (SCM str, size_t start, size_t end);
SCM_API SCM scm_i_substring_copy (SCM str, size_t start, size_t end);
SCM_API size_t scm_i_string_length (SCM str);
#if SCM_ENABLE_DEPRECATED
-SCM_API int SCM_STRINGP (SCM obj);
-SCM_API char *SCM_STRING_CHARS (SCM str);
-SCM_API size_t SCM_STRING_LENGTH (SCM str);
-#define SCM_STRING_UCHARS ((unsigned char *)SCM_STRING_CHARS (str))
+SCM_API int scm_i_deprecated_stringp (SCM obj);
+SCM_API char *scm_i_deprecated_string_chars (SCM str);
+SCM_API size_t scm_i_deprecated_string_length (SCM str);
+
+#define SCM_STRINGP(x) scm_i_deprecated_stringp(x)
+#define SCM_STRING_CHARS(x) scm_i_deprecated_string_chars(x)
+#define SCM_STRING_LENGTH(x) scm_i_deprecated_string_length(x)
+#define SCM_STRING_UCHARS(str) ((unsigned char *)SCM_STRING_CHARS (str))
#endif