Changeset 5893


Ignore:
Timestamp:
02/23/04 00:12:37 (17 years ago)
Author:
piso
Message:

((LispString?)obj).getValue() => obj.getStringValue()

File:
1 edited

Legend:

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

    r5765 r5893  
    33 *
    44 * Copyright (C) 2002-2004 Peter Graves
    5  * $Id: Symbol.java,v 1.106 2004-02-11 19:51:47 piso Exp $
     5 * $Id: Symbol.java,v 1.107 2004-02-23 00:12:37 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    530530
    531531    // ### symbol-plist
    532     public static final Primitive1 SYMBOL_PLIST = new Primitive1("symbol-plist","symbol")
     532    public static final Primitive1 SYMBOL_PLIST = new Primitive1("symbol-plist", "symbol")
    533533    {
    534534        public LispObject execute(LispObject arg) throws ConditionThrowable
     
    545545
    546546    // ### keywordp
    547     public static final Primitive1 KEYWORDP = new Primitive1("keywordp","object")
     547    public static final Primitive1 KEYWORDP = new Primitive1("keywordp", "object")
    548548    {
    549549        public LispObject execute(LispObject arg) throws ConditionThrowable
     
    558558
    559559    // ### make-symbol
    560     public static final Primitive1 MAKE_SYMBOL = new Primitive1("make-symbol","name")
    561     {
    562         public LispObject execute(LispObject arg) throws ConditionThrowable
    563         {
    564             String s;
    565             try {
    566                 s = ((LispString)arg).getValue();
    567             }
    568             catch (ClassCastException e) {
    569                 if (arg instanceof NilVector) {
    570                     if (arg.length() == 0)
    571                         s = "";
    572                     else
    573                         return ((NilVector)arg).accessError();
    574                 } else
    575                     return signal(new TypeError(arg, Symbol.STRING));
    576             }
    577             return new Symbol(s);
     560    public static final Primitive1 MAKE_SYMBOL = new Primitive1("make-symbol", "name")
     561    {
     562        public LispObject execute(LispObject arg) throws ConditionThrowable
     563        {
     564            return new Symbol(arg.getStringValue());
    578565        }
    579566    };
    580567
    581568    // makunbound
    582     public static final Primitive1 MAKUNBOUND = new Primitive1("makunbound","symbol")
     569    public static final Primitive1 MAKUNBOUND = new Primitive1("makunbound", "symbol")
    583570    {
    584571        public LispObject execute(LispObject arg) throws ConditionThrowable
Note: See TracChangeset for help on using the changeset viewer.