diff options
author | Andy Wingo <wingo@pobox.com> | 2014-04-28 11:01:44 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2014-04-28 11:01:44 +0200 |
commit | 682a55d59bff1b79ecce17b2344896efce390565 (patch) | |
tree | ba50bfa77c106a3e0ac3b68427df2847a4a524d8 | |
parent | ea4c2460e048a575fc9db0715a7f41881f2b39a5 (diff) |
Avoid non-constant struct initializers
* libguile/foreign-object.c (scm_make_foreign_object_2):
(scm_make_foreign_object_3): Avoid non-constant struct initializers.
-rw-r--r-- | libguile/foreign-object.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libguile/foreign-object.c b/libguile/foreign-object.c index ef4d7dd4f..4c81f6da3 100644 --- a/libguile/foreign-object.c +++ b/libguile/foreign-object.c @@ -78,7 +78,10 @@ scm_make_foreign_object_1 (SCM type, scm_t_bits val0) SCM scm_make_foreign_object_2 (SCM type, scm_t_bits val0, scm_t_bits val1) { - scm_t_bits vals[2] = { val0, val1 }; + scm_t_bits vals[2]; + + vals[0] = val0; + vals[1] = val1; return scm_make_foreign_object_n (type, 2, vals); } @@ -87,7 +90,11 @@ SCM scm_make_foreign_object_3 (SCM type, scm_t_bits val0, scm_t_bits val1, scm_t_bits val2) { - scm_t_bits vals[3] = { val0, val1, val2 }; + scm_t_bits vals[3]; + + vals[0] = val0; + vals[1] = val1; + vals[2] = val2; return scm_make_foreign_object_n (type, 3, vals); } |