mes: Rename make-vector to core:make-vector.

* src/vector.c (make_vector_): Rename from make_vector.  Update callers.
This commit is contained in:
Jan Nieuwenhuizen 2018-01-07 16:26:36 +01:00
parent a5ede4d4d6
commit 7b8f69972e
3 changed files with 6 additions and 7 deletions

View file

@ -195,9 +195,8 @@
;; Vector
(define (vector . rest) (list->vector rest))
(define c:make-vector make-vector)
(define (make-vector n . x)
(if (null? x) (c:make-vector n)
(if (null? x) (core:make-vector n)
(list->vector (apply make-list (cons n x)))))
(define (vector-copy x)

View file

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* Mes --- Maxwell Equations of Software
* Copyright © 2016,2017 Jan Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018 Jan Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of Mes.
*
@ -19,7 +19,7 @@
*/
SCM
make_vector (SCM n)
make_vector_ (SCM n)
{
int k = VALUE (n);
VALUE (tmp_num) = TVECTOR;
@ -67,7 +67,7 @@ SCM
list_to_vector (SCM x)
{
VALUE (tmp_num) = VALUE (length (x));
SCM v = make_vector (tmp_num);
SCM v = make_vector_ (tmp_num);
SCM p = VECTOR (v);
while (x != cell_nil)
{

View file

@ -9,7 +9,7 @@ exit $?
;;; -*-scheme-*-
;;; Mes --- Maxwell Equations of Software
;;; Copyright © 2016,2017 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016,2017,2018 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of Mes.
;;;
@ -39,7 +39,7 @@ exit $?
(pass-if "vector-length" (seq? (vector-length #(1)) 1))
(when (not guile?)
(pass-if "c:make-vector" (sequal? (c:make-vector 3) #(*unspecified* *unspecified* *unspecified*)))
(pass-if "core:make-vector" (sequal? (core:make-vector 3) #(*unspecified* *unspecified* *unspecified*)))
(pass-if "make-vector" (sequal? (make-vector 3) #(*unspecified* *unspecified* *unspecified*))))
(pass-if "make-vector 2" (sequal? (make-vector 3 1) #(1 1 1)))