wingo pushed a commit to branch wip-whippet
in repository guile.

commit 617344f82294fef95d00263189707c741a74aa98
Author: Andy Wingo <wi...@pobox.com>
AuthorDate: Tue Jun 24 10:40:40 2025 +0200

    Switch all users of SCM_SIMPLE_VECTOR_SET to scm_c_vector_set_x
    
    * libguile/eval.c:
    * libguile/filesys.c:
    * libguile/hashtab.c:
    * libguile/memoize.c:
    * libguile/net_db.c:
    * libguile/ports-internal.h:
    * libguile/ports.c:
    * libguile/posix.c:
    * libguile/print.c:
    * libguile/regex-posix.c:
    * libguile/scmsigs.c:
    * libguile/socket.c:
    * libguile/stime.c:
    * libguile/strports.c: Use C function instead of macro.
---
 libguile/eval.c           |  2 +-
 libguile/filesys.c        | 64 +++++++++++++++++++++++------------------------
 libguile/hashtab.c        | 10 ++++----
 libguile/memoize.c        |  2 +-
 libguile/net_db.c         | 56 ++++++++++++++++++++---------------------
 libguile/ports-internal.h |  6 ++---
 libguile/ports.c          |  8 +++---
 libguile/posix.c          | 38 ++++++++++++++--------------
 libguile/print.c          |  4 +--
 libguile/regex-posix.c    | 12 ++++-----
 libguile/scmsigs.c        | 14 +++++------
 libguile/socket.c         | 33 ++++++++++++------------
 libguile/stime.c          | 46 +++++++++++++++++-----------------
 libguile/strports.c       | 12 ++++-----
 14 files changed, 153 insertions(+), 154 deletions(-)

diff --git a/libguile/eval.c b/libguile/eval.c
index 3906a418f..2112cf9b2 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -80,7 +80,7 @@
 #define CDDDR(x) SCM_CDDDR(x)
 
 #define VECTOR_REF(v, i) (scm_c_vector_ref (v, i))
-#define VECTOR_SET(v, i, x) (SCM_SIMPLE_VECTOR_SET (v, i, x))
+#define VECTOR_SET(v, i, x) (scm_c_vector_set_x (v, i, x))
 #define VECTOR_LENGTH(v) (scm_c_vector_length (v))
 
 
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 0b40e921b..27657f9eb 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -427,57 +427,57 @@ scm_stat2scm (struct stat_or_stat64 *stat_temp)
 {
   SCM ans = scm_c_make_vector (18, SCM_UNSPECIFIED);
   
-  SCM_SIMPLE_VECTOR_SET(ans, 0, scm_from_ulong (stat_temp->st_dev));
-  SCM_SIMPLE_VECTOR_SET(ans, 1, scm_from_ino_t_or_ino64_t (stat_temp->st_ino));
-  SCM_SIMPLE_VECTOR_SET(ans, 2, scm_from_ulong (stat_temp->st_mode));
-  SCM_SIMPLE_VECTOR_SET(ans, 3, scm_from_ulong (stat_temp->st_nlink));
-  SCM_SIMPLE_VECTOR_SET(ans, 4, scm_from_ulong (stat_temp->st_uid));
-  SCM_SIMPLE_VECTOR_SET(ans, 5, scm_from_ulong (stat_temp->st_gid));
+  scm_c_vector_set_x (ans, 0, scm_from_ulong (stat_temp->st_dev));
+  scm_c_vector_set_x (ans, 1, scm_from_ino_t_or_ino64_t (stat_temp->st_ino));
+  scm_c_vector_set_x (ans, 2, scm_from_ulong (stat_temp->st_mode));
+  scm_c_vector_set_x (ans, 3, scm_from_ulong (stat_temp->st_nlink));
+  scm_c_vector_set_x (ans, 4, scm_from_ulong (stat_temp->st_uid));
+  scm_c_vector_set_x (ans, 5, scm_from_ulong (stat_temp->st_gid));
 #ifdef HAVE_STRUCT_STAT_ST_RDEV
-  SCM_SIMPLE_VECTOR_SET(ans, 6, scm_from_ulong (stat_temp->st_rdev));
+  scm_c_vector_set_x (ans, 6, scm_from_ulong (stat_temp->st_rdev));
 #else
-  SCM_SIMPLE_VECTOR_SET(ans, 6, SCM_BOOL_F);
+  scm_c_vector_set_x (ans, 6, SCM_BOOL_F);
 #endif
-  SCM_SIMPLE_VECTOR_SET(ans, 7, scm_from_off_t_or_off64_t 
(stat_temp->st_size));
-  SCM_SIMPLE_VECTOR_SET(ans, 8, scm_from_ulong (stat_temp->st_atime));
-  SCM_SIMPLE_VECTOR_SET(ans, 9, scm_from_ulong (stat_temp->st_mtime));
-  SCM_SIMPLE_VECTOR_SET(ans, 10, scm_from_ulong (stat_temp->st_ctime));
+  scm_c_vector_set_x (ans, 7, scm_from_off_t_or_off64_t (stat_temp->st_size));
+  scm_c_vector_set_x (ans, 8, scm_from_ulong (stat_temp->st_atime));
+  scm_c_vector_set_x (ans, 9, scm_from_ulong (stat_temp->st_mtime));
+  scm_c_vector_set_x (ans, 10, scm_from_ulong (stat_temp->st_ctime));
 #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
-  SCM_SIMPLE_VECTOR_SET(ans, 11, scm_from_ulong (stat_temp->st_blksize));
+  scm_c_vector_set_x (ans, 11, scm_from_ulong (stat_temp->st_blksize));
 #else
-  SCM_SIMPLE_VECTOR_SET(ans, 11, scm_from_ulong (4096L));
+  scm_c_vector_set_x (ans, 11, scm_from_ulong (4096L));
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_BLOCKS
-  SCM_SIMPLE_VECTOR_SET(ans, 12, scm_from_blkcnt_t_or_blkcnt64_t 
(stat_temp->st_blocks));
+  scm_c_vector_set_x (ans, 12, scm_from_blkcnt_t_or_blkcnt64_t 
(stat_temp->st_blocks));
 #else
-  SCM_SIMPLE_VECTOR_SET(ans, 12, SCM_BOOL_F);
+  scm_c_vector_set_x (ans, 12, SCM_BOOL_F);
 #endif
   {
     int mode = stat_temp->st_mode;
     
     if (S_ISREG (mode))
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_regular);
+      scm_c_vector_set_x (ans, 13, scm_sym_regular);
     else if (S_ISDIR (mode))
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_directory);
+      scm_c_vector_set_x (ans, 13, scm_sym_directory);
 #ifdef S_ISLNK
     /* systems without symlinks probably don't have S_ISLNK */
     else if (S_ISLNK (mode))
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_symlink);
+      scm_c_vector_set_x (ans, 13, scm_sym_symlink);
 #endif
     else if (S_ISBLK (mode))
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_block_special);
+      scm_c_vector_set_x (ans, 13, scm_sym_block_special);
     else if (S_ISCHR (mode))
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_char_special);
+      scm_c_vector_set_x (ans, 13, scm_sym_char_special);
     else if (S_ISFIFO (mode))
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_fifo);
+      scm_c_vector_set_x (ans, 13, scm_sym_fifo);
 #ifdef S_ISSOCK
     else if (S_ISSOCK (mode))
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_sock);
+      scm_c_vector_set_x (ans, 13, scm_sym_sock);
 #endif
     else
