Changeset 11656


Ignore:
Timestamp:
Jan 29, 2009, 3:23:51 PM (11 years ago)
Author:
gz
Message:

r11622 from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lib/macros.lisp

    r11415 r11656  
    735735     (%defglobal ',var ,value ,doc)))
    736736
     737(defmacro defstaticvar (&environment env var value &optional doc)
     738  "Syntax is like DEFVAR.  Proclaims the symbol to be special,
     739but also asserts that it will never be given a per-thread dynamic
     740binding.  The value of the variable can be changed (via SETQ, etc.),
     741but since all threads access the same static binding of the variable,
     742such changes should be made with care.  Like DEFVAR, the initial value
     743form is not evaluated if the variable is already BOUNDP."
     744  (if (and doc (not (stringp doc))) (signal-program-error "~S is not a string." doc))
     745  (if (and (compile-file-environment-p env) (not *fasl-save-doc-strings*))
     746    (setq doc nil))
     747  `(progn
     748     (eval-when (:compile-toplevel)
     749       (note-variable-info ',var :global ,env))
     750     (%defvar-init ,var ,value ,doc)))
     751
    737752
    738753(defmacro defglobal (&rest args)
     
    743758(defmacro defloadvar (&environment env var value &optional doc)
    744759  `(progn
    745      (defstatic ,var ,nil ,@(if doc `(,doc)))
     760     (defstaticvar ,var ,nil ,@(if doc `(,doc)))
    746761     (def-ccl-pointers ,var ()
    747762       (setq ,var ,value))
Note: See TracChangeset for help on using the changeset viewer.