Changeset 52 for branches/home/psmith/restructure
- Timestamp:
- 01/25/07 03:38:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/home/psmith/restructure/src/buffer/buffer.lisp ¶
r51 r52 104 104 (defmethod print-object ((byte-buffer byte-buffer) stream) 105 105 (with-slots (capacity position limit buf) byte-buffer 106 (format stream "<byte-buffer :capacity ~A :position ~A :limit ~A :buf ~%~A>~%" capacity position limit (if buf ( pretty-hex-dump(cffi:pointer-address buf) limit) nil))))106 (format stream "<byte-buffer :capacity ~A :position ~A :limit ~A :buf ~%~A>~%" capacity position limit (if buf (hex-dump-memory (cffi:pointer-address buf) limit) nil)))) 107 107 108 108 (defmethod free-buffer((byte-buffer byte-buffer)) … … 181 181 (defmethod copy-buffer ((old byte-buffer) (new byte-buffer)) 182 182 (assert (<= (buffer-capacity old) (buffer-capacity new))) 183 (%memcpy (buffer-buf new) (buffer-buf old) (buffer-capacity old))) 183 (%memcpy (buffer-buf new) (buffer-buf old) (buffer-capacity old)) 184 (setf (buffer-position new) (buffer-position old)) 185 (setf (buffer-limit new) (buffer-limit old))) 184 186 185 187 ;void *memcpy(void *dest, const void *src, size_t n); … … 206 208 207 209 (format t "Mybuf (after memset): ~A~%" mybuf) 208 ;(flip mybuf)209 ;(format t "Mybuf (after flip): ~A~%" mybuf)210 (flip mybuf) 211 (format t "Mybuf (after flip): ~A~%" mybuf) 210 212 211 213
Note: See TracChangeset
for help on using the changeset viewer.