-      SCM_SIMPLE_VECTOR_SET(ans, 13, scm_sym_unknown);
+      scm_c_vector_set_x (ans, 13, scm_sym_unknown);
 
-    SCM_SIMPLE_VECTOR_SET(ans, 14, scm_from_int ((~S_IFMT) & mode));
+    scm_c_vector_set_x (ans, 14, scm_from_int ((~S_IFMT) & mode));
 
     /* the layout of the bits in ve[14] is intended to be portable.
        If there are systems that don't follow the usual convention,
@@ -506,24 +506,24 @@ scm_stat2scm (struct stat_or_stat64 *stat_temp)
        tmp <<= 1;
        if (S_IXOTH & mode) tmp += 1; 
 
-       SCM_SIMPLE_VECTOR_SET(ans, 14, scm_from_int (tmp));
+       scm_c_vector_set_x (ans, 14, scm_from_int (tmp));
        
        */
   }  
 #ifdef HAVE_STRUCT_STAT_ST_ATIM
-  SCM_SIMPLE_VECTOR_SET(ans, 15, scm_from_long (stat_temp->st_atim.tv_nsec));
+  scm_c_vector_set_x (ans, 15, scm_from_long (stat_temp->st_atim.tv_nsec));
 #else
-  SCM_SIMPLE_VECTOR_SET(ans, 15, SCM_I_MAKINUM (0));
+  scm_c_vector_set_x (ans, 15, SCM_I_MAKINUM (0));
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_MTIM
-  SCM_SIMPLE_VECTOR_SET(ans, 16, scm_from_long (stat_temp->st_mtim.tv_nsec));
+  scm_c_vector_set_x (ans, 16, scm_from_long (stat_temp->st_mtim.tv_nsec));
 #else
-  SCM_SIMPLE_VECTOR_SET(ans, 16, SCM_I_MAKINUM (0));
+  scm_c_vector_set_x (ans, 16, SCM_I_MAKINUM (0));
 #endif
 #ifdef HAVE_STRUCT_STAT_ST_CTIM
-  SCM_SIMPLE_VECTOR_SET(ans, 17, scm_from_ulong (stat_temp->st_ctim.tv_sec));
+  scm_c_vector_set_x (ans, 17, scm_from_ulong (stat_temp->st_ctim.tv_sec));
 #else
