summaryrefslogtreecommitdiff
path: root/libguile/snarf.h
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/snarf.h')
-rw-r--r--libguile/snarf.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/libguile/snarf.h b/libguile/snarf.h
index c3113e1a7..9eaccf60c 100644
--- a/libguile/snarf.h
+++ b/libguile/snarf.h
@@ -6,18 +6,19 @@
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006, 2009 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
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
*/
@@ -345,19 +346,27 @@ SCM_SNARF_INIT(scm_set_smob_apply((tag), (c_name), (req), (opt), (rest));)
}; \
static SCM_UNUSED const SCM c_name = SCM_PACK (& c_name ## _raw_cell)
-#define SCM_IMMUTABLE_STRINGBUF(c_name, contents) \
- SCM_IMMUTABLE_DOUBLE_CELL (c_name, \
- scm_tc7_stringbuf | SCM_I_STRINGBUF_F_SHARED, \
- (scm_t_bits) (contents), \
- (scm_t_bits) sizeof (contents) - 1, \
- (scm_t_bits) 0)
+#define SCM_IMMUTABLE_STRINGBUF(c_name, contents) \
+ static SCM_UNUSED const \
+ struct \
+ { \
+ scm_t_bits word_0; \
+ scm_t_bits word_1; \
+ const char buffer[sizeof (contents)]; \
+ } \
+ c_name = \
+ { \
+ scm_tc7_stringbuf | SCM_I_STRINGBUF_F_SHARED, \
+ sizeof (contents) - 1, \
+ contents \
+ }
#define SCM_IMMUTABLE_STRING(c_name, contents) \
SCM_IMMUTABLE_STRINGBUF (scm_i_paste (c_name, _stringbuf), contents); \
SCM_IMMUTABLE_DOUBLE_CELL (c_name, \
scm_tc7_ro_string, \
(scm_t_bits) &scm_i_paste (c_name, \
- _stringbuf_raw_cell), \
+ _stringbuf), \
(scm_t_bits) 0, \
(scm_t_bits) sizeof (contents) - 1)