Changeset 4322


Ignore:
Timestamp:
10/12/03 13:45:13 (19 years ago)
Author:
piso
Message:

classOf()

File:
1 edited

Legend:

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

    r4103 r4322  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispString.java,v 1.61 2003-09-28 16:26:31 piso Exp $
     5 * $Id: LispString.java,v 1.62 2003-10-12 13:45:13 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    6464    }
    6565
    66     public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
    67     {
    68         if (typeSpecifier instanceof Symbol) {
    69             if (typeSpecifier == Symbol.STRING)
     66    public LispClass classOf()
     67    {
     68        return BuiltInClass.STRING;
     69    }
     70
     71    public LispObject typep(LispObject type) throws ConditionThrowable
     72    {
     73        if (type instanceof Symbol) {
     74            if (type == Symbol.STRING)
    7075                return T;
    71             if (typeSpecifier == Symbol.BASE_STRING)
     76            if (type == Symbol.BASE_STRING)
    7277                return T;
    73             if (typeSpecifier == Symbol.SIMPLE_STRING ||
    74                 typeSpecifier == Symbol.SIMPLE_BASE_STRING)
     78            if (type == Symbol.SIMPLE_STRING ||
     79                type == Symbol.SIMPLE_BASE_STRING)
    7580                return fillPointer < 0 ? T : NIL;
    7681        }
    77         return super.typep(typeSpecifier);
     82        if (type == BuiltInClass.STRING)
     83            return T;
     84        return super.typep(type);
    7885    }
    7986
Note: See TracChangeset for help on using the changeset viewer.