-  SCM_SIMPLE_VECTOR_SET(ans, 17, SCM_I_MAKINUM (0));
+  scm_c_vector_set_x (ans, 17, SCM_I_MAKINUM (0));
 #endif
 
   return ans;
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index c59146808..d443c4772 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -521,7 +521,7 @@ hashtable_bucket (struct scm_t_hashtable *ht, size_t idx)
 static inline void
 hashtable_set_bucket (struct scm_t_hashtable *ht, size_t idx, SCM bucket)
 {
-  SCM_SIMPLE_VECTOR_SET (hashtable_buckets (ht), idx, bucket);
+  scm_c_vector_set_x (hashtable_buckets (ht), idx, bucket);
 }
 
 /* A hash table contains a vector of association lists.
@@ -614,7 +614,7 @@ rehash (struct scm_t_hashtable *table, scm_t_hash_fn 
hash_fn,
   for (i = 0; i < old_size; ++i)
     {
       SCM ls = scm_c_vector_ref (buckets, i);
-      SCM_SIMPLE_VECTOR_SET (buckets, i, SCM_EOL);
+      scm_c_vector_set_x (buckets, i, SCM_EOL);
 
       while (scm_is_pair (ls))
        {
@@ -628,7 +628,7 @@ rehash (struct scm_t_hashtable *table, scm_t_hash_fn 
hash_fn,
          if (h >= new_size)
            scm_out_of_range (func_name, scm_from_ulong (h));
          SCM_SETCDR (cell, scm_c_vector_ref (new_buckets, h));
-         SCM_SIMPLE_VECTOR_SET (new_buckets, h, cell);
+         scm_c_vector_set_x (new_buckets, h, cell);
          hashtable_increment (table);
        }
     }
@@ -751,7 +751,7 @@ scm_hash_fn_create_handle_x (SCM table, SCM obj, SCM init,
            scm_out_of_range ("hash_fn_create_handle_x", scm_from_ulong (k));
        }
       SCM_SETCDR (new_bucket, scm_c_vector_ref (buckets, k));
-      SCM_SIMPLE_VECTOR_SET (buckets, k, new_bucket);
+      scm_c_vector_set_x (buckets, k, new_bucket);
       hashtable_increment (ht);
 
       /* Maybe rehash the table.  */
