From mmommer at common-lisp.net Sun Aug 1 18:05:19 2004 From: mmommer at common-lisp.net (Mario Mommer) Date: Sun, 01 Aug 2004 11:05:19 -0700 Subject: [lgtk-cvs] CVS update: lgtk/src/port.lisp Message-ID: Update of /project/lgtk/cvsroot/lgtk/src In directory common-lisp.net:/tmp/cvs-serv28965 Modified Files: port.lisp Log Message: Made it ready for CMUCL 19a. No more fidgeting with the core! Date: Sun Aug 1 11:05:19 2004 Author: mmommer Index: lgtk/src/port.lisp diff -u lgtk/src/port.lisp:1.4 lgtk/src/port.lisp:1.5 --- lgtk/src/port.lisp:1.4 Thu Dec 11 02:48:00 2003 +++ lgtk/src/port.lisp Sun Aug 1 11:05:19 2004 @@ -1,4 +1,4 @@ -;;;; -*- Mode: Lisp; Synatx: ANSI-Common-Lisp; Base: 10 -*- +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;; (c) October 2003 by Mario S. Mommer ;; @@ -11,12 +11,17 @@ #:weak-pointer-value #:*weak-pointer-type* #:run-after-gc #:def-alien-routine #:port-alien-type #:def-c-callable #:c-fun-ptr #:swap-unix-sigint-handler #:voidptr #:peek #:poke) - #+cmu (:use common-lisp ext system alien c-call callback) + #+cmu (:use common-lisp ext system alien c-call) #+sbcl (:use common-lisp sb-ext sb-sys sb-alien callback) - (:shadow def-alien-routine finalize make-weak-pointer weak-pointer-value)) + (:shadow def-callback def-alien-routine finalize make-weak-pointer + weak-pointer-value)) (in-package #:clnexus-port) +(defmacro def-callback (&rest args) + #+cmu `(alien:def-callback , at args) + #+sbcl `(defcallback , at args)) + '(defmacro def-c-types (&rest stuff) `(eval-when (:compile-toplevel :load-toplevel :execute) ,@(mapcar #'(lambda (x) @@ -129,7 +134,7 @@ "Defines a callback using the `port' C type specifiers. Uses PORT-ALIEN-TYPE to convert the syntax to the implementation-dependant alien type specifiers." - `(defcallback ,name + `(def-callback ,name ,(list* (port-alien-type return-type) (mapcar (lambda (arg-spec) (destructuring-bind (name type) arg-spec From mmommer at common-lisp.net Sun Aug 1 19:43:04 2004 From: mmommer at common-lisp.net (Mario Mommer) Date: Sun, 01 Aug 2004 12:43:04 -0700 Subject: [lgtk-cvs] CVS update: lgtk/src/port.lisp Message-ID: Update of /project/lgtk/cvsroot/lgtk/src In directory common-lisp.net:/tmp/cvs-serv15520 Modified Files: port.lisp Log Message: Making it backwards compatible with 18e. Date: Sun Aug 1 12:43:04 2004 Author: mmommer Index: lgtk/src/port.lisp diff -u lgtk/src/port.lisp:1.5 lgtk/src/port.lisp:1.6 --- lgtk/src/port.lisp:1.5 Sun Aug 1 11:05:19 2004 +++ lgtk/src/port.lisp Sun Aug 1 12:43:04 2004 @@ -19,7 +19,10 @@ (in-package #:clnexus-port) (defmacro def-callback (&rest args) - #+cmu `(alien:def-callback , at args) + #+(and cmu #.(cl:if (cl:find-package "CALLBACK") '(and) '(or))) + `(callback:defcallback , at args) + #+(and cmu #.(cl:if (cl:find-package "CALLBACK") '(or) '(and))) + `(alien:def-callback , at args) #+sbcl `(defcallback , at args)) '(defmacro def-c-types (&rest stuff)