+;; This temporary hack is necessary until define-callback gets support
+;; for :in/out parameters
+(defun gerror-set-in-callback (indirect-location domain code format &rest args)
+ (unless (null-pointer-p indirect-location)
+ (if (null-pointer-p (ref-pointer indirect-location))
+ (setf (ref-pointer indirect-location)
+ (funcall (to-alien-function 'gerror)
+ (apply #'gerror-new domain code format args)))
+ (let ((gerror (funcall (from-alien-function '(static gerror))
+ (ref-pointer indirect-location))))
+ (apply #'gerror-set gerror domain code format args)))))
+