From 62933e138ce166f9b7901e8f783e4e17402d7aff Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sun, 3 Feb 2008 10:41:03 +0100 Subject: Add system objective-cl-clozure-compat. darcs-hash:118ca7e4268f77f7b9b9ab10c17200cebdd00ba9 --- Lisp/clozure-compat.lisp | 25 +++++++++++++++++++++++++ Lisp/data-types.lisp | 9 +++++---- Lisp/defpackage.lisp | 4 ++-- 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 Lisp/clozure-compat.lisp (limited to 'Lisp') diff --git a/Lisp/clozure-compat.lisp b/Lisp/clozure-compat.lisp new file mode 100644 index 0000000..8d6e2ea --- /dev/null +++ b/Lisp/clozure-compat.lisp @@ -0,0 +1,25 @@ +;;;; Objective-CL, an Objective-C bridge for Common Lisp. +;;;; Copyright (C) 2007 Matthias Andreas Benkard. +;;;; +;;;; This program is free software: you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public License +;;;; as published by the Free Software Foundation, either version 3 of +;;;; the License, or (at your option) any later version. +;;;; +;;;; This program is distributed in the hope that it will be useful, but +;;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;;; Lesser General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU Lesser General Public +;;;; License along with this program. If not, see +;;;; . + + +(let* ((package (find-package '#:objective-c-classes)) + (new-name '#:ns) + (new-nicknames (remove new-name + (remove-duplicates + (cons (package-name package) + (package-nicknames package)))))) + (rename-package package new-name new-nicknames)) diff --git a/Lisp/data-types.lisp b/Lisp/data-types.lisp index a5ec1ba..a857800 100644 --- a/Lisp/data-types.lisp +++ b/Lisp/data-types.lisp @@ -95,7 +95,8 @@ The following calls are all equivalent: (apply #'invoke-by-name receiver selector args)))) -(defclass id (c-pointer-wrapper) () +(defclass id (c-pointer-wrapper) + () (:documentation "An instance of an Objective-C class. ## Description: @@ -138,9 +139,9 @@ a suitable class method instead as you would in Objective-C. (define-condition exception (error) - ((pointer :type c-pointer - :accessor pointer-to - :initarg :pointer)) + ((pointer :type c-pointer + :accessor pointer-to + :initarg :pointer)) (:report (lambda (condition stream) (format stream "The Objective-C runtime has issued an exception of ~ diff --git a/Lisp/defpackage.lisp b/Lisp/defpackage.lisp index 0543ed5..9151bba 100644 --- a/Lisp/defpackage.lisp +++ b/Lisp/defpackage.lisp @@ -68,8 +68,8 @@ #:next-runtime)) -(defpackage #:objective-c-classes - (:nicknames #:objc-classes) +(defpackage #:objcl-ns + (:nicknames #:objective-c-classes #:objc-classes) (:use)) -- cgit v1.2.3