Package: glib

Function glib:variant-iter-next-value

Lambda List

glib:variant-iter-next-value (iter)

Arguments

iter -- a g:variant-iter instance

Return Value

The g:variant instance, or nil.

Details

Gets the next item in the container. If no more items remain then nil is returned.

Use the g:variant-unref function to drop your reference on the return value when you no longer need it.

Examples

Iterating with the g:variant-iter-next-value function.
(defun iterate-container (container)
  (let ((iter (g:variant-iter-new container)))
    (iter (for value = (g:variant-iter-next-value iter))
          (while value)
          ;; Do something with VALUE
          ...
          (g:variant-unref value))
    (g:variant-iter-free iter)))    
 

See also

2025-05-04