Changeset 3632


Ignore:
Timestamp:
09/08/03 18:28:48 (19 years ago)
Author:
piso
Message:

ARRAYP, ARRAY-HAS-FILL-POINTER-P

File:
1 edited

Legend:

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

    r3630 r3632  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Primitives.java,v 1.378 2003-09-08 18:18:29 piso Exp $
     5 * $Id: Primitives.java,v 1.379 2003-09-08 18:28:48 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    343343                return arg.ABS();
    344344            case ARRAYP:                        // ### arrayp
    345                 return arg.typep(Symbol.ARRAY);
     345                return arg instanceof AbstractArray ? T : NIL;
    346346            case ARRAY_HAS_FILL_POINTER_P:      // ### array-has-fill-pointer-p
    347                 return checkVector(arg).getFillPointer() >= 0 ? T : NIL;
     347                if (arg instanceof AbstractVector)
     348                    return ((AbstractVector)arg).getFillPointer() >= 0 ? T : NIL;
     349                if (arg instanceof AbstractArray)
     350                    return NIL;
     351                throw new TypeError(arg, "array");
    348352            case VECTORP:                       // ### vectorp
    349353                return (arg.getType() & TYPE_VECTOR) != 0 ? T : NIL;
Note: See TracChangeset for help on using the changeset viewer.