Browse files

Clear dummy blocks for iterator creation.

  • Loading branch information...
1 parent f1a0b11 commit 3472a5a69407af4d53417d584c68d81fb0ee6498 @Ramarren committed Jun 17, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 gtk-ffi/gtk-other.lisp
View
2 gtk-ffi/gtk-other.lisp
@@ -881,10 +881,12 @@
;; see where to get size information, so I allocate a dummy block.
(defun gtk-adds-text-iter-new ()
(cffi:with-foreign-pointer (dummy 4096)
+ (loop for i from 0 below 512 do (setf (cffi:mem-aref dummy :uint64 i) 0))
(gtk-text-iter-copy dummy)))
(defun gtk-adds-tree-iter-new ()
(cffi:with-foreign-pointer (dummy 4096)
+ (loop for i from 0 below 512 do (setf (cffi:mem-aref dummy :uint64 i) 0))
(gtk-tree-iter-copy dummy)))
;; since this is in documentation I assume the layout is stable

0 comments on commit 3472a5a

Please sign in to comment.