mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-02 15:40:55 -08:00
40 lines
1.3 KiB
Common Lisp
40 lines
1.3 KiB
Common Lisp
;;;; Copyright (c) 1992, Giuseppe Attardi.
|
|
;;;;
|
|
;;;; This program is free software; you can redistribute it and/or
|
|
;;;; modify it under the terms of the GNU Library General Public
|
|
;;;; License as published by the Free Software Foundation; either
|
|
;;;; version 2 of the License, or (at your option) any later version.
|
|
;;;;
|
|
;;;; See file '../Copyright' for full details.
|
|
|
|
(in-package "CLOS")
|
|
|
|
|
|
;;; ----------------------------------------------------------------------
|
|
;;; Generic Functions
|
|
;;; ----------------------------------------------------------------------
|
|
|
|
(defclass generic-function (standard-object function) ())
|
|
|
|
(defclass standard-generic-function (generic-function)
|
|
#.+standard-generic-function-slots+)
|
|
|
|
;;;----------------------------------------------------------------------
|
|
;;; Method
|
|
;;; ----------------------------------------------------------------------
|
|
|
|
(defclass method () ())
|
|
|
|
(defclass standard-method (method)
|
|
#.+standard-method-slots+)
|
|
|
|
|
|
(defun function-keywords (method)
|
|
(multiple-value-bind (reqs opts rest-var key-flag keywords)
|
|
(si::process-lambda-list (slot-value method 'lambda-list) 'function)
|
|
(when key-flag
|
|
(do* ((output '())
|
|
(l (cdr keywords) (cddddr l)))
|
|
((endp l)
|
|
output)
|
|
(push (first l) output)))))
|