@@ -819,7 +819,7 @@ scm_hash_fn_remove_x (SCM table, SCM obj,
 
   if (scm_is_true (h))
     {
-      SCM_SIMPLE_VECTOR_SET 
+      scm_c_vector_set_x 
        (buckets, k, scm_delq_x (h, scm_c_vector_ref (buckets, k)));
       hashtable_decrement (ht);
       if (hashtable_n_items (ht) < hashtable_lower (ht))
diff --git a/libguile/memoize.c b/libguile/memoize.c
index a5c314cd9..7ea92abc2 100644
--- a/libguile/memoize.c
+++ b/libguile/memoize.c
@@ -64,7 +64,7 @@
 #define CADDDR(x) SCM_CADDDR(x)
 
 #define VECTOR_REF(v, i) (scm_c_vector_ref (v, i))
-#define VECTOR_SET(v, i, x) (SCM_SIMPLE_VECTOR_SET (v, i, x))
+#define VECTOR_SET(v, i, x) (scm_c_vector_set_x (v, i, x))
 #define VECTOR_LENGTH(v) (scm_c_vector_length (v))
 
 SCM_SYMBOL (sym_case_lambda_star, "case-lambda*");
diff --git a/libguile/net_db.c b/libguile/net_db.c
index 217158b19..14ef787e9 100644
--- a/libguile/net_db.c
+++ b/libguile/net_db.c
@@ -1,5 +1,5 @@
 /* "net_db.c" network database support
-   Copyright 1995-2001,2006,2009-2013,2018
+   Copyright 1995-2001,2006,2009-2013,2018,2025
      Free Software Foundation, Inc.
 
    This file is part of Guile.
@@ -174,13 +174,13 @@ SCM_DEFINE (scm_gethost, "gethost", 0, 1, 0,
   if (!entry)
     scm_resolv_error (FUNC_NAME, host);
   
-  SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_locale_string (entry->h_name));
-  SCM_SIMPLE_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->h_aliases));
-  SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_int (entry->h_addrtype));
-  SCM_SIMPLE_VECTOR_SET(result, 3, scm_from_int (entry->h_length));
+  scm_c_vector_set_x (result, 0, scm_from_locale_string (entry->h_name));
+  scm_c_vector_set_x (result, 1, scm_makfromstrs (-1, entry->h_aliases));
+  scm_c_vector_set_x (result, 2, scm_from_int (entry->h_addrtype));
+  scm_c_vector_set_x (result, 3, scm_from_int (entry->h_length));
   if (sizeof (struct in_addr) != entry->h_length)
     {
-      SCM_SIMPLE_VECTOR_SET(result, 4, SCM_BOOL_F);
+      scm_c_vector_set_x (result, 4, SCM_BOOL_F);
       return result;
     }
   for (argv = entry->h_addr_list; argv[i]; i++);
@@ -189,7 +189,7 @@ SCM_DEFINE (scm_gethost, "gethost", 0, 1, 0,
       inad = *(struct in_addr *) argv[i];
       lst = scm_cons (scm_from_ulong (ntohl (inad.s_addr)), lst);
     }
-  SCM_SIMPLE_VECTOR_SET(result, 4, lst);
+  scm_c_vector_set_x (result, 4, lst);
   return result;
 }
 #undef FUNC_NAME
@@ -250,10 +250,10 @@ SCM_DEFINE (scm_getnet, "getnet", 0, 1, 0,
   if (!entry)
     SCM_SYSERROR_MSG ("no such network ~A", scm_list_1 (net), eno);
 
-  SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_locale_string (entry->n_name));
-  SCM_SIMPLE_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->n_aliases));
-  SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_int (entry->n_addrtype));
-  SCM_SIMPLE_VECTOR_SET(result, 3, scm_from_ulong (entry->n_net));
+  scm_c_vector_set_x (result, 0, scm_from_locale_string (entry->n_name));
+  scm_c_vector_set_x (result, 1, scm_makfromstrs (-1, entry->n_aliases));
+  scm_c_vector_set_x (result, 2, scm_from_int (entry->n_addrtype));
+  scm_c_vector_set_x (result, 3, scm_from_ulong (entry->n_net));
   return result;
 }
 #undef FUNC_NAME
@@ -302,9 +302,9 @@ SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0,
   if (!entry)
     SCM_SYSERROR_MSG ("no such protocol ~A", scm_list_1 (protocol), eno);
 
-  SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_locale_string (entry->p_name));
-  SCM_SIMPLE_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->p_aliases));
-  SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_int (entry->p_proto));
+  scm_c_vector_set_x (result, 0, scm_from_locale_string (entry->p_name));
+  scm_c_vector_set_x (result, 1, scm_makfromstrs (-1, entry->p_aliases));
+  scm_c_vector_set_x (result, 2, scm_from_int (entry->p_proto));
   return result;
 }
 #undef FUNC_NAME
@@ -316,10 +316,10 @@ scm_return_entry (struct servent *entry)
 {
   SCM result = scm_c_make_vector (4, SCM_UNSPECIFIED);
 
-  SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_locale_string (entry->s_name));
-  SCM_SIMPLE_VECTOR_SET(result, 1, scm_makfromstrs (-1, entry->s_aliases));
-  SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_uint16 (ntohs (entry->s_port)));
-  SCM_SIMPLE_VECTOR_SET(result, 3, scm_from_locale_string (entry->s_proto));
+  scm_c_vector_set_x (result, 0, scm_from_locale_string (entry->s_name));
+  scm_c_vector_set_x (result, 1, scm_makfromstrs (-1, entry->s_aliases));
+  scm_c_vector_set_x (result, 2, scm_from_uint16 (ntohs (entry->s_port)));
+  scm_c_vector_set_x (result, 3, scm_from_locale_string (entry->s_proto));
   return result;
 }
 
@@ -474,16 +474,16 @@ scm_from_addrinfo (const struct addrinfo *c_ai)
      `addrinfo:' procedures in `networking.scm'.  */
 
   ai = scm_c_make_vector (6, SCM_UNDEFINED);
-  SCM_SIMPLE_VECTOR_SET (ai, 0, scm_from_int (c_ai->ai_flags));
-  SCM_SIMPLE_VECTOR_SET (ai, 1, scm_from_int (c_ai->ai_family));
-  SCM_SIMPLE_VECTOR_SET (ai, 2, scm_from_int (c_ai->ai_socktype));
-  SCM_SIMPLE_VECTOR_SET (ai, 3, scm_from_int (c_ai->ai_protocol));
-  SCM_SIMPLE_VECTOR_SET (ai, 4,
-                        scm_from_sockaddr (c_ai->ai_addr, c_ai->ai_addrlen));
-  SCM_SIMPLE_VECTOR_SET (ai, 5,
-                        c_ai->ai_canonname != NULL
-                        ? scm_from_locale_string (c_ai->ai_canonname)
-                        : SCM_BOOL_F);
+  scm_c_vector_set_x (ai, 0, scm_from_int (c_ai->ai_flags));
+  scm_c_vector_set_x (ai, 1, scm_from_int (c_ai->ai_family));
+  scm_c_vector_set_x (ai, 2, scm_from_int (c_ai->ai_socktype));
+  scm_c_vector_set_x (ai, 3, scm_from_int (c_ai->ai_protocol));
+  scm_c_vector_set_x (ai, 4,
+                      scm_from_sockaddr (c_ai->ai_addr, c_ai->ai_addrlen));
+  scm_c_vector_set_x (ai, 5,
+                      c_ai->ai_canonname != NULL
+                      ? scm_from_locale_string (c_ai->ai_canonname)
+                      : SCM_BOOL_F);
 
   return ai;
 }
diff --git a/libguile/ports-internal.h b/libguile/ports-internal.h
index dae2071b0..2b2ccc4fb 100644
--- a/libguile/ports-internal.h
+++ b/libguile/ports-internal.h
@@ -132,7 +132,7 @@ scm_port_buffer_cur (SCM buf)
 static inline void
 scm_port_buffer_set_cur (SCM buf, SCM cur)
 {
-  SCM_SIMPLE_VECTOR_SET (buf, SCM_PORT_BUFFER_FIELD_CUR, cur);
+  scm_c_vector_set_x (buf, SCM_PORT_BUFFER_FIELD_CUR, cur);
 }
 
 static inline SCM
@@ -144,7 +144,7 @@ scm_port_buffer_end (SCM buf)
 static inline void
 scm_port_buffer_set_end (SCM buf, SCM end)
 {
-  SCM_SIMPLE_VECTOR_SET (buf, SCM_PORT_BUFFER_FIELD_END, end);
+  scm_c_vector_set_x (buf, SCM_PORT_BUFFER_FIELD_END, end);
 }
 
 static inline SCM
@@ -156,7 +156,7 @@ scm_port_buffer_has_eof_p (SCM buf)
 static inline void
 scm_port_buffer_set_has_eof_p (SCM buf, SCM has_eof_p)
 {
-  SCM_SIMPLE_VECTOR_SET (buf, SCM_PORT_BUFFER_FIELD_HAS_EOF_P,
+  scm_c_vector_set_x (buf, SCM_PORT_BUFFER_FIELD_HAS_EOF_P,
                          has_eof_p);
 }
 
diff --git a/libguile/ports.c b/libguile/ports.c
index 93dbae6cc..bbe9af2b8 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -634,10 +634,10 @@ make_port_buffer (SCM port, size_t size)
 {
   SCM ret = scm_c_make_vector (SCM_PORT_BUFFER_FIELD_COUNT, SCM_INUM0);
 
-  SCM_SIMPLE_VECTOR_SET (ret, SCM_PORT_BUFFER_FIELD_BYTEVECTOR,
-                         scm_c_make_bytevector (size));
-  SCM_SIMPLE_VECTOR_SET (ret, SCM_PORT_BUFFER_FIELD_POSITION,
-                         SCM_PORT (port)->position);
+  scm_c_vector_set_x (ret, SCM_PORT_BUFFER_FIELD_BYTEVECTOR,
+                      scm_c_make_bytevector (size));
+  scm_c_vector_set_x (ret, SCM_PORT_BUFFER_FIELD_POSITION,
+                      SCM_PORT (port)->position);
   scm_port_buffer_set_has_eof_p (ret, SCM_BOOL_F);
 
   return ret;
diff --git a/libguile/posix.c b/libguile/posix.c
index a9afa20c6..749bf97b6 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -318,7 +318,7 @@ SCM_DEFINE (scm_getgroups, "getgroups", 0, 0, 0,
 
   result = scm_c_make_vector (ngroups, SCM_BOOL_F);
   while (--ngroups >= 0) 
-    SCM_SIMPLE_VECTOR_SET (result, ngroups, scm_from_ulong (groups[ngroups]));
+    scm_c_vector_set_x (result, ngroups, scm_from_ulong (groups[ngroups]));
 
   free (groups);
   return result;
@@ -409,19 +409,19 @@ SCM_DEFINE (scm_getpwuid, "getpw", 0, 1, 0,
   if (!entry)
     SCM_MISC_ERROR ("entry not found", SCM_EOL);
 
-  SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_locale_string (entry->pw_name));
-  SCM_SIMPLE_VECTOR_SET(result, 1, scm_from_locale_string (entry->pw_passwd));
-  SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_ulong (entry->pw_uid));
-  SCM_SIMPLE_VECTOR_SET(result, 3, scm_from_ulong (entry->pw_gid));
-  SCM_SIMPLE_VECTOR_SET(result, 4, scm_from_locale_string (entry->pw_gecos));
+  scm_c_vector_set_x (result, 0, scm_from_locale_string (entry->pw_name));
+  scm_c_vector_set_x (result, 1, scm_from_locale_string (entry->pw_passwd));
+  scm_c_vector_set_x (result, 2, scm_from_ulong (entry->pw_uid));
+  scm_c_vector_set_x (result, 3, scm_from_ulong (entry->pw_gid));
+  scm_c_vector_set_x (result, 4, scm_from_locale_string (entry->pw_gecos));
   if (!entry->pw_dir)
-    SCM_SIMPLE_VECTOR_SET(result, 5, scm_from_utf8_string (""));
+    scm_c_vector_set_x (result, 5, scm_from_utf8_string (""));
   else
-    SCM_SIMPLE_VECTOR_SET(result, 5, scm_from_locale_string (entry->pw_dir));
+    scm_c_vector_set_x (result, 5, scm_from_locale_string (entry->pw_dir));
   if (!entry->pw_shell)
-    SCM_SIMPLE_VECTOR_SET(result, 6, scm_from_utf8_string (""));
+    scm_c_vector_set_x (result, 6, scm_from_utf8_string (""));
   else
-    SCM_SIMPLE_VECTOR_SET(result, 6, scm_from_locale_string (entry->pw_shell));
+    scm_c_vector_set_x (result, 6, scm_from_locale_string (entry->pw_shell));
   return result;
 }
 #undef FUNC_NAME
@@ -475,10 +475,10 @@ SCM_DEFINE (scm_getgrgid, "getgr", 0, 1, 0,
   if (!entry)
     SCM_SYSERROR;
 
-  SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_locale_string (entry->gr_name));
-  SCM_SIMPLE_VECTOR_SET(result, 1, scm_from_locale_string (entry->gr_passwd));
-  SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_ulong  (entry->gr_gid));
-  SCM_SIMPLE_VECTOR_SET(result, 3, scm_makfromstrs (-1, entry->gr_mem));
+  scm_c_vector_set_x (result, 0, scm_from_locale_string (entry->gr_name));
+  scm_c_vector_set_x (result, 1, scm_from_locale_string (entry->gr_passwd));
+  scm_c_vector_set_x (result, 2, scm_from_ulong  (entry->gr_gid));
+  scm_c_vector_set_x (result, 3, scm_makfromstrs (-1, entry->gr_mem));
   return result;
 }
 #undef FUNC_NAME
