Menu

[r760]: / trunk / lispbuilder-windows / windows / util.lisp  Maximize  Restore  History

Download this file

13 lines (9 with data), 455 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
(in-package :lispbuilder-windows)
(defmacro set-struct-members (object type &body values)
(let ((elements (loop for i in values collect (car i))))
`(with-foreign-slots (,elements ,object ,type)
,@(loop for (name value) in values collect `(setf ,name ,value)))))
(defmacro zero-mem (object type)
(let ((i (gensym)))
`(loop for ,i from 0 below (foreign-type-size (quote ,type)) do
(setf (mem-aref ,object :char ,i) 0))))
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.