Plaster
New
List
Login
text
default
anonymous
2021.12.05 20:34:09
(cffi:defcstruct clockinfo (hz :int) (tick :int) ;; elided :int field for padding (stathz :int :offset 12) ;; align past padding field (profhz :int) ;; no explicit alignment, will be contiguous with stathz? ) (cffi:defcstruct clockinfo (hz :int) (tick :int) ;; elided :int field for padding (stathz :int :offset 12) ;; align past padding field (profhz :int :offset 16) ;; align again? )
Raw
Annotate
Repaste
Edit
Annotations
text
default
anonymous
2021.12.05 20:48:57
(defun set-innermost-object (object value &rest indicators) (when (null indicators) (return-from set-innermost-object value)) (destructuring-bind (key &rest indicators) indicators (let ((value (apply #'set-innermost-object (if (hash-table-p object) (gethash key object) (getf object key)) value indicators))) (if (hash-table-p object) (setf (gethash key object) value) (setf (getf object key) value))))) (let ((some-plist (list :a 3 :b 4)) (some-hash (make-hash-table))) (set-innermost-object some-hash some-plist :zzz) (set-innermost-object some-hash 42 :zzz :a) some-plist)
Raw
Repaste
Edit