Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
archived/src/queue.h
Henrik Hautakoski 4a2665004e queue.c: remove queue_clear.
client code knows what objects is stored in the queue
and its only 3 lines to do a simple free() on the items.
2010-11-10 08:45:44 +01:00

33 lines
819 B
C

/* queue.h
*
* Copyright (C) 2010 Henrik Hautakoski <henrik@fiktivkod.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __QUEUE_H
#define __QUEUE_H
#include <stddef.h>
typedef struct __queue* queue_t;
queue_t queue_init(void);
void queue_enqueue(queue_t q, void *obj);
void* queue_dequeue(queue_t q);
int queue_isempty(queue_t q);
size_t queue_num_items(queue_t q);
void queue_destroy(queue_t q);
#endif /* __QUEUE_H */