Changeset 3698


Ignore:
Timestamp:
09/11/03 14:58:01 (19 years ago)
Author:
piso
Message:

values(LispObject first, LispObject second)
values(LispObject[] args)

File:
1 edited

Legend:

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

    r3584 r3698  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Lisp.java,v 1.125 2003-09-05 14:29:43 piso Exp $
     5 * $Id: Lisp.java,v 1.126 2003-09-11 14:58:01 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    611611    }
    612612
     613    public static final LispObject values(LispObject first, LispObject second)
     614    {
     615        LispObject[] values = new LispObject[2];
     616        values[0] = first;
     617        values[1] = second;
     618        LispThread.currentThread().setValues(values);
     619        return first;
     620    }
     621
     622    public static final LispObject values(LispObject[] args)
     623    {
     624        if (args.length == 1) {
     625            LispThread.currentThread().clearValues();
     626            return args[0];
     627        }
     628        LispThread.currentThread().setValues(args);
     629        return args.length > 0 ? args[0] : NIL;
     630    }
     631
    613632    public static final LispObject readObjectFromString(String s)
    614633    {
Note: See TracChangeset for help on using the changeset viewer.