@@ -1760,11 +1760,11 @@ SCM_DEFINE (scm_uname, "uname", 0, 0, 0,
   SCM result = scm_c_make_vector (5, SCM_UNSPECIFIED);
   if (uname (&buf) < 0)
     SCM_SYSERROR;
-  SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_locale_string (buf.sysname));
-  SCM_SIMPLE_VECTOR_SET(result, 1, scm_from_locale_string (buf.nodename));
-  SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_locale_string (buf.release));
-  SCM_SIMPLE_VECTOR_SET(result, 3, scm_from_locale_string (buf.version));
-  SCM_SIMPLE_VECTOR_SET(result, 4, scm_from_locale_string (buf.machine));
+  scm_c_vector_set_x (result, 0, scm_from_locale_string (buf.sysname));
+  scm_c_vector_set_x (result, 1, scm_from_locale_string (buf.nodename));
+  scm_c_vector_set_x (result, 2, scm_from_locale_string (buf.release));
+  scm_c_vector_set_x (result, 3, scm_from_locale_string (buf.version));
+  scm_c_vector_set_x (result, 4, scm_from_locale_string (buf.machine));
 /* 
    a linux special?
   SCM_SIMPLE_VECTOR_SET(result, 5, scm_from_locale_string (buf.domainname));
diff --git a/libguile/print.c b/libguile/print.c
index 7d3be736e..4c1773222 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -243,14 +243,14 @@ grow_ref_stack (scm_print_state *pstate)
   unsigned long int i;
 
   for (i = 0; i != old_size; ++i)
-    SCM_SIMPLE_VECTOR_SET (new_vect, i, scm_c_vector_ref (old_vect, i));
+    scm_c_vector_set_x (new_vect, i, scm_c_vector_ref (old_vect, i));
 
   pstate->ref_vect = new_vect;
   pstate->ceiling = new_size;
 }
 
 #define PSTATE_STACK_REF(p,i)   scm_c_vector_ref((p)->ref_vect, (i))
-#define PSTATE_STACK_SET(p,i,v) SCM_SIMPLE_VECTOR_SET((p)->ref_vect, (i), (v))
+#define PSTATE_STACK_SET(p,i,v) scm_c_vector_set_x((p)->ref_vect, (i), (v))
 
 static void
 print_circref (SCM port, scm_print_state *pstate, SCM ref)
diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c
index d480a5309..4cec6efc1 100644
--- a/libguile/regex-posix.c
+++ b/libguile/regex-posix.c
@@ -312,15 +312,15 @@ SCM_DEFINE_STATIC (regexp_exec, "regexp-exec", 2, 2, 0,
       /* The match vector must include a cell for the string that was matched,
         so add 1. */
       mvec = scm_c_make_vector (nmatches + 1, SCM_UNSPECIFIED);
