Changeset 4666


Ignore:
Timestamp:
11/07/03 19:02:11 (18 years ago)
Author:
asimon
Message:

JCALL uses javaInstance for automatic type conversion

File:
1 edited

Legend:

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

    r4662 r4666  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Java.java,v 1.18 2003-11-07 09:18:38 asimon Exp $
     5 * $Id: Java.java,v 1.19 2003-11-07 19:02:11 asimon Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    338338                Object[] methodArgs = new Object[args.length-2];
    339339                for (int i = 2; i < args.length; i++) {
    340                     LispObject arg = args[i];
    341                     if (arg instanceof LispString)
    342                         methodArgs[i-2] = ((LispString)arg).getValue();
    343                     else if (arg instanceof JavaObject)
    344                         methodArgs[i-2] = ((JavaObject)arg).getObject();
    345                     else if (arg instanceof LispCharacter)
    346                         methodArgs[i-2] = new Character(((LispCharacter)arg).getValue());
     340                    methodArgs[i-2] = args[i].javaInstance();
    347341                }
    348342                Object result = method.invoke(instance, methodArgs);
Note: See TracChangeset for help on using the changeset viewer.