Changeset 6247


Ignore:
Timestamp:
03/14/04 01:11:10 (17 years ago)
Author:
piso
Message:

vectorPushExtend()

File:
1 edited

Legend:

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

    r6074 r6247  
    33 *
    44 * Copyright (C) 2002-2004 Peter Graves
    5  * $Id: ComplexString.java,v 1.13 2004-03-04 01:52:32 piso Exp $
     5 * $Id: ComplexString.java,v 1.14 2004-03-14 01:11:10 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    385385            ensureCapacity(capacity * 2 + 1);
    386386        }
    387         chars[fillPointer] = LispCharacter.getValue(element);
     387        if (chars != null) {
     388            try {
     389                chars[fillPointer] = ((LispCharacter)element).value;
     390            }
     391            catch (ClassCastException e) {
     392                signal(new TypeError(element, Symbol.CHARACTER));
     393            }
     394        } else
     395            array.setRowMajor(fillPointer + displacement, element);
    388396        return new Fixnum(fillPointer++);
    389397    }
     
    400408            ensureCapacity(capacity + ext);
    401409        }
    402         chars[fillPointer] = LispCharacter.getValue(element);
     410        if (chars != null) {
     411            try {
     412                chars[fillPointer] = ((LispCharacter)element).value;
     413            }
     414            catch (ClassCastException e) {
     415                signal(new TypeError(element, Symbol.CHARACTER));
     416            }
     417        } else
     418            array.setRowMajor(fillPointer + displacement, element);
    403419        return new Fixnum(fillPointer++);
    404420    }
Note: See TracChangeset for help on using the changeset viewer.