-      SCM_SIMPLE_VECTOR_SET(mvec,0, str);
+      scm_c_vector_set_x (mvec, 0, str);
       for (i = 0; i < nmatches; ++i)
        if (matches[i].rm_so == -1)
-         SCM_SIMPLE_VECTOR_SET(mvec, i+1,
-                        scm_cons (scm_from_int (-1), scm_from_int (-1)));
+         scm_c_vector_set_x (mvec, i+1,
+                              scm_cons (scm_from_int (-1), scm_from_int (-1)));
        else
-         SCM_SIMPLE_VECTOR_SET(mvec, i+1,
-                        scm_cons (scm_from_long (matches[i].rm_so + offset),
-                                  scm_from_long (matches[i].rm_eo + offset)));
+         scm_c_vector_set_x (mvec, i+1,
+                              scm_cons (scm_from_long (matches[i].rm_so + 
offset),
+                                        scm_from_long (matches[i].rm_eo + 
offset)));
     }
   free (matches);
 
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index c0a637475..558391a4b 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -366,8 +366,8 @@ install_handler (int signum, SCM thread, SCM handler)
 {
   if (scm_is_false (handler))
     {
-      SCM_SIMPLE_VECTOR_SET (*signal_handlers, signum, SCM_BOOL_F);
-      SCM_SIMPLE_VECTOR_SET (signal_handler_asyncs, signum, SCM_BOOL_F);
+      scm_c_vector_set_x (*signal_handlers, signum, SCM_BOOL_F);
+      scm_c_vector_set_x (signal_handler_asyncs, signum, SCM_BOOL_F);
     }
   else
     {
@@ -375,11 +375,11 @@ install_handler (int signum, SCM thread, SCM handler)
 #if !SCM_USE_PTHREAD_THREADS
       async = scm_cons (async, SCM_BOOL_F);
 #endif
-      SCM_SIMPLE_VECTOR_SET (*signal_handlers, signum, handler);
-      SCM_SIMPLE_VECTOR_SET (signal_handler_asyncs, signum, async);
+      scm_c_vector_set_x (*signal_handlers, signum, handler);
+      scm_c_vector_set_x (signal_handler_asyncs, signum, async);
     }
 
-  SCM_SIMPLE_VECTOR_SET (signal_handler_threads, signum, thread);
+  scm_c_vector_set_x (signal_handler_threads, signum, thread);
 }
 
 SCM
