close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 2877 for branches


Ignore:
Timestamp:
2015-06-21T11:32:54-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/ring.lisp

    r2870 r2877  
    213213        (slot-value object slot-name))))
    214214      (apply #'reinitialize-instance copy initargs))))
     215
     216(defun shallow-copy-object (original)
     217  (let* ((class (class-of original))
     218         (copy (allocate-instance class)))
     219    (dolist (slot (mapcar #'slot-definition-name (class-slots class)))
     220      (when (slot-boundp original slot)
     221        (setf (slot-value copy slot)
     222              (slot-value original slot))))
     223    copy))
Note: See TracChangeset for help on using the changeset viewer.