Changeset 5989


Ignore:
Timestamp:
02/26/04 01:44:20 (17 years ago)
Author:
piso
Message:

readArray(): array refactoring.

File:
1 edited

Legend:

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

    r5948 r5989  
    33 *
    44 * Copyright (C) 2003-2004 Peter Graves
    5  * $Id: Stream.java,v 1.28 2004-02-25 01:28:34 piso Exp $
     5 * $Id: Stream.java,v 1.29 2004-02-26 01:44:20 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    687687    {
    688688        LispObject obj = read(true, NIL, true);
    689         if (rank == 1)
    690             return new SimpleVector(obj);
    691         return new Array(rank, obj);
     689        switch (rank) {
     690            case 0:
     691                return new ZeroRankArray(T, obj, false);
     692            case 1:
     693                return new SimpleVector(obj);
     694            default:
     695                return new SimpleArray(rank, obj);
     696        }
    692697    }
    693698
Note: See TracChangeset for help on using the changeset viewer.