@@ -602,7 +602,7 @@ SCM_DEFINE (scm_restore_signals, "restore-signals", 0, 0, 0,
          if (sigaction (i, &orig_handlers[i], NULL) == -1)
            SCM_SYSERROR;
          orig_handlers[i].sa_handler = SIG_ERR;
-         SCM_SIMPLE_VECTOR_SET (*signal_handlers, i, SCM_BOOL_F);
+         scm_c_vector_set_x (*signal_handlers, i, SCM_BOOL_F);
        }
 #else
       if (orig_handlers[i] != SIG_ERR)
@@ -610,7 +610,7 @@ SCM_DEFINE (scm_restore_signals, "restore-signals", 0, 0, 0,
          if (signal (i, orig_handlers[i]) == SIG_ERR)
            SCM_SYSERROR;
          orig_handlers[i] = SIG_ERR;
-         SCM_SIMPLE_VECTOR_SET (*signal_handlers, i, SCM_BOOL_F);        
+         scm_c_vector_set_x (*signal_handlers, i, SCM_BOOL_F);   
        }
 #endif
     }
diff --git a/libguile/socket.c b/libguile/socket.c
index 212cb51ae..0ba1058e6 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -1040,12 +1040,11 @@ _scm_from_sockaddr (const scm_t_max_sockaddr *address, 
unsigned addr_size,
 
        result = scm_c_make_vector (3, SCM_UNSPECIFIED);
 
-       SCM_SIMPLE_VECTOR_SET(result, 0,
-                             scm_from_short (fam));
-       SCM_SIMPLE_VECTOR_SET(result, 1,
-                             scm_from_ulong (ntohl (nad->sin_addr.s_addr)));
-       SCM_SIMPLE_VECTOR_SET(result, 2,
-                             scm_from_ushort (ntohs (nad->sin_port)));
+       scm_c_vector_set_x (result, 0, scm_from_short (fam));
+       scm_c_vector_set_x (result, 1,
+                            scm_from_ulong (ntohl (nad->sin_addr.s_addr)));
+       scm_c_vector_set_x (result, 2,
+                            scm_from_ushort (ntohs (nad->sin_port)));
       }
       break;
 #ifdef HAVE_IPV6
@@ -1054,14 +1053,14 @@ _scm_from_sockaddr (const scm_t_max_sockaddr *address, 
unsigned addr_size,
        const struct sockaddr_in6 *nad = (struct sockaddr_in6 *) address;
 
        result = scm_c_make_vector (5, SCM_UNSPECIFIED);
-       SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_short (fam));
-       SCM_SIMPLE_VECTOR_SET(result, 1, scm_from_ipv6 
(nad->sin6_addr.s6_addr));
-       SCM_SIMPLE_VECTOR_SET(result, 2, scm_from_ushort (ntohs 
(nad->sin6_port)));
-       SCM_SIMPLE_VECTOR_SET(result, 3, scm_from_uint32 (nad->sin6_flowinfo));
+       scm_c_vector_set_x (result, 0, scm_from_short (fam));
+       scm_c_vector_set_x (result, 1, scm_from_ipv6 (nad->sin6_addr.s6_addr));
+       scm_c_vector_set_x (result, 2, scm_from_ushort (ntohs 
(nad->sin6_port)));
+       scm_c_vector_set_x (result, 3, scm_from_uint32 (nad->sin6_flowinfo));
 #ifdef HAVE_SIN6_SCOPE_ID
-       SCM_SIMPLE_VECTOR_SET(result, 4, scm_from_ulong (nad->sin6_scope_id));
+       scm_c_vector_set_x (result, 4, scm_from_ulong (nad->sin6_scope_id));
 #else
-       SCM_SIMPLE_VECTOR_SET(result, 4, SCM_INUM0);
+       scm_c_vector_set_x (result, 4, SCM_INUM0);
 #endif
       }
       break;
@@ -1073,17 +1072,17 @@ _scm_from_sockaddr (const scm_t_max_sockaddr *address, 
unsigned addr_size,
 
        result = scm_c_make_vector (2, SCM_UNSPECIFIED);
 
-       SCM_SIMPLE_VECTOR_SET(result, 0, scm_from_short (fam));
+       scm_c_vector_set_x (result, 0, scm_from_short (fam));
        /* When addr_size is not enough to cover sun_path, do not try
           to access it. */
        if (addr_size <= offsetof (struct sockaddr_un, sun_path))
-         SCM_SIMPLE_VECTOR_SET(result, 1, SCM_BOOL_F);
+         scm_c_vector_set_x (result, 1, SCM_BOOL_F);
        else
           {
             size_t path_size = addr_size - offsetof (struct sockaddr_un, 
sun_path);
-            SCM_SIMPLE_VECTOR_SET (result, 1,
-                                   scm_from_locale_stringn (nad->sun_path,
-                                                            path_size));
+            scm_c_vector_set_x (result, 1,
+                                scm_from_locale_stringn (nad->sun_path,
+                                                         path_size));
           }
       }
       break;
