12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "ngtcp2_opl.h"
- void ngtcp2_opl_init(ngtcp2_opl *opl) { opl->head = NULL; }
- void ngtcp2_opl_push(ngtcp2_opl *opl, ngtcp2_opl_entry *ent) {
- ent->next = opl->head;
- opl->head = ent;
- }
- ngtcp2_opl_entry *ngtcp2_opl_pop(ngtcp2_opl *opl) {
- ngtcp2_opl_entry *ent = opl->head;
- if (!ent) {
- return NULL;
- }
- opl->head = ent->next;
- return ent;
- }
- void ngtcp2_opl_clear(ngtcp2_opl *opl) { opl->head = NULL; }
|