Changeset 13359


Ignore:
Timestamp:
06/22/11 12:25:28 (10 years ago)
Author:
Mark Evenson
Message:

Created +NULL+, +TRUE+, and +FALSE+ constants in the JAVA package.

Deprecate JAVA:MAKE-IMMEDIATE-OBJECT in favor of using these constants
in the JAVA package for the associated wrapped primitive types.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

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

    r13328 r13359  
    10861086    }
    10871087
     1088    // DEPRECATED Remove MAKE-IMMEDIATE-OBJECT in abcl-0.29
    10881089    private static final Primitive MAKE_IMMEDIATE_OBJECT = new pf_make_immediate_object();
    10891090    @DocString(name="make-immediate-object", args="object &optional type",
    1090     doc="Attempts to coerce a given Lisp object into a java-object of the\n"+
    1091         "given type.  If type is not provided, works as jobject-lisp-value.\n"+
    1092         "Currently, type may be :BOOLEAN, treating the object as a truth value,\n"+
    1093         "or :REF, which returns Java null if NIL is provided.")
     1091    doc="Attempts to coerce a given Lisp object into a java-object of the\n"
     1092      + "given type.  If type is not provided, works as jobject-lisp-value.\n"
     1093      + "Currently, type may be :BOOLEAN, treating the object as a truth value,\n"
     1094      + "or :REF, which returns Java null if NIL is provided.\n"
     1095      + "\n"
     1096      + "Deprecated.  Please use JAVA:+NULL+, JAVA:+TRUE+, and JAVA:+FALSE+ for\n"
     1097      + "constructing wrapped primitive types, JAVA:JOBJECT-LISP-VALUE for converting a\n"
     1098      + "JAVA:JAVA-OBJECT to a Lisp value, or JAVA:JNULL_REF_P to distinguish a wrapped\n"
     1099      + "null JAVA_OBJECT from nil.")
    10941100    private static final class pf_make_immediate_object extends Primitive
    10951101    {
     
    11021108        public LispObject execute(LispObject[] args)
    11031109        {
     1110            Symbol.WARN.getSymbolFunction()
     1111                .execute(new SimpleString("JAVA:MAKE-IMMEDIATE-OBJECT is deprecated."));
    11041112            if (args.length < 1)
    11051113                error(new WrongNumberOfArgumentsException(this));
  • trunk/abcl/src/org/armedbear/lisp/JavaObject.java

    r13327 r13359  
    660660        };
    661661
     662    public final static Symbol NULL
     663        = Lisp.exportConstant("+NULL+", PACKAGE_JAVA, new JavaObject(null));
     664    public final static Symbol TRUE
     665        = Lisp.exportConstant("+TRUE+", PACKAGE_JAVA, new JavaObject(true));
     666    public final static Symbol FALSE
     667        = Lisp.exportConstant("+FALSE+", PACKAGE_JAVA, new JavaObject(false));
    662668}
Note: See TracChangeset for help on using the changeset viewer.