summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-02-28 17:02:25 +0100
committerAndy Wingo <wingo@pobox.com>2017-02-28 17:02:25 +0100
commit33514ffe22b8cd15ff7ba95bcee80a534b2bbc2a (patch)
tree796ef13739d8021f597020ef5c168cfa12fd3fd6 /libguile
parentf3a1872703bf8b9b8f92bbdba01aa75927bd1b8f (diff)
Fix segfault introduced with R6RS port commit
* libguile/init.c (scm_i_init_guile): Move scm_register_r6rs_ports later, so that defining port types hsa the SCM trampoline subrs defined. * libguile/bytevectors.c (scm_bootstrap_bytevectors): Cosmetic changes.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/bytevectors.c11
-rw-r--r--libguile/init.c2
2 files changed, 7 insertions, 6 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c
index 58df01830..7b4585d1f 100644
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@ -2095,10 +2095,14 @@ scm_bootstrap_bytevectors (void)
loaded. */
scm_null_bytevector = make_bytevector (0, SCM_ARRAY_ELEMENT_TYPE_VU8);
+
+ scm_endianness_big = sym_big = scm_from_latin1_symbol ("big");
+ scm_endianness_little = sym_little = scm_from_latin1_symbol ("little");
+
#ifdef WORDS_BIGENDIAN
- scm_i_native_endianness = scm_from_latin1_symbol ("big");
+ scm_i_native_endianness = sym_big;
#else
- scm_i_native_endianness = scm_from_latin1_symbol ("little");
+ scm_i_native_endianness = sym_little;
#endif
scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
@@ -2109,9 +2113,6 @@ scm_bootstrap_bytevectors (void)
scm_i_register_vector_constructor
(scm_i_array_element_types[SCM_ARRAY_ELEMENT_TYPE_VU8],
scm_make_bytevector);
-
- scm_endianness_big = sym_big = scm_from_latin1_symbol ("big");
- scm_endianness_little = sym_little = scm_from_latin1_symbol ("little");
}
void
diff --git a/libguile/init.c b/libguile/init.c
index a8f690b62..1a6f599fa 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -399,7 +399,6 @@ scm_i_init_guile (void *base)
scm_bootstrap_programs ();
scm_bootstrap_vm ();
scm_register_atomic ();
- scm_register_r6rs_ports ();
scm_register_fdes_finalizers ();
scm_register_foreign ();
scm_register_foreign_object ();
@@ -431,6 +430,7 @@ scm_i_init_guile (void *base)
scm_init_feature ();
scm_init_backtrace ();
scm_init_ports ();
+ scm_register_r6rs_ports (); /* requires ports */
scm_init_fports ();
scm_init_strports ();
scm_init_hash ();