diff --git a/libguile/stime.c b/libguile/stime.c
index 7a950b07d..8d40da245 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -228,16 +228,16 @@ SCM_DEFINE (scm_times, "times", 0, 0, 0,
   factor = scm_quotient (scm_from_long (TIME_UNITS_PER_SECOND),
                          scm_from_long (ticks_per_second));
 
-  SCM_SIMPLE_VECTOR_SET (result, 0,
-                         scm_product (scm_from_long (rv), factor));
-  SCM_SIMPLE_VECTOR_SET (result, 1,
-                         scm_product (scm_from_long (t.tms_utime), factor));
-  SCM_SIMPLE_VECTOR_SET (result, 2,
-                         scm_product (scm_from_long (t.tms_stime), factor));
-  SCM_SIMPLE_VECTOR_SET (result ,3,
-                         scm_product (scm_from_long (t.tms_cutime), factor));
-  SCM_SIMPLE_VECTOR_SET (result, 4,
-                         scm_product (scm_from_long (t.tms_cstime), factor));
+  scm_c_vector_set_x (result, 0,
+                      scm_product (scm_from_long (rv), factor));
+  scm_c_vector_set_x (result, 1,
+                      scm_product (scm_from_long (t.tms_utime), factor));
+  scm_c_vector_set_x (result, 2,
+                      scm_product (scm_from_long (t.tms_stime), factor));
+  scm_c_vector_set_x (result ,3,
+                      scm_product (scm_from_long (t.tms_cutime), factor));
+  scm_c_vector_set_x (result, 4,
+                      scm_product (scm_from_long (t.tms_cstime), factor));
   return result;
 }
 #undef FUNC_NAME
@@ -312,19 +312,19 @@ filltime (struct tm *bd_time, int zoff, const char *zname)
 {
   SCM result = scm_c_make_vector (11, SCM_UNDEFINED);
 
-  SCM_SIMPLE_VECTOR_SET (result,0, scm_from_int (bd_time->tm_sec));
-  SCM_SIMPLE_VECTOR_SET (result,1, scm_from_int (bd_time->tm_min));
-  SCM_SIMPLE_VECTOR_SET (result,2, scm_from_int (bd_time->tm_hour));
-  SCM_SIMPLE_VECTOR_SET (result,3, scm_from_int (bd_time->tm_mday));
-  SCM_SIMPLE_VECTOR_SET (result,4, scm_from_int (bd_time->tm_mon));
-  SCM_SIMPLE_VECTOR_SET (result,5, scm_from_int (bd_time->tm_year));
-  SCM_SIMPLE_VECTOR_SET (result,6, scm_from_int (bd_time->tm_wday));
-  SCM_SIMPLE_VECTOR_SET (result,7, scm_from_int (bd_time->tm_yday));
-  SCM_SIMPLE_VECTOR_SET (result,8, scm_from_int (bd_time->tm_isdst));
-  SCM_SIMPLE_VECTOR_SET (result,9, scm_from_int (zoff));
-  SCM_SIMPLE_VECTOR_SET (result,10, (zname 
-                                    ? scm_from_locale_string (zname)
-                                    : SCM_BOOL_F));
+  scm_c_vector_set_x (result, 0, scm_from_int (bd_time->tm_sec));
+  scm_c_vector_set_x (result, 1, scm_from_int (bd_time->tm_min));
+  scm_c_vector_set_x (result, 2, scm_from_int (bd_time->tm_hour));
+  scm_c_vector_set_x (result, 3, scm_from_int (bd_time->tm_mday));
+  scm_c_vector_set_x (result, 4, scm_from_int (bd_time->tm_mon));
+  scm_c_vector_set_x (result, 5, scm_from_int (bd_time->tm_year));
+  scm_c_vector_set_x (result, 6, scm_from_int (bd_time->tm_wday));
+  scm_c_vector_set_x (result, 7, scm_from_int (bd_time->tm_yday));
+  scm_c_vector_set_x (result, 8, scm_from_int (bd_time->tm_isdst));
+  scm_c_vector_set_x (result, 9, scm_from_int (zoff));
+  scm_c_vector_set_x (result, 10, (zname 
+                                   ? scm_from_locale_string (zname)
+                                   : SCM_BOOL_F));
   return result;
 }
 
diff --git a/libguile/strports.c b/libguile/strports.c
index fcfe084d9..f0a2e37ba 100644
--- a/libguile/strports.c
+++ b/libguile/strports.c
@@ -78,22 +78,22 @@ stream_len (SCM stream)
   return scm_c_vector_ref (stream, 2);
 }
 
-static SCM
+static void
 stream_set_bytevector (SCM stream, SCM bv)
 {
-  return SCM_SIMPLE_VECTOR_SET (stream, 0, bv);
+  scm_c_vector_set_x (stream, 0, bv);
 }
 
-static SCM
+static void
 stream_set_pos (SCM stream, SCM pos)
 {
-  return SCM_SIMPLE_VECTOR_SET (stream, 1, pos);
+  scm_c_vector_set_x (stream, 1, pos);
 }
 
-static SCM
+static void
 stream_set_len (SCM stream, SCM len)
 {
-  return SCM_SIMPLE_VECTOR_SET (stream, 2, len);
+  scm_c_vector_set_x (stream, 2, len);
 }
 
 static SCM

Reply via email to