- (let ((location
- (allocate-memory (foreign-size (find-class 'stock-item)))))
- (unwind-protect
- (when (%stock-lookup stock-id location)
- (ensure-proxy-instance 'stock-item (%stock-item-copy location)))
- (deallocate-memory location))))
+ (with-allocated-memory (stock-item (foreign-size (find-class 'stock-item)))
+ (when (%stock-lookup stock-id stock-item)
+ (ensure-proxy-instance 'stock-item (%stock-item-copy stock-item)))))
+
+#+gtk2.8
+(progn
+ (define-callback-marshal %stock-translate-callback string ((path string)))
+
+ (defbinding (stock-set-translate-function "gtk_stock_set_translate_func")
+ (domain function) nil
+ (domain string)
+ (%stock-translate-callback callback)
+ ((register-callback-function function) unsigned-int)
+ (user-data-destroy-callback callback)))