Changeset 8663


Ignore:
Timestamp:
02/28/05 17:18:02 (16 years ago)
Author:
piso
Message:

addFunction(): use Package.internAndExport().

File:
1 edited

Legend:

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

    r8660 r8663  
    33 *
    44 * Copyright (C) 2002-2005 Peter Graves
    5  * $Id: Symbol.java,v 1.174 2005-02-28 02:50:05 piso Exp $
     5 * $Id: Symbol.java,v 1.175 2005-02-28 17:18:02 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    200200    public static final Symbol addFunction(String name, LispObject obj)
    201201    {
    202         Symbol symbol = PACKAGE_CL.intern(name);
    203         try {
    204             PACKAGE_CL.export(symbol); // FIXME Inefficient!
     202        try {
     203            Symbol symbol = PACKAGE_CL.internAndExport(name);
     204            symbol.function = obj;
     205            return symbol;
    205206        }
    206207        catch (ConditionThrowable t) {
    207             Debug.trace(t);
    208         }
    209         symbol.function = obj;
    210         return symbol;
     208            Debug.trace(t); // Shouldn't happen.
     209            return null;
     210        }
    211211    }
    212212
Note: See TracChangeset for help on using the changeset viewer.