Changeset 5305


Ignore:
Timestamp:
01/01/04 02:04:22 (18 years ago)
Author:
piso
Message:

HASH-TABLE-SIZE

Location:
trunk/j/src/org/armedbear/lisp
Files:
2 edited

Legend:

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

    r5304 r5305  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: Autoload.java,v 1.117 2004-01-01 01:58:41 piso Exp $
     5 * $Id: Autoload.java,v 1.118 2004-01-01 02:04:22 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    235235        autoload("hash-table-count", "HashTable");
    236236        autoload("hash-table-p", "HashTable");
     237        autoload("hash-table-size", "HashTable");
    237238        autoload("hash-table-test", "HashTable");
    238239        autoload("import", "PackageFunctions");
  • trunk/j/src/org/armedbear/lisp/HashTable.java

    r5304 r5305  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: HashTable.java,v 1.29 2004-01-01 01:58:22 piso Exp $
     5 * $Id: HashTable.java,v 1.30 2004-01-01 02:04:12 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    429429        }
    430430    };
     431
     432    private static final Primitive1 HASH_TABLE_SIZE =
     433        new Primitive1("hash-table-size", "hash-table")
     434    {
     435        public LispObject execute(LispObject arg) throws ConditionThrowable
     436        {
     437            if (arg instanceof HashTable)
     438                return new Fixnum(((HashTable)arg).buckets.length);
     439            return signal(new TypeError(arg, Symbol.HASH_TABLE));
     440        }
     441    };
    431442}
Note: See TracChangeset for help on using the changeset viewer.