Changeset 5845


Ignore:
Timestamp:
02/16/04 00:47:13 (17 years ago)
Author:
piso
Message:

Support initial element.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/adjust_array.java

    r5687 r5845  
    33 *
    44 * Copyright (C) 2004 Peter Graves
    5  * $Id: adjust_array.java,v 1.1 2004-02-04 15:12:40 piso Exp $
     5 * $Id: adjust_array.java,v 1.2 2004-02-16 00:47:13 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4646        LispObject displacedIndexOffset = args[8];
    4747        if (initialElementProvided != NIL && initialContents != NIL) {
    48             return signal(new LispError("ADJUST-ARRAY: cannot specify both " +
    49                                         "initial element and initial contents."));
     48            return signal(new LispError("ADJUST-ARRAY: cannot specify both initial element and initial contents."));
    5049        }
    5150        if (elementType != array.getElementType() &&
     
    6362                newSize = dimensions;
    6463            if (newSize != null)
    65                 return v.adjustArray(Fixnum.getValue(newSize));
     64                return v.adjustArray(Fixnum.getValue(newSize), initialElement);
    6665        }
    6766        if (array instanceof LispString) {
     
    7473                newSize = dimensions;
    7574            if (newSize != null)
    76                 return s.adjustArray(Fixnum.getValue(newSize));
     75                return s.adjustArray(Fixnum.getValue(newSize), initialElement);
    7776        }
    7877        return signal(new LispError("ADJUST-ARRAY: unsupported case."));
Note: See TracChangeset for help on using the changeset viewer.