Changeset 14577


Ignore:
Timestamp:
Jan 12, 2011, 9:58:39 PM (9 years ago)
Author:
gb
Message:

Typecheck the NAME argument in SYMBOL-FUNCTION; use FSET-SYMBOL
as SYMBOL-FUNCTION's SETF inverse.
Fixes ticket:808.

Location:
trunk/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-def.lisp

    r14325 r14577  
    6767;Redefined in sysutils.
    6868(%fhave 'fset #'bootstrapping-fset)
     69
     70(defun fset-symbol (name fn)
     71  (fset (require-type name 'symbol) fn))
     72
    6973
    7074(defun bootstrapping-record-source-file (fn &optional type)
  • trunk/source/level-1/l1-utils.lisp

    r14553 r14577  
    742742;;;;;FUNCTION BINDING Functions
    743743
     744(defun fdefinition (name)
     745  (or (fboundp name) ;Our fboundp returns the binding
     746      (prog1 (%err-disp $xfunbnd name))))
     747
    744748(defun symbol-function (name)
    745749  "Return the definition of NAME, even if it is a macro or a special form.
    746750   Error if NAME doesn't have a definition."
    747   (or (fboundp name) ;Our fboundp returns the binding
    748       (prog1 (%err-disp $xfunbnd name))))
    749 
    750 (%fhave 'fdefinition #'symbol-function)
     751  (fdefinition (require-type name 'symbol)))
     752
    751753
    752754(defun %make-function (name fn env)
  • trunk/source/level-1/sysutils.lisp

    r14258 r14577  
    408408    function))
    409409
    410 (defsetf symbol-function fset)
     410(defsetf symbol-function fset-symbol)
    411411(defsetf fdefinition fset)
    412412
Note: See TracChangeset for help on using the changeset viewer.