guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, wip-array-refactor, updated. release_1


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, wip-array-refactor, updated. release_1-9-0-81-g2e0b984
Date: Sat, 18 Jul 2009 17:08:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=2e0b9842e4581d1f6fd818f03d46e58509ea7d01

The branch, wip-array-refactor has been updated
       via  2e0b9842e4581d1f6fd818f03d46e58509ea7d01 (commit)
       via  efdd7653f9e83c42e804f41294bfb681042a1189 (commit)
       via  57d401f5a1f30baee03d0dbfab5927e2b4fe9d13 (commit)
      from  0f38dbddb70d8199015b754574cf27577bda00ca (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2e0b9842e4581d1f6fd818f03d46e58509ea7d01
Author: Andy Wingo <address@hidden>
Date:   Sat Jul 18 19:08:43 2009 +0200

    clean up includes in vectors.[ch]
    
    * libguile/vectors.h:
    * libguile/vectors.c: Clean up the includes... mostly.

commit efdd7653f9e83c42e804f41294bfb681042a1189
Author: Andy Wingo <address@hidden>
Date:   Sat Jul 18 19:03:28 2009 +0200

    fix (bytevector-ieee-single-native-set! x 0 0)
    
    * libguile/bytevectors.c (VALIDATE_REAL): SCM_VALIDATE_REAL is not what
      we need for checking values for bytevector-ieee-single-native-set! et
      al, so define our own validator.
      (IEEE754_SET, IEEE754_NATIVE_SET): Use it.

commit 57d401f5a1f30baee03d0dbfab5927e2b4fe9d13
Author: Andy Wingo <address@hidden>
Date:   Sat Jul 18 18:55:45 2009 +0200

    remove uniform-array->bytevector test
    
    * test-suite/tests/bytevectors.test: Remove uniform-array->bytevector
      test.

-----------------------------------------------------------------------

Summary of changes:
 libguile/bytevectors.c            |   10 ++++++++--
 libguile/vectors.c                |    6 +-----
 libguile/vectors.h                |    3 +--
 test-suite/tests/bytevectors.test |    5 +----
 4 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c
index 5f3d749..c1ce099 100644
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@ -1655,6 +1655,12 @@ double_from_foreign_endianness (const union 
scm_ieee754_double *source)
    _c_type ## _to_foreign_endianness
 
 
+/* FIXME: SCM_VALIDATE_REAL rejects integers, etc. grrr */
+#define VALIDATE_REAL(pos, v) \
+  do { \
+    SCM_ASSERT_TYPE (scm_is_true (scm_rational_p (v)), v, pos, FUNC_NAME, 
"real"); \
+  } while (0)
+
 /* Templace getters and setters.  */
 
 #define IEEE754_ACCESSOR_PROLOGUE(_type)                       \
@@ -1691,7 +1697,7 @@ double_from_foreign_endianness (const union 
scm_ieee754_double *source)
   _type c_value;                                               \
                                                                \
   IEEE754_ACCESSOR_PROLOGUE (_type);                           \
-  SCM_VALIDATE_REAL (3, value);                                        \
+  VALIDATE_REAL (3, value);                                    \
   SCM_VALIDATE_SYMBOL (4, endianness);                         \
   c_value = IEEE754_FROM_SCM (_type) (value);                  \
                                                                \
@@ -1711,7 +1717,7 @@ double_from_foreign_endianness (const union 
scm_ieee754_double *source)
   _type c_value;                                       \
                                                        \
   IEEE754_ACCESSOR_PROLOGUE (_type);                   \
-  SCM_VALIDATE_REAL (3, value);                                \
+  VALIDATE_REAL (3, value);                            \
   c_value = IEEE754_FROM_SCM (_type) (value);          \
                                                        \
   memcpy (&c_bv[c_index], &c_value, sizeof (c_value)); \
diff --git a/libguile/vectors.c b/libguile/vectors.c
index 89b822a..118628f 100644
--- a/libguile/vectors.c
+++ b/libguile/vectors.c
@@ -30,12 +30,8 @@
 
 #include "libguile/validate.h"
 #include "libguile/vectors.h"
+#include "libguile/arrays.h" /* Hit me with the ugly stick */
 #include "libguile/generalized-vectors.h"
-#include "libguile/arrays.h"
-#include "libguile/bitvectors.h"
-#include "libguile/bytevectors.h"
-#include "libguile/array-map.h"
-#include "libguile/srfi-4.h"
 #include "libguile/strings.h"
 #include "libguile/srfi-13.h"
 #include "libguile/dynwind.h"
diff --git a/libguile/vectors.h b/libguile/vectors.h
index bc5b41c..d8c0a6f 100644
--- a/libguile/vectors.h
+++ b/libguile/vectors.h
@@ -3,7 +3,7 @@
 #ifndef SCM_VECTORS_H
 #define SCM_VECTORS_H
 
-/* Copyright (C) 1995,1996,1998,2000,2001,2002,2004,2005, 2006, 2008 Free 
Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,2000,2001,2002,2004,2005, 2006, 2008, 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
@@ -24,7 +24,6 @@
 
 
 #include "libguile/__scm.h"
-#include "libguile/arrays.h"
 
 
 
diff --git a/test-suite/tests/bytevectors.test 
b/test-suite/tests/bytevectors.test
index 8b336bb..e63294c 100644
--- a/test-suite/tests/bytevectors.test
+++ b/test-suite/tests/bytevectors.test
@@ -668,11 +668,8 @@
 
   (pass-if-exception "make-typed-array [out-of-range]"
     exception:out-of-range
-    (make-typed-array 'vu8 256 77))
+    (make-typed-array 'vu8 256 77)))
 
-  (pass-if "uniform-array->bytevector"
-    (let ((bv #vu8(0 1 128 255)))
-      (equal? bv (uniform-array->bytevector bv)))))
 
 
 ;;; Local Variables:


hooks/post-receive
-- 
GNU Guile




reply via email to

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