/* Adds a new element at the head of the queue.  */
void g_queue_push_head_link(GQueue *queue, GList *link)
/* Adds a new element at the head of the queue.  */
void g_queue_push_head_link(GQueue *queue, GList *link)
{
  g_return_if_fail (queue != NULL);
  g_return_if_fail (link != NULL);
  g_return_if_fail (link->prev == NULL);
  g_return_if_fail (link->next == NULL);
  link->next = queue->head;
  if (queue->head)
    queue->head->prev = link;
  else
    queue->tail = link;
  queue->head = link;
  queue->length++;
}