guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 07/19: Merge commit '81d2c84674f03f9028f26474ab19d3d3f35


From: Andy Wingo
Subject: [Guile-commits] 07/19: Merge commit '81d2c84674f03f9028f26474ab19d3d3f353881a'
Date: Thu, 22 Jan 2015 13:54:39 +0000

wingo pushed a commit to branch master
in repository guile.

commit a51111dd255189bd00eb28547491ee4a9bfa9ca1
Merge: 086bbcc 81d2c84
Author: Andy Wingo <address@hidden>
Date:   Thu Jan 22 13:16:49 2015 +0100

    Merge commit '81d2c84674f03f9028f26474ab19d3d3f353881a'
    
    Some fixups in bytevectors.c.

 libguile/bytevectors.c |   75 +++++++++++++++++++++++-------------------------
 1 files changed, 36 insertions(+), 39 deletions(-)

diff --cc libguile/bytevectors.c
index b5e28e4,9f6b6ab..4f18be6
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@@ -1,4 -1,4 +1,4 @@@
--/* Copyright (C) 2009-2014 Free Software Foundation, Inc.
++/* Copyright (C) 2009-2015 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
@@@ -909,9 -888,9 +906,9 @@@ bytevector_large_set (char *c_bv, size_
    c_bv = (char *) SCM_BYTEVECTOR_CONTENTS (bv);                               
\
                                                                        \
    /* C_SIZE must have its 3 higher bits set to zero so that           \
-      multiplying it by 8 yields a number that fits in an              \
-      unsigned long.  */                                                       
\
-   if (SCM_UNLIKELY ((c_size == 0) || (c_size >= (ULONG_MAX >> 3L))))  \
+      multiplying it by 8 yields a number that fits in a                       
\
+      size_t.  */                                                      \
 -  if (SCM_UNLIKELY (c_size == 0 || c_size >= (SCM_I_SIZE_MAX >> 3)))    \
++  if (SCM_UNLIKELY (c_size == 0 || c_size >= (SIZE_MAX >> 3)))                
\
      scm_out_of_range (FUNC_NAME, size);                                       
\
    if (SCM_UNLIKELY (c_index + c_size > c_len))                                
\
      scm_out_of_range (FUNC_NAME, index);
@@@ -1185,12 -1160,12 +1182,12 @@@ SCM_DEFINE (scm_bytevector_to_uint_list
                                                                        \
    SCM_VALIDATE_LIST_COPYLEN (1, lst, c_len);                          \
    SCM_VALIDATE_SYMBOL (2, endianness);                                        
\
-   c_size = scm_to_uint (size);                                                
\
+   c_size = scm_to_size_t (size);                                      \
                                                                        \
-   if (SCM_UNLIKELY ((c_size == 0) || (c_size >= (ULONG_MAX >> 3L))))  \
 -  if (SCM_UNLIKELY (c_size == 0 || c_size >= (SCM_I_SIZE_MAX >> 3)))    \
++  if (SCM_UNLIKELY (c_size == 0 || c_size >= (SIZE_MAX >> 3)))                
\
      scm_out_of_range (FUNC_NAME, size);                                       
\
                                                                        \
-   bv = make_bytevector (c_len * c_size, SCM_ARRAY_ELEMENT_TYPE_VU8);     \
+   bv = make_bytevector (c_len * c_size, SCM_ARRAY_ELEMENT_TYPE_VU8);    \
    c_bv = (char *) SCM_BYTEVECTOR_CONTENTS (bv);                               
\
                                                                        \
    for (c_bv_ptr = c_bv;                                                       
\



reply via email to

[Prev in Thread] Current Thread [Next in Thread]