Changeset 6100


Ignore:
Timestamp:
Mar 28, 2007, 6:46:53 AM (12 years ago)
Author:
gb
Message:

Define DEFSTATIC, to which DEFGLOBAL is now an alias. Give them
doc strings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/objc-gf/ccl/lib/macros.lisp

    r6061 r6100  
    691691     (%defparameter ',var ,value ,doc)))
    692692
    693 (defmacro defglobal (&environment env var value &optional doc)
     693
     694(defmacro defstatic (&environment env var value &optional doc)
     695  "Syntax is like DEFPARAMETER.  Proclaims the symbol to be special,
     696but also asserts that it will never be given a per-thread dynamic
     697binding.  The value of the variable can be changed (via SETQ, etc.),
     698but since all threads access the same static binding of the variable,
     699such changes should be made with care."
    694700  (if (and doc (not (stringp doc))) (signal-program-error "~S is not a string." doc))
    695701  (if (and (compile-file-environment-p env) (not *fasl-save-doc-strings*))
     
    699705       (note-variable-info ',var :global ,env))
    700706     (%defglobal ',var ,value ,doc)))
     707
     708(defmacro defglobal (&rest args)
     709  "Synonym for DEFSTATIC."
     710  `(defstatic ,@args))
    701711
    702712
Note: See TracChangeset for help on using the changeset viewer.